diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-01-20 19:10:46 +0100 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-02-05 14:01:25 +0100 |
commit | 18c0c48857f550e3b85bc51390593f1c0a4aa2bd (patch) | |
tree | 3252b92f7261f23096ebd46867b9bf935f0c94de /pkgs/development/haskell-modules/generic-builder.nix | |
parent | 1da3736c6964feab2714e0f6f32e47d1a523a9b1 (diff) | |
download | nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.tar nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.tar.gz nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.tar.bz2 nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.tar.lz nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.tar.xz nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.tar.zst nixpkgs-18c0c48857f550e3b85bc51390593f1c0a4aa2bd.zip |
haskellPackages.mkDerivation: buildPkgDb: use haskellCompilerName
Diffstat (limited to 'pkgs/development/haskell-modules/generic-builder.nix')
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 4b7201bb6ac..5cb44f35a06 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -287,7 +287,7 @@ let nativeGhcCommand = "${nativeGhc.targetPrefix}ghc"; - buildPkgDb = ghcName: packageConfDir: '' + buildPkgDb = thisGhc: packageConfDir: '' # If this dependency has a package database, then copy the contents of it, # unless it is one of our GHCs. These can appear in our dependencies when # we are doing native builds, and they have package databases in them, but @@ -297,8 +297,8 @@ let # we compile with it, and doing so can result in having multiple copies of # e.g. Cabal in the database with the same name and version, which is # ambiguous. - if [ -d "$p/lib/${ghcName}/package.conf.d" ] && [ "$p" != "${ghc}" ] && [ "$p" != "${nativeGhc}" ]; then - cp -f "$p/lib/${ghcName}/package.conf.d/"*.conf ${packageConfDir}/ + if [ -d "$p/lib/${thisGhc.haskellCompilerName}/package.conf.d" ] && [ "$p" != "${ghc}" ] && [ "$p" != "${nativeGhc}" ]; then + cp -f "$p/lib/${thisGhc.haskellCompilerName}/package.conf.d/"*.conf ${packageConfDir}/ continue fi ''; @@ -363,14 +363,14 @@ stdenv.mkDerivation ({ # pkgs* arrays defined in stdenv/setup.hs + '' for p in "''${pkgsBuildBuild[@]}" "''${pkgsBuildHost[@]}" "''${pkgsBuildTarget[@]}"; do - ${buildPkgDb "${nativeGhcCommand}-${nativeGhc.version}" "$setupPackageConfDir"} + ${buildPkgDb nativeGhc "$setupPackageConfDir"} done ${nativeGhcCommand}-pkg --${nativePackageDbFlag}="$setupPackageConfDir" recache '' # For normal components + '' for p in "''${pkgsHostHost[@]}" "''${pkgsHostTarget[@]}"; do - ${buildPkgDb ghcNameWithPrefix "$packageConfDir"} + ${buildPkgDb ghc "$packageConfDir"} if [ -d "$p/include" ]; then configureFlags+=" --extra-include-dirs=$p/include" fi |