From 8b4f885264da0af8c3142f90c8c89c73501b8703 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sat, 8 Dec 2018 21:10:24 +0100 Subject: [PATCH] giac: add missing optional dependencies --- pkgs/applications/science/math/giac/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/math/giac/default.nix b/pkgs/applications/science/math/giac/default.nix index ecd55f62e333..2afa52dd511f 100644 --- a/pkgs/applications/science/math/giac/default.nix +++ b/pkgs/applications/science/math/giac/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch, texlive, bison, flex, liblapack -, gmp, mpfr, pari, ntl, gsl, blas, mpfi +, gmp, mpfr, pari, ntl, gsl, blas, mpfi, ecm, glpk , readline, gettext, libpng, libao, gfortran, perl , enableGUI ? false, libGLU_combined ? null, xorg ? null, fltk ? null }: @@ -37,8 +37,8 @@ stdenv.mkDerivation rec { # perl is only needed for patchShebangs fixup. buildInputs = [ - gmp mpfr pari ntl gsl blas mpfi - readline gettext libpng libao perl + gmp mpfr pari ntl gsl blas mpfi glpk + readline gettext libpng libao perl ecm # gfortran.cc default output contains static libraries compiled without -fPIC # we want libgfortran.so.3 instead (stdenv.lib.getLib gfortran.cc) @@ -47,6 +47,13 @@ stdenv.mkDerivation rec { libGLU_combined fltk xorg.libX11 ]; + /* fixes: + configure:16211: checking for main in -lntl + configure:16230: g++ -o conftest -g -O2 conftest.cpp -lntl -llapack -lblas -lgfortran -ldl -lpng16 -lm -lmpfi -lmpfr -lgmp >&5 + /nix/store/y9c1v4x7y39j2rfbg17agjwqdzxpsn18-ntl-11.3.2/lib/libntl.so: undefined reference to `pthread_key_create' + */ + NIX_CFLAGS_LINK="-lpthread"; + # xcas Phys and Turtle menus are broken with split outputs # and interactive use is likely to need docs outputs = [ "out" ] ++ stdenv.lib.optional (!enableGUI) "doc"; @@ -66,7 +73,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-gc" "--enable-png" "--enable-gsl" "--enable-lapack" "--enable-pari" "--enable-ntl" "--enable-gmpxx" # "--enable-cocoa" - "--enable-ao" + "--enable-ao" "--enable-ecm" "--enable-glpk" ] ++ stdenv.lib.optionals enableGUI [ "--enable-gui" "--with-x" ];