on iko/ghcjs-patch-master help sign in
GHC-PKG shut up!

Fixes, #28, #29

commited456599a3a52592ffede765e9d12a953b77d606 authorMoritz Angermann <moritz.angermann@gmail.com> dateWed 23 Jan 2019, 17:30 (8 years ago) parentd9c0546
1 file changed+9−9
builder/comp-builder.nix+9−9
builder/comp-builder.nix+9−9
@@ -44,10 +44,10 @@ let
4444 in map ({val,...}: val) closure;
4545
4646 exactDep = pdbArg: p: ''
47− if id=$(${ghc.targetPrefix}ghc-pkg ${pdbArg} field ${p} id --simple-output); then
47+ if id=$(${ghc.targetPrefix}ghc-pkg -v0 ${pdbArg} field ${p} id --simple-output); then
4848 echo "--dependency=${p}=$id" >> $out/configure-flags
4949 fi
50− if ver=$(${ghc.targetPrefix}ghc-pkg ${pdbArg} field ${p} version --simple-output); then
50+ if ver=$(${ghc.targetPrefix}ghc-pkg -v0 ${pdbArg} field ${p} version --simple-output); then
5151 echo "constraint: ${p} == $ver" >> $out/cabal.config
5252 echo "constraint: ${p} installed" >> $out/cabal.config
5353 fi
@@ -55,7 +55,7 @@ let
5555
5656 configFiles = runCommand "${fullName}-config" { nativeBuildInputs = [ghc]; } (''
5757 mkdir -p $out
58− ${ghc.targetPrefix}ghc-pkg init $out/package.conf.d
58+ ${ghc.targetPrefix}ghc-pkg -v0 init $out/package.conf.d
5959
6060 ${lib.concatStringsSep "\n" (lib.mapAttrsToList flagsAndConfig {
6161 "extra-lib-dirs" = map (p: "${lib.getLib p}/lib") component.libs;
@@ -67,11 +67,11 @@ let
6767 # Note: we need to use --global-package-db with ghc-pkg to prevent it
6868 # from looking into the implicit global package db when registering the package.
6969 ${lib.concatMapStringsSep "\n" (p: ''
70− ${ghc.targetPrefix}ghc-pkg describe ${p} | ${ghc.targetPrefix}ghc-pkg --force --global-package-db $out/package.conf.d register - || true
70+ ${ghc.targetPrefix}ghc-pkg -v0 describe ${p} | ${ghc.targetPrefix}ghc-pkg -v0 --force --global-package-db $out/package.conf.d register - || true
7171 '') nonReinstallablePkgs}
7272
7373 ${lib.concatMapStringsSep "\n" (p: ''
74− ${ghc.targetPrefix}ghc-pkg --package-db ${p}/package.conf.d dump | ${ghc.targetPrefix}ghc-pkg --force --package-db $out/package.conf.d register -
74+ ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${p}/package.conf.d dump | ${ghc.targetPrefix}ghc-pkg -v0 --force --package-db $out/package.conf.d register -
7575 '') flatDepends}
7676
7777 # Note: we pass `clear` first to ensure that we never consult the implicit global package db.
@@ -115,9 +115,9 @@ let
115115 sed -i "s,dynamic-library-dirs: .*,dynamic-library-dirs: $dynamicLinksDir," $f
116116 done
117117 '' + ''
118− ${ghc.targetPrefix}ghc-pkg --package-db $out/package.conf.d recache
118+ ${ghc.targetPrefix}ghc-pkg -v0 --package-db $out/package.conf.d recache
119119 '' + ''
120− ${ghc.targetPrefix}ghc-pkg --package-db $out/package.conf.d check
120+ ${ghc.targetPrefix}ghc-pkg -v0 --package-db $out/package.conf.d check
121121 '');
122122
123123 finalConfigureFlags = lib.concatStringsSep " " (
@@ -215,8 +215,8 @@ in stdenv.mkDerivation ({
215215 $SETUP_HS copy ${lib.concatStringsSep " " component.setupInstallFlags}
216216 ${lib.optionalString (haskellLib.isLibrary componentId) ''
217217 $SETUP_HS register --gen-pkg-config=${name}.conf
218− ${ghc.targetPrefix}ghc-pkg init $out/package.conf.d
219− ${ghc.targetPrefix}ghc-pkg --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
218+ ${ghc.targetPrefix}ghc-pkg -v0 init $out/package.conf.d
219+ ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
220220 ''}
221221 ${lib.optionalString (componentId.ctype == "test") ''
222222 mkdir -p $out/${name}