mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
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)"
|
||||
ln -s "$out"/*/{include,lib} "$out"
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue