about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/giac/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/giac/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/science/math/giac/default.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/giac/default.nix b/nixpkgs/pkgs/applications/science/math/giac/default.nix
index 90b1b367a7c4..b3777528ecda 100644
--- a/nixpkgs/pkgs/applications/science/math/giac/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/giac/default.nix
@@ -1,14 +1,13 @@
-{ stdenv, fetchurl, fetchpatch, texlive, bison, flex, liblapack
+{ stdenv, lib, fetchurl, fetchpatch, texlive, bison, flex, liblapack
 , gmp, mpfr, pari, ntl, gsl, blas, mpfi, ecm, glpk, nauty
 , readline, gettext, libpng, libao, gfortran, perl
-, enableGUI ? false, libGLU_combined ? null, xorg ? null, fltk ? null
+, enableGUI ? false, libGL ? null, libGLU ? null, xorg ? null, fltk ? null
 }:
 
-assert enableGUI -> libGLU_combined != null && xorg != null && fltk != null;
+assert enableGUI -> libGLU != null && libGL != null && xorg != null && fltk != null;
 
 stdenv.mkDerivation rec {
-  name = "${attr}-${version}";
-  attr = if enableGUI then "giac-with-xcas" else "giac";
+  pname = "giac${lib.optionalString enableGUI "-with-xcas"}";
   version = "1.5.0-21"; # TODO try to remove preCheck phase on upgrade
 
   src = fetchurl {
@@ -44,7 +43,7 @@ stdenv.mkDerivation rec {
     (stdenv.lib.getLib gfortran.cc)
     liblapack
   ] ++ stdenv.lib.optionals enableGUI [
-    libGLU_combined fltk xorg.libX11
+    libGL libGLU fltk xorg.libX11
   ];
 
   /* fixes:
@@ -104,7 +103,7 @@ stdenv.mkDerivation rec {
     description = "A free computer algebra system (CAS)";
     homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html";
     license = licenses.gpl3Plus;
-    platforms = platforms.unix;
+    platforms = platforms.linux ++ (optionals (!enableGUI) platforms.darwin);
     maintainers = [ maintainers.symphorien ];
   };
 }