aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/fsu/package.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-26 19:42:28 +0900
committerOphestra <cat@gensokyo.uk>2025-02-26 19:42:28 +0900
commit45ad788c6d03bf368010fa8e2a39028bdf0fc078 (patch)
tree66c508f6fd85d23a7c83b2af0310b411ba313ab2 /cmd/fsu/package.nix
parent56539d8db5f9ce965190d36aac9867907359a7d0 (diff)
cmd/fsu: allow switch from fpkg
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/fsu/package.nix')
-rw-r--r--cmd/fsu/package.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd/fsu/package.nix b/cmd/fsu/package.nix
index e7a7a1eb..879c6373 100644
--- a/cmd/fsu/package.nix
+++ b/cmd/fsu/package.nix
@@ -1,4 +1,5 @@
{
+ lib,
buildGoModule,
fortify ? abort "fortify package required",
}:
@@ -15,5 +16,15 @@ buildGoModule {
go mod init fsu >& /dev/null
'';
- ldflags = [ "-X main.Fmain=${fortify}/libexec/fortify" ];
+ ldflags =
+ lib.attrsets.foldlAttrs
+ (
+ ldflags: name: value:
+ ldflags ++ [ "-X main.${name}=${value}" ]
+ )
+ [ "-s -w" ]
+ {
+ fmain = "${fortify}/libexec/fortify";
+ fpkg = "${fortify}/libexec/fpkg";
+ };
}