From 082a03e152664089552d3d83b033bd1d5a451d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Wed, 11 Oct 2023 12:34:04 +0200 Subject: [PATCH] haskell.compiler.ghc*Binary: fix globbing --- pkgs/development/compilers/ghc/8.10.2-binary.nix | 1 + pkgs/development/compilers/ghc/8.10.7-binary.nix | 1 + pkgs/development/compilers/ghc/9.2.4-binary.nix | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index 41461a26d425..3454d543cdbe 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -212,6 +212,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; diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index 22552fa67fb2..9adeb8330625 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -210,6 +210,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; diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix index 79b006ce5537..dd35ed560e71 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