diff --git a/pkgs/development/python-modules/pybind11-stubgen/default.nix b/pkgs/development/python-modules/pybind11-stubgen/default.nix new file mode 100644 index 000000000000..09af1cb1b301 --- /dev/null +++ b/pkgs/development/python-modules/pybind11-stubgen/default.nix @@ -0,0 +1,37 @@ +{ + buildPythonPackage, + fetchFromGitHub, + lib, + setuptools, +}: + +buildPythonPackage rec { + pname = "pybind11-stubgen"; + version = "2.5.1"; + pyproject = true; + + build-system = [ setuptools ]; + + src = fetchFromGitHub { + owner = "sizmailov"; + repo = "pybind11-stubgen"; + rev = "refs/tags/v${version}"; + hash = "sha256-PJiiRSQ92vP5LKWCgBuowkuDdTmC22xyuax2wsH0wOM="; + }; + + # For testing purposes, the upstream source uses a shell script to build the pybind11 + # project and compares the generated stub file with a preset one. + # This process requires network access and takes considerable time to complete. + # Therefore, I disabled the check phase. + doCheck = false; + + pythonImportsCheck = [ "pybind11_stubgen" ]; + + meta = { + changelog = "https://github.com/sizmailov/pybind11-stubgen/releases/tag/v${version}"; + description = "Generates stubs for python modules"; + homepage = "https://github.com/sizmailov/pybind11-stubgen"; + license = lib.licenses.bsd3Lbnl; + maintainers = with lib.maintainers; [ qbisi ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b39c8f8c6b85..d785decd9b5e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11144,6 +11144,8 @@ self: super: with self; { pybind11 = callPackage ../development/python-modules/pybind11 { }; + pybind11-stubgen = callPackage ../development/python-modules/pybind11-stubgen { }; + pybindgen = callPackage ../development/python-modules/pybindgen { }; pyblackbird = callPackage ../development/python-modules/pyblackbird { };