giac: 1.5.0-87 -> 1.6.0-47

+27 -16
+27 -16
pkgs/applications/science/math/giac/default.nix
··· 2 , gmp, mpfr, pari, ntl, gsl, mpfi, ecm, glpk, nauty 3 , readline, gettext, libpng, libao, gfortran, perl 4 , enableGUI ? false, libGL, libGLU, xorg, fltk 5 }: 6 7 assert (!blas.isILP64) && (!lapack.isILP64); 8 9 stdenv.mkDerivation rec { 10 pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; 11 - version = "1.5.0-87"; # TODO try to remove preCheck phase on upgrade 12 13 src = fetchurl { 14 url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz"; 15 - sha256 = "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv"; 16 }; 17 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: 21 (fetchpatch { 22 - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/nofltk-check.patch?id=7553a3c8dfa7bcec07241a07e6a4e7dcf5bb4f26"; 23 sha256 = "0xkmfc028vg5w6va04gp2x2iv31n8v4shd6vbyvk4blzgfmpj2cw"; 24 }) 25 ]; 26 27 postPatch = '' 28 - for i in doc/*/Makefile*; do 29 substituteInPlace "$i" --replace "/bin/cp" "cp"; 30 done; 31 ''; 32 33 nativeBuildInputs = [ ··· 44 lapack blas 45 ] ++ lib.optionals enableGUI [ 46 libGL libGLU fltk xorg.libX11 47 - ]; 48 49 /* fixes: 50 configure:16211: checking for main in -lntl ··· 58 outputs = [ "out" ] ++ lib.optional (!enableGUI) "doc"; 59 60 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 68 ''; 69 70 enableParallelBuilding = true; ··· 75 "--enable-ao" "--enable-ecm" "--enable-glpk" 76 ] ++ lib.optionals enableGUI [ 77 "--enable-gui" "--with-x" 78 - ]; 79 80 postInstall = '' 81 # example Makefiles contain the full path to some commands
··· 2 , gmp, mpfr, pari, ntl, gsl, mpfi, ecm, glpk, nauty 3 , readline, gettext, libpng, libao, gfortran, perl 4 , enableGUI ? false, libGL, libGLU, xorg, fltk 5 + , enableMicroPy ? false, python3 6 }: 7 8 assert (!blas.isILP64) && (!lapack.isILP64); 9 10 stdenv.mkDerivation rec { 11 pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; 12 + version = "1.6.0-47"; # TODO try to remove preCheck phase on upgrade 13 14 src = fetchurl { 15 url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz"; 16 + sha256 = "sha256-c5A9/I6L/o3Y3dxEPoTKpw/fJqYMr6euLldaQ1HWT5c="; 17 }; 18 19 + patches = [ 20 (fetchpatch { 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"; 31 sha256 = "0xkmfc028vg5w6va04gp2x2iv31n8v4shd6vbyvk4blzgfmpj2cw"; 32 }) 33 ]; 34 35 postPatch = '' 36 + for i in doc/*/Makefile* micropython*/xcas/Makefile*; do 37 substituteInPlace "$i" --replace "/bin/cp" "cp"; 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* 43 ''; 44 45 nativeBuildInputs = [ ··· 56 lapack blas 57 ] ++ lib.optionals enableGUI [ 58 libGL libGLU fltk xorg.libX11 59 + ] ++ lib.optional enableMicroPy python3; 60 61 /* fixes: 62 configure:16211: checking for main in -lntl ··· 70 outputs = [ "out" ] ++ lib.optional (!enableGUI) "doc"; 71 72 doCheck = true; 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 79 ''; 80 81 enableParallelBuilding = true; ··· 86 "--enable-ao" "--enable-ecm" "--enable-glpk" 87 ] ++ lib.optionals enableGUI [ 88 "--enable-gui" "--with-x" 89 + ] ++ lib.optional (!enableMicroPy) "--disable-micropy"; 90 91 postInstall = '' 92 # example Makefiles contain the full path to some commands