From 18932b7a4a2c5a8ef0a76e955c128bbbd8f2c633 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 23 Dec 2024 22:04:54 +0100 Subject: [PATCH] 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. --- nix/static.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/nix/static.nix b/nix/static.nix index 3d8f66789..31de3691b 100644 --- a/nix/static.nix +++ b/nix/static.nix @@ -8,17 +8,7 @@ let inherit (pkgs) pkgsStatic; inherit (pkgsStatic.haskell) lib; - packagesStatic = - 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; - }; - }); + packagesStatic = pkgsStatic.haskell.packages.native-bignum."${compiler}"; makeExecutableStatic = drv: pkgs.lib.pipe drv [ lib.compose.justStaticExecutables