From 5fbee8d2d39211758e84e8e367e5638be94d6d1a Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 20 Aug 2024 18:20:44 +0100 Subject: [PATCH] mathematica{9,10,11}: drop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These versions have been obsolete for 5 to 10 years, and have been broken since 34cd4905d1dd6aca830e95ddaecccd879e5bcf30 unless the user specifies manual overrides. Given that nobody seems to have reported an issue with them, I conclude that demand for them is minimal and that there’s no need for them to block the removal of OpenCV 2. --- .../science/math/mathematica/10.nix | 132 ---------------- .../science/math/mathematica/11.nix | 146 ------------------ .../science/math/mathematica/9.nix | 118 -------------- .../science/math/mathematica/default.nix | 8 +- .../science/math/mathematica/versions.nix | 28 ---- pkgs/top-level/aliases.nix | 3 + pkgs/top-level/all-packages.nix | 12 -- 7 files changed, 4 insertions(+), 443 deletions(-) delete mode 100644 pkgs/applications/science/math/mathematica/10.nix delete mode 100644 pkgs/applications/science/math/mathematica/11.nix delete mode 100644 pkgs/applications/science/math/mathematica/9.nix diff --git a/pkgs/applications/science/math/mathematica/10.nix b/pkgs/applications/science/math/mathematica/10.nix deleted file mode 100644 index e5ab259b8f70..000000000000 --- a/pkgs/applications/science/math/mathematica/10.nix +++ /dev/null @@ -1,132 +0,0 @@ -{ lib -, patchelf -, requireFile -, stdenv -# arguments from default.nix -, lang -, meta -, name -, src -, version -# dependencies -, alsa-lib -, coreutils -, cudaPackages -, fontconfig -, freetype -, gcc -, glib -, libuuid -, libxml2 -, ncurses -, opencv2 -, openssl -, unixODBC -, xorg -# options -, cudaSupport -}: - -let - platform = - if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then - "Linux" - else - throw "Mathematica requires i686-linux or x86_64 linux"; -in -stdenv.mkDerivation rec { - inherit meta src version; - - pname = "mathematica"; - - buildInputs = [ - coreutils - patchelf - alsa-lib - coreutils - fontconfig - freetype - gcc.cc - gcc.libc - glib - ncurses - opencv2 - openssl - unixODBC - libxml2 - libuuid - ] ++ (with xorg; [ - libX11 - libXext - libXtst - libXi - libXmu - libXrender - libxcb - libXcursor - libXfixes - libXrandr - libICE - libSM - ]); - - ldpath = lib.makeLibraryPath buildInputs - + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") - (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs); - - dontConfigure = true; - dontBuild = true; - - unpackPhase = '' - echo "=== Extracting makeself archive ===" - # find offset from file - offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) - dd if="$src" ibs=$offset skip=1 | tar -xf - - cd Unix - ''; - - installPhase = '' - cd Installer - # don't restrict PATH, that has already been done - sed -i -e 's/^PATH=/# PATH=/' MathInstaller - - echo "=== Running MathInstaller ===" - ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -platforms=${platform} -silent - ''; - - preFixup = '' - echo "=== PatchElfing away ===" - # This code should be a bit forgiving of errors, unfortunately - set +e - find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do - type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') - if [ -z "$type" ]; then - : - elif [ "$type" == "EXEC" ]; then - echo "patching $f executable <<" - patchelf --shrink-rpath "$f" - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - elif [ "$type" == "DYN" ]; then - echo "patching $f library <<" - patchelf \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - else - echo "not patching $f <<: unknown elf type" - fi - done - ''; - - # all binaries are already stripped - dontStrip = true; - - # we did this in prefixup already - dontPatchELF = true; -} diff --git a/pkgs/applications/science/math/mathematica/11.nix b/pkgs/applications/science/math/mathematica/11.nix deleted file mode 100644 index 5b9460f76e06..000000000000 --- a/pkgs/applications/science/math/mathematica/11.nix +++ /dev/null @@ -1,146 +0,0 @@ -{ lib -, patchelf -, requireFile -, stdenv -# arguments from default.nix -, lang -, meta -, name -, src -, version -# dependencies -, alsa-lib -, coreutils -, cudaPackages -, dbus -, fontconfig -, freetype -, gcc -, glib -, libGL -, libGLU -, libuuid -, libxml2 -, ncurses -, opencv2 -, openssl -, unixODBC -, xkeyboard_config -, xorg -, zlib -# options -, cudaSupport -}: - -stdenv.mkDerivation rec { - inherit meta name src version; - - buildInputs = [ - coreutils - patchelf - alsa-lib - coreutils - dbus - fontconfig - freetype - gcc.cc - gcc.libc - glib - ncurses - opencv2 - openssl - unixODBC - xkeyboard_config - libxml2 - libuuid - zlib - libGL - libGLU - ] ++ (with xorg; [ - libX11 - libXext - libXtst - libXi - libXmu - libXrender - libxcb - libXcursor - libXfixes - libXrandr - libICE - libSM - ]); - - ldpath = lib.makeLibraryPath buildInputs - + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") - (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs); - - dontConfigure = true; - dontBuild = true; - - unpackPhase = '' - echo "=== Extracting makeself archive ===" - # find offset from file - offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) - dd if="$src" ibs=$offset skip=1 | tar -xf - - cd Unix - ''; - - installPhase = '' - 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 - - echo "=== Running MathInstaller ===" - ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -silent - - # Fix library paths - cd $out/libexec/Mathematica/Executables - for path in mathematica MathKernel Mathematica WolframKernel wolfram math; do - sed -i -e 's#export LD_LIBRARY_PATH$#export LD_LIBRARY_PATH=${zlib}/lib:\''${LD_LIBRARY_PATH}#' $path - done - - # Fix xkeyboard config path for Qt - for path in mathematica Mathematica; do - line=$(grep -n QT_PLUGIN_PATH $path | sed 's/:.*//') - sed -i -e "$line iexport QT_XKB_CONFIG_ROOT=\"${xkeyboard_config}/share/X11/xkb\"" $path - done - ''; - - preFixup = '' - echo "=== PatchElfing away ===" - # This code should be a bit forgiving of errors, unfortunately - set +e - find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do - type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') - if [ -z "$type" ]; then - : - elif [ "$type" == "EXEC" ]; then - echo "patching $f executable <<" - patchelf --shrink-rpath "$f" - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - elif [ "$type" == "DYN" ]; then - echo "patching $f library <<" - patchelf \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - else - echo "not patching $f <<: unknown elf type" - fi - done - ''; - - # all binaries are already stripped - dontStrip = true; - - # we did this in prefixup already - dontPatchELF = true; -} diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix deleted file mode 100644 index c2fc07c532fc..000000000000 --- a/pkgs/applications/science/math/mathematica/9.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ lib -, patchelf -, requireFile -, stdenv -# arguments from default.nix -, lang -, meta -, name -, src -, version -# dependencies -, alsa-lib -, coreutils -, cudaPackages -, fontconfig -, freetype -, gcc -, glib -, ncurses -, opencv2 -, openssl -, unixODBC -, xorg -# options -, cudaSupport -}: - -let - platform = - if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then - "Linux" - else - throw "Mathematica requires i686-linux or x86_64 linux"; -in -stdenv.mkDerivation rec { - inherit meta src version; - pname = "mathematica"; - - buildInputs = [ - coreutils - patchelf - alsa-lib - coreutils - fontconfig - freetype - gcc.cc - gcc.libc - glib - ncurses - opencv2 - openssl - unixODBC - ] ++ (with xorg; [ - libX11 - libXext - libXtst - libXi - libXmu - libXrender - libxcb - ]); - - ldpath = lib.makeLibraryPath buildInputs - + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") - (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs); - - dontConfigure = true; - dontBuild = true; - - unpackPhase = '' - echo "=== Extracting makeself archive ===" - # find offset from file - offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) - dd if="$src" ibs=$offset skip=1 | tar -xf - - cd Unix - ''; - - installPhase = '' - cd Installer - # don't restrict PATH, that has already been done - sed -i -e 's/^PATH=/# PATH=/' MathInstaller - - echo "=== Running MathInstaller ===" - ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -platforms=${platform} -silent - ''; - - preFixup = '' - echo "=== PatchElfing away ===" - find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do - type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') - if [ -z "$type" ]; then - : - elif [ "$type" == "EXEC" ]; then - echo "patching $f executable <<" - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${ldpath}" \ - "$f" - patchelf --shrink-rpath "$f" - elif [ "$type" == "DYN" ]; then - echo "patching $f library <<" - patchelf \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - else - echo "not patching $f <<: unknown elf type" - fi - done - ''; - - # all binaries are already stripped - dontStrip = true; - - # we did this in prefixup already - dontPatchELF = true; -} diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index c4cebcd8e29a..9e2552478765 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -44,12 +44,6 @@ let versions = callPackage ./versions.nix { }; else "and with local documentation"}") else lib.head matching-versions; - specific-drv = ./. + "/${lib.versions.major found-version.version}.nix"; - - real-drv = if lib.pathExists specific-drv - then specific-drv - else ./generic.nix; - isMatching = v1: v2: let as = lib.splitVersion v1; bs = lib.splitVersion v2; @@ -64,7 +58,7 @@ let versions = callPackage ./versions.nix { }; in -callPackage real-drv { +callPackage ./generic.nix { inherit cudaSupport cudaPackages; inherit (found-version) version lang; src = if source == null then found-version.src else source; diff --git a/pkgs/applications/science/math/mathematica/versions.nix b/pkgs/applications/science/math/mathematica/versions.nix index 3bbf70433471..98e65d376b39 100644 --- a/pkgs/applications/science/math/mathematica/versions.nix +++ b/pkgs/applications/science/math/mathematica/versions.nix @@ -147,34 +147,6 @@ let versions = [ sha256 = "sha256-uftx4a/MHXLCABlv+kNFEtII+ikg4geHhDP1BOWK6dc="; installer = "Mathematica_12.0.0_LINUX.sh"; } - { - version = "11.3.0"; - lang = "en"; - language = "English"; - sha256 = "sha256-D8/iCMHqyESOe+OvC9uENwsXvZxdBmwBOSjI7pWu0Q4="; - installer = "Mathematica_11.3.0_LINUX.sh"; - } - { - version = "11.2.0"; - lang = "ja"; - language = "Japanese"; - sha256 = "sha256-kWOS7dMr7YYiI430Nd2OhkJrsEMDijM28w3xDYGbSbE="; - installer = "Mathematica_11.2.0_ja_LINUX.sh"; - } - { - version = "9.0.0"; - lang = "en"; - language = "English"; - sha256 = "sha256-mKgxdd7dLWa5EOuR5C37SeU+UC9Cv5YTbY5xSK9y34A="; - installer = "Mathematica_9.0.0_LINUX.sh"; - } - { - version = "10.0.2"; - lang = "en"; - language = "English"; - sha256 = "sha256-NHUg1jzLos1EsIr8TdYdNaA5+3jEcFqVZIr9GVVUXrQ="; - installer = "Mathematica_10.0.2_LINUX.sh"; - } ]; in diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 502ba2156d20..12ec1ecd30f2 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -933,6 +933,9 @@ mapAliases ({ marwaita-peppermint = lib.warn "marwaita-peppermint has been renamed to marwaita-red" marwaita-red; # Added 2024-07-01 marwaita-ubuntu = lib.warn "marwaita-ubuntu has been renamed to marwaita-orange" marwaita-orange; # Added 2024-07-08 masari = throw "masari has been removed as it was abandoned upstream"; # Added 2024-07-11 + mathematica9 = throw "mathematica9 has been removed as it was obsolete, broken, and depended on OpenCV 2"; # Added 2024-08-20 + mathematica10 = throw "mathematica10 has been removed as it was obsolete, broken, and depended on OpenCV 2"; # Added 2024-08-20 + mathematica11 = throw "mathematica11 has been removed as it was obsolete, broken, and depended on OpenCV 2"; # Added 2024-08-20 matrique = spectral; # Added 2020-01-27 matrixcli = throw "'matrixcli' has been removed due to being unmaintained and broken functionality. Recommend 'matrix-commander' as an alternative"; # Added 2024-03-09 matrix-recorder = throw "matrix-recorder has been removed due to being unmaintained"; # Added 2023-05-21 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6d1116db509..1abc1fb805b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37218,18 +37218,6 @@ with pkgs; cudaSupport = true; }; - mathematica9 = callPackage ../applications/science/math/mathematica { - version = "9"; - }; - - mathematica10 = callPackage ../applications/science/math/mathematica { - version = "10"; - }; - - mathematica11 = callPackage ../applications/science/math/mathematica { - version = "11"; - }; - mathmod = libsForQt5.callPackage ../applications/science/math/mathmod { }; metis = callPackage ../development/libraries/science/math/metis { };