Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / scs / default.nix
blob128e9276608dd5617c281fe275896959ea94db3c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , blas
5 , lapack
6 , numpy
7 , scipy
8 , scs
9   # check inputs
10 , nose
13 buildPythonPackage rec {
14   inherit (scs) pname version;
16   src = fetchFromGitHub {
17     owner = "bodono";
18     repo = "scs-python";
19     rev = "f02abdc0e2e0a5851464e30f6766ccdbb19d73f0"; # need to choose commit manually, untagged
20     sha256 = "174b5s7cwgrn1m55jlrszdl403zhpzc4yl9acs6kjv9slmg1mmjr";
21   };
23   preConfigure = ''
24     rm -r scs
25     ln -s ${scs.src} scs
26   '';
28   buildInputs = [
29     lapack
30     blas
31   ];
33   propagatedBuildInputs = [
34     numpy
35     scipy
36   ];
38   checkInputs = [ nose ];
39   checkPhase = ''
40     nosetests
41   '';
42   pythonImportsCheck = [ "scs" ];
44   meta = with lib; {
45     description = "Python interface for SCS: Splitting Conic Solver";
46     longDescription = ''
47       Solves convex cone programs via operator splitting.
48       Can solve: linear programs (LPs), second-order cone programs (SOCPs), semidefinite programs (SDPs),
49       exponential cone programs (ECPs), and power cone programs (PCPs), or problems with any combination of those cones.
50     '';
51     homepage = "https://github.com/cvxgrp/scs"; # upstream C package
52     downloadPage = "https://github.com/bodono/scs-python";
53     license = licenses.gpl3;
54     maintainers = with maintainers; [ drewrisinger ];
55   };