Build static binary
This commit is contained in:
parent
3ff0dc79d5
commit
4bbc31f41b
10
flake.nix
10
flake.nix
@ -26,6 +26,16 @@
|
||||
# And some build configuration.
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#haskell-packaging-helpers.
|
||||
[
|
||||
compose.disableSharedExecutables
|
||||
compose.disableSharedLibraries
|
||||
(compose.appendConfigureFlags [
|
||||
"--ghc-option=-optl=-static"
|
||||
"--ghc-option=-optl=-pthread"
|
||||
"--ghc-option=-optl=-L${pkgs.gmp6.override { withStatic = true; }}/lib"
|
||||
"--ghc-option=-optl=-L${pkgs.zlib.static}/lib"
|
||||
"--ghc-option=-optl=-L${pkgs.glibc.static}/lib"
|
||||
"--extra-lib-dirs=${pkgs.libffi.overrideAttrs (old: { dontDisableStatic = true; })}/lib"
|
||||
])
|
||||
# Remove warp which pulls GHC into the runtime deps for some reason.
|
||||
(compose.overrideCabal (drv: {
|
||||
postInstall = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user