diff --git a/flake.nix b/flake.nix index 4f1c653..747a66b 100644 --- a/flake.nix +++ b/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 = ''