From fea610bb94c5590c89fed7926000c062c0ff6411 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 23 Nov 2023 08:52:20 -0500 Subject: [PATCH] python3Packages.pulp: add cbc solver --- pkgs/development/python-modules/pulp/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pulp/default.nix b/pkgs/development/python-modules/pulp/default.nix index 816af17c69fd..6ecd6d4ba8c0 100644 --- a/pkgs/development/python-modules/pulp/default.nix +++ b/pkgs/development/python-modules/pulp/default.nix @@ -1,4 +1,5 @@ { lib +, cbc , amply , buildPythonPackage , fetchFromGitHub @@ -21,6 +22,12 @@ buildPythonPackage rec { hash = "sha256-j0f6OiscJyTqPNyLp0qWRjCGLWuT3HdU1S/sxpnsiMo="; }; + postPatch = '' + sed -i pulp/pulp.cfg.linux \ + -e 's|CbcPath = .*|CbcPath = ${cbc}/bin/cbc|' \ + -e 's|PulpCbcPath = .*|PulpCbcPath = ${cbc}/bin/cbc|' + ''; + propagatedBuildInputs = [ amply pyparsing @@ -34,14 +41,8 @@ buildPythonPackage rec { "pulp" ]; - disabledTests = [ - # The solver is not available - "PULP_CBC_CMDTest" - "test_examples" - ]; - meta = with lib; { - description = "Module to generate generate MPS or LP files"; + description = "Module to generate MPS or LP files"; homepage = "https://github.com/coin-or/pulp"; license = licenses.mit; maintainers = with maintainers; [ teto ];