1{
2 lib,
3 buildPythonPackage,
4 cython,
5 fetchPypi,
6 numpy,
7 pytestCheckHook,
8 python-utils,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "lap";
15 version = "0.5.12";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-VwtBTqeubAS9SdDsjNrB3FY0c3dVeE1E43+fZourRP0=";
23 };
24
25 build-system = [ setuptools ];
26
27 nativeBuildInputs = [ cython ];
28
29 dependencies = [
30 numpy
31 python-utils
32 ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "lap" ];
37 # See https://github.com/NixOS/nixpkgs/issues/255262
38 preCheck = ''
39 cd "$out"
40 '';
41
42 meta = {
43 description = "Linear Assignment Problem solver (LAPJV/LAPMOD)";
44 homepage = "https://github.com/gatagat/lap";
45 changelog = "https://github.com/gatagat/lap/releases/tag/v${version}";
46 license = lib.licenses.bsd2;
47 maintainers = with lib.maintainers; [
48 doronbehar
49 tebriel
50 ];
51 };
52}