diff options
Diffstat (limited to 'pkgs/development/libraries/glpk')
-rw-r--r-- | pkgs/development/libraries/glpk/default.nix | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/pkgs/development/libraries/glpk/default.nix b/pkgs/development/libraries/glpk/default.nix index 8c5a50c43d1..a46c84844e8 100644 --- a/pkgs/development/libraries/glpk/default.nix +++ b/pkgs/development/libraries/glpk/default.nix @@ -1,6 +1,7 @@ -{ stdenv +{ lib, stdenv , fetchurl , fetchpatch +, libmysqlclient # Excerpt from glpk's INSTALL file: # This feature allows the exact simplex solver to use the GNU MP # bignum library. If it is disabled, the exact simplex solver uses the @@ -21,11 +22,13 @@ stdenv.mkDerivation rec { sha256 = "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2"; }; - buildInputs = stdenv.lib.optionals withGmp [ - gmp - ]; + buildInputs = + [ libmysqlclient + ] ++ lib.optionals withGmp [ + gmp + ]; - configureFlags = stdenv.lib.optionals withGmp [ + configureFlags = lib.optionals withGmp [ "--with-gmp" ]; @@ -47,9 +50,16 @@ stdenv.mkDerivation rec { }) ]; + postPatch = + # Do not hardcode the include path for libmysqlclient. + '' + substituteInPlace configure \ + --replace '-I/usr/include/mysql' '$(mysql_config --include)' + ''; + doCheck = true; - meta = { + meta = with lib; { description = "The GNU Linear Programming Kit"; longDescription = @@ -60,9 +70,9 @@ stdenv.mkDerivation rec { ''; homepage = "https://www.gnu.org/software/glpk/"; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; - maintainers = with stdenv.lib.maintainers; [ bjg timokau ]; - platforms = stdenv.lib.platforms.all; + maintainers = with maintainers; [ bjg ] ++ teams.sage.members; + platforms = platforms.all; }; } |