nix: use upstream GHC for static build

This way we benefit from NixOS' binary cache to deliver GHC for us and
don't need to cache it ourselves.

This will become relevant once we do that for more platforms.
This commit is contained in:
Wolfgang Walther
2025-07-11 15:53:06 +00:00
parent 067c181bb8
commit 18932b7a4a
+1 -11
View File
@@ -8,17 +8,7 @@ let
inherit (pkgs) pkgsStatic; inherit (pkgs) pkgsStatic;
inherit (pkgsStatic.haskell) lib; inherit (pkgsStatic.haskell) lib;
packagesStatic = packagesStatic = pkgsStatic.haskell.packages.native-bignum."${compiler}";
pkgsStatic.haskell.packages."${compiler}".override (old: {
ghc = pkgsStatic.pkgsBuildHost.haskell.compiler."${compiler}".override {
# Using the bundled libffi generally works better for cross-compiling
libffi = null;
# Building sphinx fails on some platforms
enableDocs = false;
# Cross compiling with native bignum works better than with gmp
enableNativeBignum = true;
};
});
makeExecutableStatic = drv: pkgs.lib.pipe drv [ makeExecutableStatic = drv: pkgs.lib.pipe drv [
lib.compose.justStaticExecutables lib.compose.justStaticExecutables