5 # Excerpt from glpk's INSTALL file:
6 # This feature allows the exact simplex solver to use the GNU MP
7 # bignum library. If it is disabled, the exact simplex solver uses the
8 # GLPK bignum module, which provides the same functionality as GNU MP,
9 # however, it is much less efficient.
14 assert withGmp -> gmp != null;
16 stdenv.mkDerivation rec {
21 url = "mirror://gnu/glpk/${pname}-${version}.tar.gz";
22 sha256 = "sha256-ShAT7rtQ9yj8YBvdgzsLKHAzPDs+WoFu66kh2VvsbxU=";
27 ] ++ lib.optionals withGmp [
31 configureFlags = lib.optionals withGmp [
36 # GLPK makes it possible to customize its message printing behaviour. Sage
37 # does that and needs to differentiate between printing regular messages and
38 # printing errors. Unfortunately there is no way to tell and glpk upstream
39 # rejected this patch. All it does is set the variable pointing to the error
40 # file back to NULL before glpk calls abort(). In sage's case, abort won't
41 # actually be called because the error handler jumps out of the function.
42 # This shouldn't affect everybody else, since glpk just calls abort()
43 # immediately afterwards anyways.
44 # See the sage trac ticket for more details:
45 # https://trac.sagemath.org/ticket/20710#comment:18
47 name = "error_recovery.patch";
48 url = "https://git.sagemath.org/sage.git/plain/build/pkgs/glpk/patches/error_recovery.patch?id=d3c1f607e32f964bf0cab877a63767c86fd00266";
49 sha256 = "sha256-2hNtUEoGTFt3JgUvLH3tPWnz+DZcXNhjXzS+/V89toA=";
54 # Do not hardcode the include path for libmysqlclient.
56 substituteInPlace configure \
57 --replace '-I/usr/include/mysql' '$(mysql_config --include)'
63 description = "The GNU Linear Programming Kit";
66 '' The GNU Linear Programming Kit is intended for solving large
67 scale linear programming problems by means of the revised
68 simplex method. It is a set of routines written in the ANSI C
69 programming language and organized in the form of a library.
72 homepage = "https://www.gnu.org/software/glpk/";
73 license = licenses.gpl3Plus;
75 maintainers = with maintainers; [ ] ++ teams.sage.members;
76 mainProgram = "glpsol";
77 platforms = platforms.all;