Some checks failed
Test / Create distribution (push) Successful in 8m41s
Test / Sandbox (push) Successful in 53m51s
Test / Sandbox (race detector) (push) Successful in 54m3s
Test / Fortify (race detector) (push) Failing after 55m19s
Test / Fpkg (push) Successful in 55m59s
Test / Fortify (push) Failing after 1m58s
Test / Flake checks (push) Has been skipped
31 lines
542 B
Nix
31 lines
542 B
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fortify ? abort "fortify package required",
|
|
}:
|
|
|
|
buildGoModule {
|
|
pname = "${fortify.pname}-fsu";
|
|
inherit (fortify) version;
|
|
|
|
src = ./.;
|
|
inherit (fortify) vendorHash;
|
|
env.CGO_ENABLED = 0;
|
|
|
|
preBuild = ''
|
|
go mod init fsu >& /dev/null
|
|
'';
|
|
|
|
ldflags =
|
|
lib.attrsets.foldlAttrs
|
|
(
|
|
ldflags: name: value:
|
|
ldflags ++ [ "-X main.${name}=${value}" ]
|
|
)
|
|
[ "-s -w" ]
|
|
{
|
|
fmain = "${fortify}/libexec/fortify";
|
|
fpkg = "${fortify}/libexec/fpkg";
|
|
};
|
|
}
|