aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-17 09:49:18 +0900
committerOphestra <cat@gensokyo.uk>2025-03-17 12:26:19 +0900
commit33855381422932a208fa412bd4a96c0905aafdf1 (patch)
tree070feaa36174174fb52ebdbfc76bd24d41a71084 /test
parent24618ab9a1524e8b8986a9bf67667288e642fcf1 (diff)
nix: clean up flake outputs
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
-rw-r--r--test/default.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/default.nix b/test/default.nix
index 068ca709..d53dcfca 100644
--- a/test/default.nix
+++ b/test/default.nix
@@ -1,6 +1,7 @@
{
lib,
nixosTest,
+ buildFHSEnv,
writeShellScriptBin,
system,
@@ -12,6 +13,21 @@ nixosTest {
name = "fortify" + (if withRace then "-race" else "");
nodes.machine =
{ options, pkgs, ... }:
+ let
+ fhs =
+ let
+ fortify = options.environment.fortify.package.default;
+ in
+ buildFHSEnv {
+ pname = "fortify-fhs";
+ inherit (fortify) version;
+ targetPkgs = _: fortify.targetPkgs;
+ extraOutputsToInstall = [ "dev" ];
+ profile = ''
+ export PKG_CONFIG_PATH="/usr/share/pkgconfig:$PKG_CONFIG_PATH"
+ '';
+ };
+ in
{
environment.systemPackages = [
# For go tests:
@@ -21,7 +37,7 @@ nixosTest {
cp -r "${self.packages.${system}.fortify.src}" "$WORK"
chmod -R +w "$WORK"
cd "$WORK"
- ${self.packages.${system}.fhs}/bin/fortify-fhs -c \
+ ${fhs}/bin/fortify-fhs -c \
'go generate ./... && go test ${if withRace then "-race" else "-count 16"} ./... && touch /tmp/go-test-ok'
'')
];