haskell.compiler.ghc*Binary: fix globbing

This commit is contained in:
Naïm Favier 2023-10-11 12:34:04 +02:00
parent 78faafa6e6
commit 082a03e152
No known key found for this signature in database
GPG Key ID: 95AFCE8211908325
3 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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