haskell-packages: fix all-cabal-hashes component lookup

Previously, if a package name in a later component was a substring of a package name in an earlier component, the earlier component would be selected due to a partial-name match.  This commit prevents partial matches.
This commit is contained in:
Ryan Trinkle 2017-10-24 09:42:22 -04:00
parent 646a77739b
commit 160685725e

View File

@ -122,7 +122,7 @@ let
'' ''
set +o pipefail set +o pipefail
for component in ${all-cabal-hashes}/*; do for component in ${all-cabal-hashes}/*; do
if ls $component | grep -q ${name}; then if ls $component | grep -q "^${name}$"; then
echo "builtins.storePath $component" > $out echo "builtins.storePath $component" > $out
exit 0 exit 0
fi fi