git.iko.soy/typeable/nixpkgs
on master help sign in
singular: Wrap executables instead of symlinking

This way config scripts can fidn out their own location

commit36804c75e484810173ed448a55f20c5c77ef628d authorMichael Raskin <7c6f434c@mail.ru> dateSat 15 Oct 2016, 15:28 (10 years ago) parent2bed05d
1 file changed+5−1
pkgs/applications/science/math/singular/default.nix+5−1
pkgs/applications/science/math/singular/default.nix+5−1
@@ -33,7 +33,11 @@ stdenv.mkDerivation rec {
3333 binaries="$(find "$out"/* \( -type f -o -type l \) -perm -111 \! -name '*.so' -maxdepth 1)"
3434 ln -s "$out"/*/{include,lib} "$out"
3535 mkdir -p "$out/bin"
36− ln -s $binaries "$out/bin"
36+ for b in $binaries; do
37+ bbn="$(basename "$b")"
38+ echo -e '#! ${stdenv.shell}\n"'"$b"'" "$@"' > "$out/bin/$bbn"
39+ chmod a+x "$out/bin/$bbn"
40+ done
3741 '';
3842
3943 enableParallelBuild = true;