about summary refs log tree commit diff
path: root/pkgs/development/libraries/glpk
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2020-09-09 13:27:35 -0500
committerThomas Tuegel <ttuegel@mailbox.org>2020-09-12 06:58:25 -0500
commitb750697c1f537e90476aff0378f1b75add84e497 (patch)
tree2ec41cddbbd071fc0e0b83cc8cf0a0eafd496d26 /pkgs/development/libraries/glpk
parentde938ee3f56818dab5e7f57c9430d3c4c248dcf5 (diff)
glpk: do not hard code include path for libmysqlclient
Diffstat (limited to 'pkgs/development/libraries/glpk')
-rw-r--r--pkgs/development/libraries/glpk/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/development/libraries/glpk/default.nix b/pkgs/development/libraries/glpk/default.nix
index 8c5a50c43d18e..124e03baee19f 100644
--- a/pkgs/development/libraries/glpk/default.nix
+++ b/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,6 +50,13 @@ 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 = {