1
0
forked from dan/liminix
liminix/tests/pseudofiles/test.nix
Daniel Barlow ca9efc4b26 simplify CI
* I didn't know what I was doing when I set up Hydra

* it's not certain that I do now either, but hey ho
2024-10-06 15:55:01 +01:00

16 lines
571 B
Nix
Executable File

let
overlay = import <liminix/overlay.nix>;
nixpkgs = import <nixpkgs> { overlays = [overlay]; };
fixture = nixpkgs.callPackage ./fixture.nix {};
in nixpkgs.runCommand "check" {
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
''