Add sandbox build test
This commit is contained in:
parent
63c78f50de
commit
a8523c4b4e
@ -125,5 +125,7 @@ let
|
|||||||
dummy = callPackage ./bsc/dummy/default.nix {
|
dummy = callPackage ./bsc/dummy/default.nix {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
chroot = callPackage ./test/chroot.nix {};
|
||||||
|
|
||||||
};
|
};
|
||||||
in pkgs // self
|
in pkgs // self
|
||||||
|
22
test/chroot.nix
Normal file
22
test/chroot.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{stdenv}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "0.0.1";
|
||||||
|
name = "chroot-checker";
|
||||||
|
src = ./chroot.nix;
|
||||||
|
dontUnpack = true;
|
||||||
|
buildPhase = ''
|
||||||
|
if [ -e /boot ]; then
|
||||||
|
echo Build is NOT under chroot
|
||||||
|
echo This is the content of / :
|
||||||
|
ls -l /
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "OK: Build is under chroot"
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user