nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 cbc,
4 amply,
5 buildPythonPackage,
6 fetchFromGitHub,
7 pyparsing,
8 pytestCheckHook,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "pulp";
14 version = "3.3.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "coin-or";
19 repo = "pulp";
20 tag = version;
21 hash = "sha256-b9qTJqSC8G3jxcqS4mkQ1gOLLab+YzYaNClRwD6I/hk=";
22 };
23
24 patches = [ ./cbc_path_fixes.patch ];
25
26 postPatch = ''
27 substituteInPlace pulp/apis/coin_api.py --subst-var-by "cbc" "${lib.getExe' cbc "cbc"}"
28 '';
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 amply
34 pyparsing
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "pulp" ];
40
41 meta = {
42 description = "Module to generate MPS or LP files";
43 mainProgram = "pulptest";
44 homepage = "https://github.com/coin-or/pulp";
45 license = lib.licenses.mit;
46 maintainers = with lib.maintainers; [ teto ];
47 };
48}