Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions pkgs/development/python-modules/scs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, blas
, liblapack
, 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 = [
liblapack
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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4980,6 +4980,8 @@ in {
python-simple-hipchat = callPackage ../development/python-modules/python-simple-hipchat {};
python_simple_hipchat = self.python-simple-hipchat;

scs = callPackage ../development/python-modules/scs { scs = pkgs.scs; };

python_keyczar = callPackage ../development/python-modules/python_keyczar { };

python-language-server = callPackage ../development/python-modules/python-language-server {};
Expand Down