glpk: do not hard code include path for libmysqlclient

This commit is contained in:
Thomas Tuegel
2020-09-12 06:58:25 -05:00
parent de938ee3f5
commit b750697c1f
+13 -3
View File
@@ -1,6 +1,7 @@
{ stdenv { stdenv
, fetchurl , fetchurl
, fetchpatch , fetchpatch
, libmysqlclient
# Excerpt from glpk's INSTALL file: # Excerpt from glpk's INSTALL file:
# This feature allows the exact simplex solver to use the GNU MP # This feature allows the exact simplex solver to use the GNU MP
# bignum library. If it is disabled, the exact simplex solver uses the # bignum library. If it is disabled, the exact simplex solver uses the
@@ -21,9 +22,11 @@ stdenv.mkDerivation rec {
sha256 = "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2"; sha256 = "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2";
}; };
buildInputs = stdenv.lib.optionals withGmp [ buildInputs =
gmp [ libmysqlclient
]; ] ++ stdenv.lib.optionals withGmp [
gmp
];
configureFlags = stdenv.lib.optionals withGmp [ configureFlags = stdenv.lib.optionals withGmp [
"--with-gmp" "--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; doCheck = true;
meta = { meta = {