pkgsStatic.gum: fix build (#398033)

authored by Peder Bergebakken Sundt and committed by GitHub c3c450f5 5a16fab0

+11 -5
+11 -5
pkgs/by-name/gu/gum/package.nix
··· 23 23 installShellFiles 24 24 ]; 25 25 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 + ]; 31 37 32 38 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 33 39 $out/bin/gum man > gum.1