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>
20 lines
332 B
Nix
20 lines
332 B
Nix
{
|
|
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" ];
|
|
}
|