2020-01-26 00:02:57 +01:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkgs
|
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
# check inputs
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ecos";
|
2021-07-02 22:02:49 +02:00
|
|
|
version = "2.0.8";
|
2020-01-26 00:02:57 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "embotech";
|
|
|
|
repo = "ecos-python";
|
|
|
|
rev = version;
|
2021-07-02 22:02:49 +02:00
|
|
|
sha256 = "sha256-2OJqbcOZceeD2fO5cu9fohuUVaA2LwQOQSWR4jRv3mk=";
|
2020-01-26 00:02:57 +01:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
echo '__version__ = "${version}"' >> ./src/ecos/version.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [ nose ];
|
|
|
|
checkPhase = ''
|
|
|
|
# Run tests
|
|
|
|
cd ./src
|
|
|
|
nosetests test_interface.py test_interface_bb.py
|
|
|
|
'';
|
|
|
|
pythonImportsCheck = [ "ecos" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package for ECOS: Embedded Cone Solver";
|
|
|
|
downloadPage = "https://github.com/embotech/ecos-python/releases";
|
|
|
|
homepage = pkgs.ecos.meta.homepage;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|