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:
parent
9824ca6975
commit
79df9105ba
63
pkgs/applications/science/math/giac/default.nix
Normal file
63
pkgs/applications/science/math/giac/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue