1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 oldest-supported-numpy,
6 pytestCheckHook,
7 pythonOlder,
8 scipy,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "ecos";
14 version = "2.0.14";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "embotech";
21 repo = "ecos-python";
22 tag = "v${version}";
23 hash = "sha256-nfu1FicWr233r+VHxkQf1vqh2y4DGymJRmik8RJYJkA=";
24 fetchSubmodules = true;
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace-fail "numpy >= 2.0.0" numpy
30 '';
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 oldest-supported-numpy
36 scipy
37 ];
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 pythonImportsCheck = [ "ecos" ];
42
43 meta = with lib; {
44 description = "Python interface for ECOS";
45 homepage = "https://github.com/embotech/ecos-python";
46 changelog = "https://github.com/embotech/ecos-python/releases/tag/v${version}";
47 license = licenses.gpl3Only;
48 maintainers = with maintainers; [ drewrisinger ];
49 };
50}