summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/9.2.4-binary.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/ghc/9.2.4-binary.nix')
-rw-r--r--pkgs/development/compilers/ghc/9.2.4-binary.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix
index d3a57b6c9f0..909d090c170 100644
--- a/pkgs/development/compilers/ghc/9.2.4-binary.nix
+++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix
@@ -196,6 +196,7 @@ stdenv.mkDerivation rec {
       (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in
         lib.concatStringsSep "\n" [
           (''
+            shopt -u nullglob
             echo "Checking that ghc binary exists in bindist at ${buildExeGlob}"
             if ! test -e ${buildExeGlob}; then
               echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
@@ -368,7 +369,9 @@ stdenv.mkDerivation rec {
   # Recache package db which needs to happen for Hadrian bindists
   # where we modify the package db before installing
   + ''
-    "$out/bin/ghc-pkg" --package-db="$out/lib/"ghc-*/package.conf.d recache
+    shopt -s nullglob
+    package_db=("$out"/lib/ghc-*/lib/package.conf.d "$out"/lib/ghc-*/package.conf.d)
+    "$out/bin/ghc-pkg" --package-db="$package_db" recache
   '';
 
   # In nixpkgs, musl based builds currently enable `pie` hardening by default