Files
ccpkgs/pkgs/firedrake/pulp.nix
Tyson Whitehead 8dda256fad firedrake: Moved to new overlay system and shared sub-scope
Firedrake contains a ton of inter-connected dependencies, many of
which are either firedrake specific or forked versions of upstream
packages.  Cleaner to create a firedrake sub-scope for all these.
2018-01-18 00:59:30 -05:00

35 lines
772 B
Nix

{ lib, fetchFromGitHub, pythonPackages
, glpk, cbc }:
pythonPackages.buildPythonPackage rec {
version = "1.6.4";
name = "PuLP-${version}";
src = fetchFromGitHub {
owner = "coin-or";
repo = "pulp";
rev = "${version}";
sha256 = "02i915ixrz66bpaka82j0x72kl76sr2b5xdx4ahwdlsffvmv9qnx";
};
buildInputs = [
glpk
cbc
];
propagatedBuildInputs = [
pythonPackages.pyparsing
];
postPatch = ''
sed -i -e 's|^CbcPath = .*$|CbcPath = ${cbc}/bin/cbc|' src/pulp/pulp.cfg.linux
sed -i -e 's|^GlpkPath = .*$|GlpkPath = ${glpk}/bin/glpsol|' src/pulp/pulp.cfg.linux
'';
meta = with lib; {
homepage = "https://github.com/coin-or/pulp";
description = "A python Linear Programming API.";
license = licenses.mit;
};
}