giac: 1.5.0-87 -> 1.6.0-47

+27 -16
+27 -16
pkgs/applications/science/math/giac/default.nix
··· 2 2 , gmp, mpfr, pari, ntl, gsl, mpfi, ecm, glpk, nauty 3 3 , readline, gettext, libpng, libao, gfortran, perl 4 4 , enableGUI ? false, libGL, libGLU, xorg, fltk 5 + , enableMicroPy ? false, python3 5 6 }: 6 7 7 8 assert (!blas.isILP64) && (!lapack.isILP64); 8 9 9 10 stdenv.mkDerivation rec { 10 11 pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; 11 - version = "1.5.0-87"; # TODO try to remove preCheck phase on upgrade 12 + version = "1.6.0-47"; # TODO try to remove preCheck phase on upgrade 12 13 13 14 src = fetchurl { 14 15 url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz"; 15 - sha256 = "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv"; 16 + sha256 = "sha256-c5A9/I6L/o3Y3dxEPoTKpw/fJqYMr6euLldaQ1HWT5c="; 16 17 }; 17 18 18 - patches = lib.optionals (!enableGUI) [ 19 - # when enableGui is false, giac is compiled without fltk. That means some 20 - # outputs differ in the make check. Patch around this: 19 + patches = [ 21 20 (fetchpatch { 22 - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/nofltk-check.patch?id=7553a3c8dfa7bcec07241a07e6a4e7dcf5bb4f26"; 21 + name = "pari_2_11.patch"; 22 + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/pari_2_11.patch?id=21ba7540d385a9864b44850d6987893dfa16bfc0"; 23 + sha256 = "sha256-vEo/5MNzMdYRPWgLFPsDcMT1W80Qzj4EPBjx/B8j68k="; 24 + }) 25 + ] ++ lib.optionals (!enableGUI) [ 26 + # when enableGui is false, giac is compiled without fltk. That 27 + # means some outputs differ in the make check. Patch around this: 28 + (fetchpatch { 29 + name = "nofltk-check.patch"; 30 + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/nofltk-check.patch?id=7553a3c8dfa7bcec07241a07e6a4e7dcf5bb4f26"; 23 31 sha256 = "0xkmfc028vg5w6va04gp2x2iv31n8v4shd6vbyvk4blzgfmpj2cw"; 24 32 }) 25 33 ]; 26 34 27 35 postPatch = '' 28 - for i in doc/*/Makefile*; do 36 + for i in doc/*/Makefile* micropython*/xcas/Makefile*; do 29 37 substituteInPlace "$i" --replace "/bin/cp" "cp"; 30 38 done; 39 + '' + 40 + # workaround for 1.6.0-47, should not be necessary in future versions 41 + lib.optionalString (!enableMicroPy) '' 42 + sed -i -e 's/micropython-[0-9.]* //' Makefile* 31 43 ''; 32 44 33 45 nativeBuildInputs = [ ··· 44 56 lapack blas 45 57 ] ++ lib.optionals enableGUI [ 46 58 libGL libGLU fltk xorg.libX11 47 - ]; 59 + ] ++ lib.optional enableMicroPy python3; 48 60 49 61 /* fixes: 50 62 configure:16211: checking for main in -lntl ··· 58 70 outputs = [ "out" ] ++ lib.optional (!enableGUI) "doc"; 59 71 60 72 doCheck = true; 61 - preCheck = '' 62 - # One test in this file fails. That test just tests a part of the pari 63 - # interface that isn't actually used in giac. Of course it would be better 64 - # to only remove that one test, but that would require a patch. 65 - # Removing the whole test set should be good enough for now. 66 - # Upstream report: https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=2102#p10326 67 - echo > check/chk_fhan11 73 + preCheck = lib.optionalString (!enableGUI) '' 74 + # even with the nofltk patch, some changes in src/misc.cc (grep 75 + # for HAVE_LIBFLTK) made it so that giac behaves differently 76 + # when fltk is disabled. disable these tests for now. 77 + echo > check/chk_fhan2 78 + echo > check/chk_fhan9 68 79 ''; 69 80 70 81 enableParallelBuilding = true; ··· 75 86 "--enable-ao" "--enable-ecm" "--enable-glpk" 76 87 ] ++ lib.optionals enableGUI [ 77 88 "--enable-gui" "--with-x" 78 - ]; 89 + ] ++ lib.optional (!enableMicroPy) "--disable-micropy"; 79 90 80 91 postInstall = '' 81 92 # example Makefiles contain the full path to some commands