manifest-tool: add static binary support
This commit is contained in:
parent
e3374aff8a
commit
2c5768fe8f
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,11 @@ buildGoModule rec {
|
|||
ldflags="-X main.gitCommit=$(cat .git-revision)"
|
||||
'';
|
||||
|
||||
CGO_ENABLED = if stdenv.hostPlatform.isStatic then "0" else "1";
|
||||
GO_EXTLINK_ENABLED = if stdenv.hostPlatform.isStatic then "0" else "1";
|
||||
ldflags = lib.optionals stdenv.hostPlatform.isStatic [ "-w" "-extldflags" "-static" ];
|
||||
tags = lib.optionals stdenv.hostPlatform.isStatic [ "netgo" ];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = manifest-tool;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue