pass: support extensions with $out/bin

An example for that would be `passExtensions.pass-import` where
`pimport` is available in `$out/bin`. In that case, `$out/bin` in
`buildEnv` isn't a symlink anymore and doesn't need to be removed.

Co-authored-by: elseym <elseym@me.com>
This commit is contained in:
Maximilian Bosch 2020-12-04 22:31:50 +01:00
parent 2b674912b4
commit 05348ed503
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -34,11 +34,15 @@ let
postBuild = ''
files=$(find $out/bin/ -type f -exec readlink -f {} \;)
rm $out/bin
mkdir $out/bin
if [ -L $out/bin ]; then
rm $out/bin
mkdir $out/bin
fi
for i in $files; do
ln -sf $i $out/bin/$(basename $i)
if ! [ "$(readlink -f "$out/bin/$(basename $i)")" = "$i" ]; then
ln -sf $i $out/bin/$(basename $i)
fi
done
wrapProgram $out/bin/pass \