summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2023-11-19 01:40:40 +0100
committerGitHub <noreply@github.com>2023-11-19 01:40:40 +0100
commit3fe4f799067d0458b386bdb4fbdaea55315e8ee0 (patch)
treed0dd78bb09ef243c784524ee53f6f308a41843bf
parent1b70d81d11da8001f6467d8b095999091d236f22 (diff)
parent4da393a64ecab30cd67c59c7e85ed5d3c8e276f5 (diff)
downloadnixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.tar
nixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.tar.gz
nixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.tar.bz2
nixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.tar.lz
nixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.tar.xz
nixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.tar.zst
nixpkgs-3fe4f799067d0458b386bdb4fbdaea55315e8ee0.zip
Merge pull request #268178 from a-n-n-a-l-e-e/scs-blas-lapack-fix
python311Packages.scs: fix build; 3.2.3 -> 3.2.4
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--pkgs/development/python-modules/scs/default.nix38
-rw-r--r--pkgs/top-level/python-packages.nix4
3 files changed, 41 insertions, 6 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index be22068218d..5df00f2371f 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -1225,6 +1225,11 @@
     githubId = 81317317;
     name = "Anna Aurora";
   };
+  a-n-n-a-l-e-e = {
+    github = "a-n-n-a-l-e-e";
+    githubId = 150648636;
+    name = "annalee";
+  };
   anoa = {
     matrix = "@andrewm:amorgan.xyz";
     email = "andrew@amorgan.xyz";
diff --git a/pkgs/development/python-modules/scs/default.nix b/pkgs/development/python-modules/scs/default.nix
index 0a242e23137..5e95bed4cbd 100644
--- a/pkgs/development/python-modules/scs/default.nix
+++ b/pkgs/development/python-modules/scs/default.nix
@@ -2,6 +2,10 @@
 , stdenv
 , buildPythonPackage
 , fetchFromGitHub
+, fetchpatch
+, meson-python
+, pkg-config
+, Accelerate
 , blas
 , lapack
 , numpy
@@ -12,19 +16,43 @@
 
 buildPythonPackage rec {
   pname = "scs";
-  version = "3.2.3";
+  version = "3.2.4";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "bodono";
     repo = "scs-python";
     rev = version;
-    hash = "sha256-/5yGvZy3luGQkbYcsb/6TZLYou91lpA3UKONviMVpuM=";
+    hash = "sha256-UmMbnj7QZSvHWSUk1Qa0VP4i3iDCYHxoa+qBmEdFjRs=";
     fetchSubmodules = true;
   };
 
-  buildInputs = [
-    lapack
+  patches = [
+    # needed for building against netlib's reference blas implementation and
+    # the pkg-config patch. remove on next update
+    (fetchpatch {
+      name = "find-and-ld-lapack.patch";
+      url = "https://github.com/bodono/scs-python/commit/a0aea80e7d490770d6a47d2c79396f6c3341c1f9.patch";
+      hash = "sha256-yHF8f7SLoG7veZ6DEq1HVH6rT2KtFONwJtqSiKcxOdg=";
+    })
+    # add support for pkg-config. remove on next update
+    (fetchpatch {
+      name = "use-pkg-config.patch";
+      url = "https://github.com/bodono/scs-python/commit/dd17e2e5282ebe85f2df8a7c6b25cfdeb894970d.patch";
+      hash = "sha256-vSeSJeeu5Wx3RXPyB39YTo0RU8HtAojrUw85Q76/QzA=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson-python
+    pkg-config
+  ];
+
+  buildInputs = if stdenv.isDarwin then [
+    Accelerate
+  ] else [
     blas
+    lapack
   ];
 
   propagatedBuildInputs = [
@@ -51,6 +79,6 @@ buildPythonPackage rec {
     homepage = "https://github.com/cvxgrp/scs"; # upstream C package
     downloadPage = "https://github.com/bodono/scs-python";
     license = licenses.mit;
-    maintainers = with maintainers; [ drewrisinger ];
+    maintainers = with maintainers; [ a-n-n-a-l-e-e drewrisinger ];
   };
 }
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 13bd7d07d53..4b29edee0ec 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -12683,7 +12683,9 @@ self: super: with self; {
 
   scikit-survival = callPackage ../development/python-modules/scikit-survival { };
 
-  scs = callPackage ../development/python-modules/scs { };
+  scs = callPackage ../development/python-modules/scs {
+    inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate;
+  };
 
   sdds = callPackage ../development/python-modules/sdds { };