forked from mirrors/nixpkgs
ghcWithPackages: use packageCfgDir over ghc.name where appropriate
This is an incorrectness pointed out in #153319 which we already have a proper solution for.
This commit is contained in:
parent
70530708a5
commit
383fbfadcc
|
@ -121,7 +121,7 @@ symlinkJoin {
|
|||
|
||||
'' + (lib.optionalString (stdenv.targetPlatform.isDarwin && !isGhcjs && !stdenv.targetPlatform.isiOS) ''
|
||||
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
|
||||
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
|
||||
local packageConfDir="${packageCfgDir}";
|
||||
local dynamicLinksDir="$out/lib/links"
|
||||
mkdir -p $dynamicLinksDir
|
||||
# Clean up the old links that may have been (transitively) included by
|
||||
|
@ -148,8 +148,8 @@ symlinkJoin {
|
|||
# to another nix derivation, so they are not writable. Removing
|
||||
# them allow the correct behavior of ghc-pkg recache
|
||||
# See: https://github.com/NixOS/nixpkgs/issues/79441
|
||||
rm $out/lib/${ghc.name}/package.conf.d/package.cache.lock
|
||||
rm $out/lib/${ghc.name}/package.conf.d/package.cache
|
||||
rm ${packageCfgDir}/package.cache.lock
|
||||
rm ${packageCfgDir}/package.cache
|
||||
|
||||
$out/bin/${ghcCommand}-pkg recache
|
||||
''}
|
||||
|
|
Loading…
Reference in a new issue