mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
mathematica: prefer substituteInPlace over sed
Reduces the amount of escaping needed for these literal string replacements.
This commit is contained in:
@@ -90,10 +90,15 @@ stdenv.mkDerivation rec {
|
||||
cd Installer
|
||||
# don't restrict PATH, that has already been done
|
||||
sed -i -e 's/^PATH=/# PATH=/' MathInstaller
|
||||
sed -i -e 's/\/bin\/bash/\/bin\/sh/' MathInstaller
|
||||
|
||||
# Fix the installation script as follows:
|
||||
# 1. Adjust the shebang
|
||||
# 2. Use the wrapper in the desktop items
|
||||
substituteInPlace MathInstaller \
|
||||
--replace "/bin/bash" "/bin/sh" \
|
||||
--replace "Executables/Mathematica" "../../bin/mathematica"
|
||||
|
||||
# Install the desktop items
|
||||
sed -i -e 's/Executables\/Mathematica/..\/..\/bin\/mathematica/' MathInstaller
|
||||
export XDG_DATA_HOME="$out/share"
|
||||
|
||||
echo "=== Running MathInstaller ==="
|
||||
|
||||
Reference in New Issue
Block a user