Loading pkgs/applications/science/math/gap/default.nix +8 −0 Original line number Diff line number Diff line { stdenv , lib , fetchpatch , fetchurl , makeWrapper , readline Loading Loading @@ -73,6 +74,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-ZyMIdF63iiIklO6N1nhu3VvDMUVvzGRWrAZL2yjVh6g="; }; patches = [ (fetchpatch { url = "https://github.com/gap-system/gap/commit/c786e229413a44b7462196716b99ae9bb0071f4c.patch"; hash = "sha256-g3jrEMSavHAUKlHoPqWmOw49hWHU+29SA788Klnr0Uw="; }) ]; # remove all non-essential packages (which take up a lot of space) preConfigure = lib.optionalString (!keepAll) (removeNonWhitelistedPkgs packagesToKeep) + '' patchShebangs . Loading pkgs/applications/science/math/gfan/default.nix +7 −1 Original line number Diff line number Diff line {lib, stdenv, fetchurl, gmp, mpir, cddlib}: {lib, stdenv, fetchpatch, fetchurl, gmp, mpir, cddlib}: stdenv.mkDerivation rec { pname = "gfan"; version = "0.6.2"; Loading @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { patches = [ ./gfan-0.6.2-cddlib-prefix.patch ] ++ lib.optionals (stdenv.cc.isClang) [ (fetchpatch { name = "clang-fix-miscompilation.patch"; url = "https://raw.githubusercontent.com/sagemath/sage/eea1f59394a5066e9acd8ae39a90302820914ee3/build/pkgs/gfan/patches/nodel.patch"; sha256 = "sha256-RrncSgFyrBIk/Bwe3accxiJ2rpOSJKQ84cV/uBvQsDc="; }) ]; postPatch = lib.optionalString stdenv.cc.isClang '' Loading pkgs/applications/science/math/giac/default.nix +31 −8 Original line number Diff line number Diff line Loading @@ -9,18 +9,30 @@ assert (!blas.isILP64) && (!lapack.isILP64); stdenv.mkDerivation rec { pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; version = "1.9.0-43"; # TODO try to remove preCheck phase on upgrade version = "1.9.0-993"; # TODO try to remove preCheck phase on upgrade src = fetchurl { url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz"; sha256 = "sha256-466jB8ZRqHkU5XCY+j0Fh7Dq/mMaOu10rHECKbtNGrs="; sha256 = "sha256-pqytFWrSWfEwQqRdRbaigGCq68s8mdgj2j8M+kclslE="; }; patches = [ ./remove-old-functional-patterns.patch ./fix-fltk-guard.patch (fetchpatch { name = "pari_2_15.patch"; url = "https://raw.githubusercontent.com/sagemath/sage/07a2afd65fb4b0a1c9cbc43ede7d4a18c921a000/build/pkgs/giac/patches/pari_2_15.patch"; sha256 = "sha256-Q3xBFED7XEAyNz6AHjzt63XtospmdGAIdS6iPq1C2UE="; }) (fetchpatch { name = "pari_2_11.patch"; url = "https://raw.githubusercontent.com/sagemath/sage/21ba7540d385a9864b44850d6987893dfa16bfc0/build/pkgs/giac/patches/pari_2_11.patch"; sha256 = "sha256-vEo/5MNzMdYRPWgLFPsDcMT1W80Qzj4EPBjx/B8j68k="; name = "infinity.patch"; url = "https://github.com/geogebra/giac/commit/851c2cd91e879c79d6652f8a5d5bed03b65c6d39.patch"; sha256 = "sha256-WJRT2b8I9kgAkRuIugMiXoF4hT7yR7qyad8A6IspNTM="; stripLen = 5; extraPrefix = "/src/"; excludes = [ "src/kdisplay.cc" ]; }) # giac calls scanf/printf with non-constant first arguments, which Loading @@ -31,8 +43,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-r+M+9MRPRqhHcdhYWI6inxyNvWbXUbBcPCeDY7aulvk="; }) # increase pari stack size for test chk_fhan{4,6} ./increase-pari-stack-size.patch # issue with include path precedence (fetchpatch { name = "fix_implicit_declaration.patch"; url = "https://salsa.debian.org/science-team/giac/-/raw/c05ae9b9e74d3c6ee6411d391071989426a76201/debian/patches/fix_implicit_declaration.patch"; sha256 = "sha256-ompUceYJLiL0ftfjBkIMcYvX1YqG2/XA7e1yDyFY0IY="; }) ] ++ lib.optionals (!enableGUI) [ # when enableGui is false, giac is compiled without fltk. That # means some outputs differ in the make check. Patch around this: Loading Loading @@ -86,6 +102,12 @@ stdenv.mkDerivation rec { # when fltk is disabled. disable these tests for now. echo > check/chk_fhan2 echo > check/chk_fhan9 '' + lib.optionalString (stdenv.isDarwin) '' # these cover a known regression in giac, likely due to how pari state # is shared between multiple giac instances (see pari.cc.old). # see https://github.com/NixOS/nixpkgs/pull/264126 for more information echo > check/chk_fhan4 echo > check/chk_fhan6 ''; enableParallelBuilding = true; Loading @@ -96,6 +118,8 @@ stdenv.mkDerivation rec { "--enable-ao" "--enable-ecm" "--enable-glpk" ] ++ lib.optionals enableGUI [ "--enable-gui" "--with-x" ] ++ lib.optionals stdenv.isDarwin [ "--disable-nls" ] ++ lib.optionals (!enableGUI) [ "--disable-fltk" ] ++ lib.optionals (!enableMicroPy) [ Loading Loading @@ -129,7 +153,6 @@ stdenv.mkDerivation rec { homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"; license = licenses.gpl3Plus; platforms = platforms.linux ++ (optionals (!enableGUI) platforms.darwin); broken = stdenv.isDarwin && stdenv.isAarch64; maintainers = [ maintainers.symphorien ]; }; } pkgs/applications/science/math/giac/fix-fltk-guard.patch 0 → 100644 +28 −0 Original line number Diff line number Diff line From c7eafa2d7bde0d735b125912542acec2d5896c17 Mon Sep 17 00:00:00 2001 From: George Huebner <george@feyor.sh> Date: Sat, 20 Jul 2024 02:31:20 -0500 Subject: [PATCH 3/4] remove erroneous HAVE_LIBFLTK guard --- src/icas.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/icas.cc b/src/icas.cc index f91885b..17a0373 100644 --- a/src/icas.cc +++ b/src/icas.cc @@ -2407,11 +2407,7 @@ int main(int ARGC, char *ARGV[]){ #ifdef __APPLE__ startc=clock(); #endif -#ifdef HAVE_LIBFLTK xcas::icas_eval(gq,e,reading_file,filename,contextptr); -#else - e=eval(gq,1,contextptr); -#endif #ifdef __APPLE__ startc=clock()-startc; #endif -- 2.44.1 pkgs/applications/science/math/giac/increase-pari-stack-size.patchdeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line diff -ur a/check/chk_fhan4 b/check/chk_fhan4 --- a/check/chk_fhan4 2018-03-13 19:27:11.000000000 +0100 +++ b/check/chk_fhan4 2023-05-20 16:31:30.349063063 +0200 @@ -1,4 +1,5 @@ #! /bin/sh unset LANG +export PARI_SIZE=2048000 ../src/icas TP04-sol.cas > TP04.tst diff TP04.tst TP04-sol.cas.out1 diff -ur a/check/chk_fhan6 b/check/chk_fhan6 --- a/check/chk_fhan6 2018-03-13 19:27:21.000000000 +0100 +++ b/check/chk_fhan6 2023-05-20 16:32:04.199407065 +0200 @@ -1,4 +1,5 @@ #! /bin/sh unset LANG +export PARI_SIZE=2048000 ../src/icas TP06-sol.cas > TP06.tst diff TP06.tst TP06-sol.cas.out1 Loading
pkgs/applications/science/math/gap/default.nix +8 −0 Original line number Diff line number Diff line { stdenv , lib , fetchpatch , fetchurl , makeWrapper , readline Loading Loading @@ -73,6 +74,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-ZyMIdF63iiIklO6N1nhu3VvDMUVvzGRWrAZL2yjVh6g="; }; patches = [ (fetchpatch { url = "https://github.com/gap-system/gap/commit/c786e229413a44b7462196716b99ae9bb0071f4c.patch"; hash = "sha256-g3jrEMSavHAUKlHoPqWmOw49hWHU+29SA788Klnr0Uw="; }) ]; # remove all non-essential packages (which take up a lot of space) preConfigure = lib.optionalString (!keepAll) (removeNonWhitelistedPkgs packagesToKeep) + '' patchShebangs . Loading
pkgs/applications/science/math/gfan/default.nix +7 −1 Original line number Diff line number Diff line {lib, stdenv, fetchurl, gmp, mpir, cddlib}: {lib, stdenv, fetchpatch, fetchurl, gmp, mpir, cddlib}: stdenv.mkDerivation rec { pname = "gfan"; version = "0.6.2"; Loading @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { patches = [ ./gfan-0.6.2-cddlib-prefix.patch ] ++ lib.optionals (stdenv.cc.isClang) [ (fetchpatch { name = "clang-fix-miscompilation.patch"; url = "https://raw.githubusercontent.com/sagemath/sage/eea1f59394a5066e9acd8ae39a90302820914ee3/build/pkgs/gfan/patches/nodel.patch"; sha256 = "sha256-RrncSgFyrBIk/Bwe3accxiJ2rpOSJKQ84cV/uBvQsDc="; }) ]; postPatch = lib.optionalString stdenv.cc.isClang '' Loading
pkgs/applications/science/math/giac/default.nix +31 −8 Original line number Diff line number Diff line Loading @@ -9,18 +9,30 @@ assert (!blas.isILP64) && (!lapack.isILP64); stdenv.mkDerivation rec { pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; version = "1.9.0-43"; # TODO try to remove preCheck phase on upgrade version = "1.9.0-993"; # TODO try to remove preCheck phase on upgrade src = fetchurl { url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz"; sha256 = "sha256-466jB8ZRqHkU5XCY+j0Fh7Dq/mMaOu10rHECKbtNGrs="; sha256 = "sha256-pqytFWrSWfEwQqRdRbaigGCq68s8mdgj2j8M+kclslE="; }; patches = [ ./remove-old-functional-patterns.patch ./fix-fltk-guard.patch (fetchpatch { name = "pari_2_15.patch"; url = "https://raw.githubusercontent.com/sagemath/sage/07a2afd65fb4b0a1c9cbc43ede7d4a18c921a000/build/pkgs/giac/patches/pari_2_15.patch"; sha256 = "sha256-Q3xBFED7XEAyNz6AHjzt63XtospmdGAIdS6iPq1C2UE="; }) (fetchpatch { name = "pari_2_11.patch"; url = "https://raw.githubusercontent.com/sagemath/sage/21ba7540d385a9864b44850d6987893dfa16bfc0/build/pkgs/giac/patches/pari_2_11.patch"; sha256 = "sha256-vEo/5MNzMdYRPWgLFPsDcMT1W80Qzj4EPBjx/B8j68k="; name = "infinity.patch"; url = "https://github.com/geogebra/giac/commit/851c2cd91e879c79d6652f8a5d5bed03b65c6d39.patch"; sha256 = "sha256-WJRT2b8I9kgAkRuIugMiXoF4hT7yR7qyad8A6IspNTM="; stripLen = 5; extraPrefix = "/src/"; excludes = [ "src/kdisplay.cc" ]; }) # giac calls scanf/printf with non-constant first arguments, which Loading @@ -31,8 +43,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-r+M+9MRPRqhHcdhYWI6inxyNvWbXUbBcPCeDY7aulvk="; }) # increase pari stack size for test chk_fhan{4,6} ./increase-pari-stack-size.patch # issue with include path precedence (fetchpatch { name = "fix_implicit_declaration.patch"; url = "https://salsa.debian.org/science-team/giac/-/raw/c05ae9b9e74d3c6ee6411d391071989426a76201/debian/patches/fix_implicit_declaration.patch"; sha256 = "sha256-ompUceYJLiL0ftfjBkIMcYvX1YqG2/XA7e1yDyFY0IY="; }) ] ++ lib.optionals (!enableGUI) [ # when enableGui is false, giac is compiled without fltk. That # means some outputs differ in the make check. Patch around this: Loading Loading @@ -86,6 +102,12 @@ stdenv.mkDerivation rec { # when fltk is disabled. disable these tests for now. echo > check/chk_fhan2 echo > check/chk_fhan9 '' + lib.optionalString (stdenv.isDarwin) '' # these cover a known regression in giac, likely due to how pari state # is shared between multiple giac instances (see pari.cc.old). # see https://github.com/NixOS/nixpkgs/pull/264126 for more information echo > check/chk_fhan4 echo > check/chk_fhan6 ''; enableParallelBuilding = true; Loading @@ -96,6 +118,8 @@ stdenv.mkDerivation rec { "--enable-ao" "--enable-ecm" "--enable-glpk" ] ++ lib.optionals enableGUI [ "--enable-gui" "--with-x" ] ++ lib.optionals stdenv.isDarwin [ "--disable-nls" ] ++ lib.optionals (!enableGUI) [ "--disable-fltk" ] ++ lib.optionals (!enableMicroPy) [ Loading Loading @@ -129,7 +153,6 @@ stdenv.mkDerivation rec { homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"; license = licenses.gpl3Plus; platforms = platforms.linux ++ (optionals (!enableGUI) platforms.darwin); broken = stdenv.isDarwin && stdenv.isAarch64; maintainers = [ maintainers.symphorien ]; }; }
pkgs/applications/science/math/giac/fix-fltk-guard.patch 0 → 100644 +28 −0 Original line number Diff line number Diff line From c7eafa2d7bde0d735b125912542acec2d5896c17 Mon Sep 17 00:00:00 2001 From: George Huebner <george@feyor.sh> Date: Sat, 20 Jul 2024 02:31:20 -0500 Subject: [PATCH 3/4] remove erroneous HAVE_LIBFLTK guard --- src/icas.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/icas.cc b/src/icas.cc index f91885b..17a0373 100644 --- a/src/icas.cc +++ b/src/icas.cc @@ -2407,11 +2407,7 @@ int main(int ARGC, char *ARGV[]){ #ifdef __APPLE__ startc=clock(); #endif -#ifdef HAVE_LIBFLTK xcas::icas_eval(gq,e,reading_file,filename,contextptr); -#else - e=eval(gq,1,contextptr); -#endif #ifdef __APPLE__ startc=clock()-startc; #endif -- 2.44.1
pkgs/applications/science/math/giac/increase-pari-stack-size.patchdeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line diff -ur a/check/chk_fhan4 b/check/chk_fhan4 --- a/check/chk_fhan4 2018-03-13 19:27:11.000000000 +0100 +++ b/check/chk_fhan4 2023-05-20 16:31:30.349063063 +0200 @@ -1,4 +1,5 @@ #! /bin/sh unset LANG +export PARI_SIZE=2048000 ../src/icas TP04-sol.cas > TP04.tst diff TP04.tst TP04-sol.cas.out1 diff -ur a/check/chk_fhan6 b/check/chk_fhan6 --- a/check/chk_fhan6 2018-03-13 19:27:21.000000000 +0100 +++ b/check/chk_fhan6 2023-05-20 16:32:04.199407065 +0200 @@ -1,4 +1,5 @@ #! /bin/sh unset LANG +export PARI_SIZE=2048000 ../src/icas TP06-sol.cas > TP06.tst diff TP06.tst TP06-sol.cas.out1