nixfmt-rfc-style
There is nothing in this commit except for the changes made by nix-shell -p nixfmt-rfc-style --run "nixfmt ." If this has mucked up your open branches then sorry about that. You can probably nixfmt them to match before merging
This commit is contained in:
@@ -1,24 +1,32 @@
|
||||
let img = (import <liminix> {
|
||||
let
|
||||
img =
|
||||
(import <liminix> {
|
||||
device = import <liminix/devices/qemu>;
|
||||
liminix-config = <liminix/vanilla-configuration.nix>;
|
||||
}).outputs.rootfs;
|
||||
pkgs = import <nixpkgs> {};
|
||||
in pkgs.runCommand "check" {
|
||||
nativeBuildInputs = with pkgs; [ squashfsTools s6-rc ] ;
|
||||
} ''
|
||||
destpath=$(mktemp -d)/smoke.img
|
||||
echo $destpath
|
||||
cleanup(){ test -n $destpath && test -d $destpath && chmod -R +w $destpath && rm -rf $destpath; }
|
||||
trap cleanup EXIT
|
||||
trap 'echo "command $(eval echo $BASH_COMMAND) failed with exit code $?"; exit $?' ERR
|
||||
unsquashfs -q -d $destpath -excludes ${img} /dev
|
||||
cd $destpath;
|
||||
db=nix/store/*-s6-rc-database/compiled/
|
||||
test -d $db
|
||||
chmod -R +w $db
|
||||
# check we have closure of config.services (lo.link service exists only
|
||||
# as a dependency)
|
||||
test "$(s6-rc-db -c $db type lo.link)" = "oneshot"
|
||||
test "$(s6-rc-db -c $db type ntp)" = "longrun"
|
||||
echo OK > $out
|
||||
''
|
||||
pkgs = import <nixpkgs> { };
|
||||
in
|
||||
pkgs.runCommand "check"
|
||||
{
|
||||
nativeBuildInputs = with pkgs; [
|
||||
squashfsTools
|
||||
s6-rc
|
||||
];
|
||||
}
|
||||
''
|
||||
destpath=$(mktemp -d)/smoke.img
|
||||
echo $destpath
|
||||
cleanup(){ test -n $destpath && test -d $destpath && chmod -R +w $destpath && rm -rf $destpath; }
|
||||
trap cleanup EXIT
|
||||
trap 'echo "command $(eval echo $BASH_COMMAND) failed with exit code $?"; exit $?' ERR
|
||||
unsquashfs -q -d $destpath -excludes ${img} /dev
|
||||
cd $destpath;
|
||||
db=nix/store/*-s6-rc-database/compiled/
|
||||
test -d $db
|
||||
chmod -R +w $db
|
||||
# check we have closure of config.services (lo.link service exists only
|
||||
# as a dependency)
|
||||
test "$(s6-rc-db -c $db type lo.link)" = "oneshot"
|
||||
test "$(s6-rc-db -c $db type ntp)" = "longrun"
|
||||
echo OK > $out
|
||||
''
|
||||
|
Reference in New Issue
Block a user