about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ecos/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/ecos/default.nix')
-rw-r--r--pkgs/development/python-modules/ecos/default.nix49
1 files changed, 25 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/ecos/default.nix b/pkgs/development/python-modules/ecos/default.nix
index 0327845506b8..b6be5dbc540c 100644
--- a/pkgs/development/python-modules/ecos/default.nix
+++ b/pkgs/development/python-modules/ecos/default.nix
@@ -1,48 +1,49 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, nose
-, numpy
-, pythonOlder
-, scipy
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  oldest-supported-numpy,
+  pytestCheckHook,
+  pythonOlder,
+  scipy,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "ecos";
-  version = "2.0.11";
-  format = "setuptools";
+  version = "2.0.14";
+  pyproject = true;
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "embotech";
     repo = "ecos-python";
     rev = "refs/tags/v${version}";
-    hash = "sha256-jflmXR7fuGRSyI6NoQrHFvkKqF/D4iq47StNSCdLbqQ=";
+    hash = "sha256-nfu1FicWr233r+VHxkQf1vqh2y4DGymJRmik8RJYJkA=";
     fetchSubmodules = true;
   };
 
-  propagatedBuildInputs = [
-    numpy
-    scipy
-  ];
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace-fail "numpy >= 2.0.0" numpy
+  '';
+
+  build-system = [ setuptools ];
 
-  nativeCheckInputs = [
-    nose
+  dependencies = [
+    oldest-supported-numpy
+    scipy
   ];
 
-  checkPhase = ''
-    cd ./src
-    nosetests test_interface.py test_interface_bb.py
-  '';
+  nativeCheckInputs = [ pytestCheckHook ];
 
-  pythonImportsCheck = [
-    "ecos"
-  ];
+  pythonImportsCheck = [ "ecos" ];
 
   meta = with lib; {
     description = "Python interface for ECOS";
     homepage = "https://github.com/embotech/ecos-python";
+    changelog = "https://github.com/embotech/ecos-python/releases/tag/v${version}";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ drewrisinger ];
   };