nix: fix building on non-linux platforms

This commit is contained in:
bin
2026-04-11 18:07:27 -04:00
committed by miyuko
parent af7657a787
commit 86259acf9c

View File

@@ -46,13 +46,18 @@
];
};
buildInputs = with pkgs; [
pkgsStatic.musl
];
buildInputs = pkgs.lib.optionals pkgs.stdenv.targetPlatform.isLinux (
with pkgs;
[
pkgsStatic.musl
]
);
ldflags = [
"-linkmode external"
"-X main.versionOverride=${self.shortRev or self.dirtyShortRev}"
]
++ pkgs.lib.optionals pkgs.stdenv.targetPlatform.isLinux [
"-extldflags -static"
"-s -w"
];