stdenv-setup: Make the package accumulators associative arrays instead of strings

This is generally cleaner: less eval, less worrying about separators,
and probably also faster. I got the idea from that python wrapper
script.
This commit is contained in:
John Ericson
2017-07-12 15:30:56 -04:00
parent 3cb745d5a6
commit 8d76effc17
4 changed files with 16 additions and 19 deletions
@@ -211,7 +211,7 @@ stdenv.mkDerivation ({
configureFlags="${concatStringsSep " " defaultConfigureFlags} $configureFlags"
# nativePkgs defined in stdenv/setup.hs
for p in $nativePkgs; do
for p in "''${!nativePkgs[@]}"; do
if [ -d "$p/lib/${ghc.name}/package.conf.d" ]; then
cp -f "$p/lib/${ghc.name}/package.conf.d/"*.conf $packageConfDir/
continue