mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-14 03:01:48 +00:00
nix: fix building on non-linux platforms
This commit is contained in:
11
flake.nix
11
flake.nix
@@ -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"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user