summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/cyipopt/default.nix
blob: 80035f18980963eb353ab8b56998d3b1119a77b3 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  cython,
  ipopt,
  numpy,
  pkg-config,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "cyipopt";
  version = "1.6.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mechmotum";
    repo = "cyipopt";
    tag = "v${version}";
    hash = "sha256-feGGAwhNw+xZrSsag2W5nruQWAC6NP9k4F0X9EjaRTg=";
  };

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ ipopt ];

  build-system = [
    cython
    numpy
    setuptools
  ];

  dependencies = [ numpy ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "cyipopt" ];

  meta = {
    description = "Cython interface for the interior point optimzer IPOPT";
    homepage = "https://github.com/mechmotum/cyipopt";
    changelog = "https://github.com/mechmotum/cyipopt/blob/${src.tag}/CHANGELOG.rst";
    license = lib.licenses.epl20;
    maintainers = with lib.maintainers; [ nim65s ];
  };
}