2018-04-23 20:13:25 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
# 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
|
|
|
|
# GLPK bignum module, which provides the same functionality as GNU MP,
|
|
|
|
# however, it is much less efficient.
|
|
|
|
, withGmp ? true
|
|
|
|
, gmp
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert withGmp -> gmp != null;
|
2010-04-23 22:15:48 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-04-23 20:13:25 +01:00
|
|
|
version = "4.65";
|
|
|
|
name = "glpk-${version}";
|
2010-04-23 22:15:48 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/glpk/${name}.tar.gz";
|
2018-03-08 18:30:08 +00:00
|
|
|
sha256 = "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2";
|
2010-04-23 22:15:48 +01:00
|
|
|
};
|
|
|
|
|
2018-04-23 20:13:25 +01:00
|
|
|
buildInputs = stdenv.lib.optionals withGmp [
|
|
|
|
gmp
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = stdenv.lib.optionals withGmp [
|
|
|
|
"--with-gmp"
|
|
|
|
];
|
|
|
|
|
2010-04-23 22:15:48 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The GNU Linear Programming Kit";
|
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' The GNU Linear Programming Kit is intended for solving large
|
|
|
|
scale linear programming problems by means of the revised
|
|
|
|
simplex method. It is a set of routines written in the ANSI C
|
|
|
|
programming language and organized in the form of a library.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/glpk/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2010-04-23 22:15:48 +01:00
|
|
|
|
2018-04-23 20:13:25 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ bjg ];
|
2010-04-23 22:15:48 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|