Some checks failed
Test / Create distribution (push) Successful in 31s
Test / Sandbox (push) Successful in 1m56s
Test / Sandbox (race detector) (push) Successful in 3m6s
Test / Fpkg (push) Successful in 3m40s
Test / Fortify (race detector) (push) Failing after 4m19s
Test / Fortify (push) Failing after 2m21s
Test / Flake checks (push) Has been skipped
Signed-off-by: Ophestra <cat@gensokyo.uk>
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";
|
|
};
|
|
}
|