Skip to content

Commit

Permalink
git-annex: pass setup package db to GHC used for building installer
Browse files Browse the repository at this point in the history
After 120f242, GHC_PACKAGE_PATH isn't
set implicitly in installPhase anymore. Instead we achieve the same by
telling the Makefile the exact ghc command line to use.

As a benefit, we can now cleanly separate build and host in this case:
We used to (implicitly) reuse the host package db. Now we can explicitly
request the package db also used for building Setup.hs.
  • Loading branch information
sternenseemann committed May 28, 2024
1 parent 0cad2ef commit 482ab92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,12 @@ self: super: builtins.intersectAttrs super {
preInstall = drv.preInstall or "" + ''
installTargets="install"
installFlagsArray+=(
"BUILDER=:"
"PREFIX="
"DESTDIR=$out"
# Prevent Makefile from calling cabal/Setup again
"BUILDER=:"
# Make Haskell build dependencies available
"GHC=${self.buildHaskellPackages.ghc.targetPrefix}ghc -global-package-db -package-db $setupPackageConfDir"
)
'';
installPhase = null;
Expand Down

0 comments on commit 482ab92

Please sign in to comment.