diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-23 18:13:06 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-23 18:13:37 +0900 |
| commit | 8bf162820b291cc3889fd05f4ba7cd4fcbc1d15d (patch) | |
| tree | 53b44cc353629e300d6096345ea0e8cfcc64595f /cmd | |
| parent | dccb3666080686da73159680590352c23cf69c4f (diff) | |
nix: separate fsu from package
This appears to be the only way to build them with different configuration. This enables static linking in the main package.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/fsu/package.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmd/fsu/package.nix b/cmd/fsu/package.nix new file mode 100644 index 00000000..e7a7a1eb --- /dev/null +++ b/cmd/fsu/package.nix @@ -0,0 +1,19 @@ +{ + buildGoModule, + fortify ? abort "fortify package required", +}: + +buildGoModule { + pname = "${fortify.pname}-fsu"; + inherit (fortify) version; + + src = ./.; + inherit (fortify) vendorHash; + CGO_ENABLED = 0; + + preBuild = '' + go mod init fsu >& /dev/null + ''; + + ldflags = [ "-X main.Fmain=${fortify}/libexec/fortify" ]; +} |
