From f5987a0094578df690c43398f5f8cd3b9e7341e8 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 2 Mar 2023 11:15:25 +0100 Subject: [PATCH] Add ci derivation --- overlay.nix | 4 ++++ test/ci.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/ci.nix diff --git a/overlay.nix b/overlay.nix index 020c4dd..3e26961 100644 --- a/overlay.nix +++ b/overlay.nix @@ -265,6 +265,10 @@ let # hwloc = callPackage ./test/bugs/hwloc.nix { }; sigsegv = callPackage ./test/reproducers/sigsegv.nix { }; }; + + ci = import ./test/ci.nix { + inherit self super bsc callPackage; + }; }); in diff --git a/test/ci.nix b/test/ci.nix new file mode 100644 index 0000000..0776b15 --- /dev/null +++ b/test/ci.nix @@ -0,0 +1,31 @@ +{ self, super, bsc, callPackage }: + +let + stdenv = self.stdenv; +in + +stdenv.mkDerivation rec { + name = "ci"; + src = ./ci.nix; + dontUnpack = true; + + # Just build some packages + buildInputs = with bsc; [ + extrae + ]; + + 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 = '' + touch $out + ''; +}