diff --git a/pkgs/development/python-modules/cyipopt/default.nix b/pkgs/development/python-modules/cyipopt/default.nix new file mode 100644 index 000000000000..f549e065d9fd --- /dev/null +++ b/pkgs/development/python-modules/cyipopt/default.nix @@ -0,0 +1,47 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + cython, + ipopt, + numpy, + pkg-config, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "cyipopt"; + version = "1.5.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "mechmotum"; + repo = "cyipopt"; + rev = "refs/tags/v${version}"; + hash = "sha256-ddiSCVzywlCeeVbRJg2wxKIlAVlZw9Js95IbEDqhh5Q="; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ ipopt ]; + + build-system = [ + cython + 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.rev}/CHANGELOG.rst"; + license = lib.licenses.epl20; + maintainers = with lib.maintainers; [ nim65s ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 958cc28dea06..e9e71af43979 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2835,6 +2835,8 @@ self: super: with self; { cyclopts = callPackage ../development/python-modules/cyclopts { }; + cyipopt = callPackage ../development/python-modules/cyipopt { }; + cymem = callPackage ../development/python-modules/cymem { }; cymruwhois = callPackage ../development/python-modules/cymruwhois { };