mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
1c8aba8334
This makes packages use lapack and blas, which can wrap different BLAS/LAPACK implementations. treewide: cleanup from blas/lapack changes A few issues in the original treewide: - can’t assume blas64 is a bool - unused commented code
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, blas
|
|
, lapack
|
|
, numpy
|
|
, scipy
|
|
, scs
|
|
# check inputs
|
|
, nose
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
inherit (scs) pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bodono";
|
|
repo = "scs-python";
|
|
rev = "f02abdc0e2e0a5851464e30f6766ccdbb19d73f0"; # need to choose commit manually, untagged
|
|
sha256 = "174b5s7cwgrn1m55jlrszdl403zhpzc4yl9acs6kjv9slmg1mmjr";
|
|
};
|
|
|
|
preConfigure = ''
|
|
rm -r scs
|
|
ln -s ${scs.src} scs
|
|
'';
|
|
|
|
buildInputs = [
|
|
lapack
|
|
blas
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
numpy
|
|
scipy
|
|
];
|
|
|
|
checkInputs = [ nose ];
|
|
checkPhase = ''
|
|
nosetests
|
|
'';
|
|
pythonImportsCheck = [ "scs" ];
|
|
|
|
meta = with lib; {
|
|
description = "Python interface for SCS: Splitting Conic Solver";
|
|
longDescription = ''
|
|
Solves convex cone programs via operator splitting.
|
|
Can solve: linear programs (LPs), second-order cone programs (SOCPs), semidefinite programs (SDPs),
|
|
exponential cone programs (ECPs), and power cone programs (PCPs), or problems with any combination of those cones.
|
|
'';
|
|
homepage = "https://github.com/cvxgrp/scs"; # upstream C package
|
|
downloadPage = "https://github.com/bodono/scs-python";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
};
|
|
}
|