about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/glpk
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/libraries/glpk
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/glpk')
-rw-r--r--nixpkgs/pkgs/development/libraries/glpk/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/glpk/default.nix b/nixpkgs/pkgs/development/libraries/glpk/default.nix
index 8c5a50c43d18..d771f7df7892 100644
--- a/nixpkgs/pkgs/development/libraries/glpk/default.nix
+++ b/nixpkgs/pkgs/development/libraries/glpk/default.nix
@@ -1,6 +1,7 @@
 { 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,9 +22,11 @@ stdenv.mkDerivation rec {
     sha256 = "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2";
   };
 
-  buildInputs = stdenv.lib.optionals withGmp [
-    gmp
-  ];
+  buildInputs =
+    [ libmysqlclient
+    ] ++ stdenv.lib.optionals withGmp [
+      gmp
+    ];
 
   configureFlags = stdenv.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 stdenv.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;
   };
 }