Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

giac, xcas: init at 1.4.9 #29947

Merged
merged 3 commits into from
Sep 30, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions pkgs/applications/science/math/giac/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add maintainers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
3 changes: 3 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down