From 339f72586a39bbffb5b149bd5367d971349796a4 Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Thu, 17 Nov 2022 22:41:41 -0300 Subject: [PATCH] giac: 1.9.0-5 -> 1.9.0-29 --- .../science/math/giac/default.nix | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/math/giac/default.nix b/pkgs/applications/science/math/giac/default.nix index 434291861d67..ce5eb3626e28 100644 --- a/pkgs/applications/science/math/giac/default.nix +++ b/pkgs/applications/science/math/giac/default.nix @@ -9,11 +9,11 @@ assert (!blas.isILP64) && (!lapack.isILP64); stdenv.mkDerivation rec { pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; - version = "1.9.0-5"; # TODO try to remove preCheck phase on upgrade + version = "1.9.0-29"; # 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-EP8wRi8QZPrr1lfKN6da87s1FCy8AuDYbzcvsJCWyLE="; + sha256 = "sha256-9jUVcsrV8jMfqrmnymZ4vIaWlabF9ppCuq7VDlZ5Cw4="; }; patches = [ @@ -22,13 +22,28 @@ stdenv.mkDerivation rec { url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/pari_2_11.patch?id=21ba7540d385a9864b44850d6987893dfa16bfc0"; sha256 = "sha256-vEo/5MNzMdYRPWgLFPsDcMT1W80Qzj4EPBjx/B8j68k="; }) + + # giac calls scanf/printf with non-constant first arguments, which + # the compiler rightfully warns about (with an error nowadays). + (fetchpatch { + name = "fix-string-compiler-error.patch"; + url = "https://salsa.debian.org/science-team/giac/-/raw/08cb807ef41f5216b712928886ebf74f69d5ddf6/debian/patches/fix-string-compiler-error.patch"; + sha256 = "sha256-K4KAJY1F9Y4DTZFmVEOCXTnxBmHo4//3A10UR3Wlliw="; + }) + + # increase pari stack size for test chk_fhan4 + (fetchpatch { + name = "increase-pari-stack-size.patch"; + url = "https://salsa.debian.org/science-team/giac/-/raw/08cb807ef41f5216b712928886ebf74f69d5ddf6/debian/patches/increase-pari-size.patch"; + sha256 = "sha256-764P0IJ7ndURap7hotOmYJK0wAhYdqMbQNOnhJxVNt0="; + }) ] ++ lib.optionals (!enableGUI) [ # when enableGui is false, giac is compiled without fltk. That # means some outputs differ in the make check. Patch around this: (fetchpatch { name = "nofltk-check.patch"; url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/nofltk-check.patch?id=7553a3c8dfa7bcec07241a07e6a4e7dcf5bb4f26"; - sha256 = "0xkmfc028vg5w6va04gp2x2iv31n8v4shd6vbyvk4blzgfmpj2cw"; + sha256 = "sha256-nAl5q3ufLjK3X9s0qMlGNowdRRf3EaC24eVtJABzdXY="; }) ]; @@ -85,7 +100,11 @@ stdenv.mkDerivation rec { "--enable-ao" "--enable-ecm" "--enable-glpk" ] ++ lib.optionals enableGUI [ "--enable-gui" "--with-x" - ] ++ lib.optional (!enableMicroPy) "--disable-micropy"; + ] ++ lib.optionals (!enableGUI) [ + "--disable-fltk" + ] ++ lib.optionals (!enableMicroPy) [ + "--disable-micropy" + ]; postInstall = '' # example Makefiles contain the full path to some commands