1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00

glpk: do not hard code include path for libmysqlclient

This commit is contained in:
Thomas Tuegel 2020-09-09 13:27:35 -05:00
parent de938ee3f5
commit b750697c1f
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59

View file

@ -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 = {