2022-09-26 19:27:43 +02:00
|
|
|
{
|
2023-01-29 22:39:34 +01:00
|
|
|
liminix
|
|
|
|
, nixpkgs
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
overlay = import "${liminix}/overlay.nix";
|
|
|
|
nixpkgs = import <nixpkgs> { overlays = [overlay]; };
|
|
|
|
fixture = nixpkgs.callPackage ./fixture.nix {};
|
2023-01-29 22:42:53 +01:00
|
|
|
in nixpkgs.runCommand "check" {
|
2023-01-29 22:39:34 +01:00
|
|
|
nativeBuildInputs = with nixpkgs; [ squashfsTools qprint ] ;
|
|
|
|
} ''
|
|
|
|
set -e
|
|
|
|
diff ${fixture} ${./result.expected}
|
|
|
|
test -f /tmp/out.squashfs && rm /tmp/out.squashfs
|
|
|
|
mksquashfs - /tmp/out.squashfs -p '/ d 755 0 0' -pf ${fixture} -quiet -no-progress
|
|
|
|
foo="$(unsquashfs -cat /tmp/out.squashfs service/s6-linux-init-runleveld/run)"
|
|
|
|
test "$foo" = "$(printf "hello\nworld")"
|
|
|
|
date > $out
|
2023-01-29 22:42:53 +01:00
|
|
|
''
|