diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-07-11 16:04:14 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-07-12 15:30:56 -0400 |
commit | 8d76effc178747f0c8f456fe619c1b014736a6af (patch) | |
tree | d833ef116289f001853ec787a0ee6d91ffd776cc /pkgs/development | |
parent | 3cb745d5a69018829ac15f7d5a508135f6bda123 (diff) | |
download | nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.gz nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.bz2 nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.lz nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.xz nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.zst nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.zip |
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.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 2 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/wrap.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index e097fd5af33e..a8da63493a43 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -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 diff --git a/pkgs/development/interpreters/python/wrap.sh b/pkgs/development/interpreters/python/wrap.sh index 1c74e612b559..4b9b2024981a 100644 --- a/pkgs/development/interpreters/python/wrap.sh +++ b/pkgs/development/interpreters/python/wrap.sh @@ -86,7 +86,7 @@ wrapPythonProgramsIn() { _addToPythonPath() { local dir="$1" # Stop if we've already visited here. - if [ -n "${pythonPathsSeen[$dir]}" ]; then return; fi + [ -n "${pythonPathsSeen[$dir]}" ] || return 0 pythonPathsSeen[$dir]=1 # addToSearchPath is defined in stdenv/generic/setup.sh. It will have # the effect of calling `export program_X=$dir/...:$program_X`. |