1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00

giac, xcas: init at 1.4.9

This commit is contained in:
Symphorien Gibol 2017-09-30 11:33:14 +02:00
parent 9824ca6975
commit 79df9105ba
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,63 @@
{stdenv, fetchurl, gmp, mpfr, pari, ntl, gsl, blas,
readline, gettext, liblapackWithAtlas, bison, yacc, flex,
mpfi, libpng, libao, gfortran, texlive, hevea, perl,
enableGui ? true, mesa ? null, xorg ? null, fltk ? null,
}:
assert enableGui -> mesa != null && xorg != null && fltk != null;
stdenv.mkDerivation rec {
name = "giac-${version}";
version = "1.4.9";
src = fetchurl {
url = "https://www-fourier.ujf-grenoble.fr/~parisse/giac/${name}.tar.bz2";
sha256 = "1n7xxgpqrsq7cv5wgcmgag6jvxw5wijkf1yv1r5aizlf1rc7dhai";
};
patchPhase = ''
for i in doc/*/Makefile* ; do
substituteInPlace "$i" --replace "/bin/cp" "cp";
done;
'';
nativeBuildInputs = [
texlive.combined.scheme-small hevea
];
buildInputs = [
gmp mpfr pari ntl gsl mpfi liblapackWithAtlas bison yacc flex readline
gettext blas libpng gfortran perl
] ++ stdenv.lib.optionals enableGui [
mesa fltk xorg.libX11
];
enableParallelBuilding = true;
hardeningDisable = [ "format" "bindnow" "relro" ];
configureFlags = [
"--enable-gc" "--enable-png" "--enable-gsl" "--enable-lapack"
"--enable-pari" "--enable-ntl" "--enable-gmpxx" # "--enable-cocoa"
"--enable-ao" ] ++ stdenv.lib.optionals enableGui [
"--enable-gui" "--with-x"
];
postInstall = ''
# example Makefiles contain the full path to some commands
# notably texlive, and we don't want texlive to become a runtime
# dependency
for file in $(find $out -name Makefile) ; do
sed -i "s@/nix/store/[^/]*/bin/@@" "$file" ;
done;
'';
meta = with stdenv.lib; {
description = "A free computer algebra system (CAS)";
homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html";
license = licenses.gpl3Plus;
## xcas is buildable on darwin but there are specific instructions I could
## not test
platforms = platforms.linux;
};
}

View file

@ -18435,6 +18435,9 @@ with pkgs;
gfan = callPackage ../applications/science/math/gfan {};
xcas = callPackage ../applications/science/math/giac { };
giac = xcas.override { enableGui = false;};
ginac = callPackage ../applications/science/math/ginac { };
glucose = callPackage ../applications/science/logic/glucose { };