singular: Wrap executables instead of symlinking
This way config scripts can fidn out their own location
This commit is contained in:
parent
2bed05d8e1
commit
36804c75e4
@ -33,7 +33,11 @@ stdenv.mkDerivation rec {
|
|||||||
binaries="$(find "$out"/* \( -type f -o -type l \) -perm -111 \! -name '*.so' -maxdepth 1)"
|
binaries="$(find "$out"/* \( -type f -o -type l \) -perm -111 \! -name '*.so' -maxdepth 1)"
|
||||||
ln -s "$out"/*/{include,lib} "$out"
|
ln -s "$out"/*/{include,lib} "$out"
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
ln -s $binaries "$out/bin"
|
for b in $binaries; do
|
||||||
|
bbn="$(basename "$b")"
|
||||||
|
echo -e '#! ${stdenv.shell}\n"'"$b"'" "$@"' > "$out/bin/$bbn"
|
||||||
|
chmod a+x "$out/bin/$bbn"
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuild = true;
|
enableParallelBuild = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user