Skip to content

Commit 7df7a3f

Browse files
committed
pkgsStatic.gum: fix build
1 parent 2f79096 commit 7df7a3f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

pkgs/by-name/gu/gum/package.nix

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ buildGoModule rec {
2323
installShellFiles
2424
];
2525

26-
ldflags = [
27-
"-s"
28-
"-w"
29-
"-X=main.Version=${version}"
30-
];
26+
ldflags =
27+
[
28+
"-s"
29+
"-w"
30+
"-X=main.Version=${version}"
31+
]
32+
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [
33+
"-linkmode=external"
34+
"-extldflags"
35+
"-static"
36+
];
3137

3238
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
3339
$out/bin/gum man > gum.1

0 commit comments

Comments
 (0)