aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--flake.nix5
-rw-r--r--test.nix13
2 files changed, 17 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 87cf7b64..086e3814 100644
--- a/flake.nix
+++ b/flake.nix
@@ -88,7 +88,10 @@
touch $out
'';
- nixos-tests = callPackage ./test.nix { inherit system self home-manager; };
+ nixos-tests = callPackage ./test.nix {
+ inherit system self home-manager;
+ inherit (self.packages.${system}) fortify;
+ };
}
);
diff --git a/test.nix b/test.nix
index f71d906d..6fdb249b 100644
--- a/test.nix
+++ b/test.nix
@@ -3,6 +3,7 @@
self,
home-manager,
nixosTest,
+ fortify,
}:
nixosTest {
@@ -110,6 +111,18 @@ nixosTest {
environment.fortify = {
enable = true;
+ package = fortify.overrideAttrs (previousAttrs: {
+ GOFLAGS = previousAttrs.GOFLAGS ++ [ "-race" ];
+
+ # fsu does not like cgo
+ disallowedReferences = previousAttrs.disallowedReferences ++ [ fortify ];
+ postInstall =
+ previousAttrs.postInstall
+ + ''
+ cp -a "${fortify}/libexec/fsu" "$out/libexec/fsu"
+ sed -i 's:${fortify}:${placeholder "out"}:' "$out/libexec/fsu"
+ '';
+ });
stateDir = "/var/lib/fortify";
users.alice = 0;