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