about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ecos/default.nix
blob: 0327845506b8792ae228c548047bec2054488d3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchFromGitHub
, nose
, numpy
, pythonOlder
, scipy
}:

buildPythonPackage rec {
  pname = "ecos";
  version = "2.0.11";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "embotech";
    repo = "ecos-python";
    rev = "refs/tags/v${version}";
    hash = "sha256-jflmXR7fuGRSyI6NoQrHFvkKqF/D4iq47StNSCdLbqQ=";
    fetchSubmodules = true;
  };

  propagatedBuildInputs = [
    numpy
    scipy
  ];

  nativeCheckInputs = [
    nose
  ];

  checkPhase = ''
    cd ./src
    nosetests test_interface.py test_interface_bb.py
  '';

  pythonImportsCheck = [
    "ecos"
  ];

  meta = with lib; {
    description = "Python interface for ECOS";
    homepage = "https://github.com/embotech/ecos-python";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ drewrisinger ];
  };
}