From 8487e692fd7afba356fe8d5a55a4b60d98612906 Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 13 Nov 2024 01:16:30 +0800 Subject: [PATCH 1/2] lib/licenses: add bsd3Lbnl --- lib/licenses.nix | 5 +++++ .../plugins/ventura-psychrometric-panel/default.nix | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/licenses.nix b/lib/licenses.nix index 9affe6a2d63c..eb0de0509ac3 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -213,6 +213,11 @@ lib.mapAttrs mkLicense ({ fullName = "BSD 3-Clause Clear License"; }; + bsd3Lbnl = { + spdxId = "BSD-3-Clause-LBNL"; + fullName = "Lawrence Berkeley National Labs BSD variant license"; + }; + bsdOriginal = { spdxId = "BSD-4-Clause"; fullName = ''BSD 4-clause "Original" or "Old" License''; diff --git a/pkgs/servers/monitoring/grafana/plugins/ventura-psychrometric-panel/default.nix b/pkgs/servers/monitoring/grafana/plugins/ventura-psychrometric-panel/default.nix index 0b500e632039..28cdd3f09446 100644 --- a/pkgs/servers/monitoring/grafana/plugins/ventura-psychrometric-panel/default.nix +++ b/pkgs/servers/monitoring/grafana/plugins/ventura-psychrometric-panel/default.nix @@ -6,12 +6,7 @@ grafanaPlugin rec { zipHash = "sha256-Y/Eh3eWZkPS8Q1eha7sEJ3wTMI7QxOr7MEbPc25fnGg="; meta = with lib; { description = "Grafana plugin to display air conditions on a psychrometric chart."; - license = licenses.bsd3 // { - spdxId = "BSD-3-Clause-LBNL"; - url = "https://spdx.org/licenses/BSD-3-Clause-LBNL.html"; - fullName = "Lawrence Berkeley National Labs BSD variant license"; - shortName = "lbnl-bsd3"; - }; + license = licenses.bsd3Lbnl; maintainers = with maintainers; [ nagisa ]; platforms = platforms.unix; }; From 1bd2aeb9d95dcce25b8f23d9cdb62a5af9f3b9dc Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 13 Nov 2024 01:17:38 +0800 Subject: [PATCH 2/2] python312Packages.pybind11-stubgen: init at 2.5.1 --- .../pybind11-stubgen/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pybind11-stubgen/default.nix 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 { };