All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m5s
Test / Hpkg (push) Successful in 4m4s
Test / Sandbox (race detector) (push) Successful in 4m9s
Test / Hakurei (race detector) (push) Successful in 4m46s
Test / Flake checks (push) Successful in 1m30s
These names are less ambiguous and should be understandable without reading the source code. Signed-off-by: Ophestra <cat@gensokyo.uk>
24 lines
458 B
Nix
24 lines
458 B
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
hakurei ? abort "hakurei package required",
|
|
}:
|
|
|
|
buildGoModule {
|
|
pname = "${hakurei.pname}-hsu";
|
|
inherit (hakurei) version;
|
|
|
|
src = ./.;
|
|
inherit (hakurei) vendorHash;
|
|
env.CGO_ENABLED = 0;
|
|
|
|
preBuild = ''
|
|
go mod init hsu >& /dev/null
|
|
'';
|
|
|
|
ldflags = lib.attrsets.foldlAttrs (
|
|
ldflags: name: value:
|
|
ldflags ++ [ "-X main.${name}=${value}" ]
|
|
) [ "-s -w" ] { hakureiPath = "${hakurei}/libexec/hakurei"; };
|
|
}
|