From 83326c2d47189cbe098c0719c56408f93c1e61d7 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Thu, 17 Aug 2023 12:31:25 +1000 Subject: [PATCH 1/4] python3.pkgs.pygobject-stubs: init at 2.8.0 --- .../pygobject-stubs/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/pygobject-stubs/default.nix diff --git a/pkgs/development/python-modules/pygobject-stubs/default.nix b/pkgs/development/python-modules/pygobject-stubs/default.nix new file mode 100644 index 000000000000..a1836cdbf2d6 --- /dev/null +++ b/pkgs/development/python-modules/pygobject-stubs/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, black +, codespell +, isort +, mypy +, pre-commit +, pygobject3 +}: + +buildPythonPackage rec { + pname = "pygobject-stubs"; + version = "2.8.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "pygobject"; + repo = "pygobject-stubs"; + rev = "v${version}"; + hash = "sha256-8TB8eqXPhvoKtyQ8+hnCQnH4NwO2WC1NYAxmVj+FCvg="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + passthru.optional-dependencies = { + dev = [ + black + codespell + isort + mypy + pre-commit + pygobject3 + ]; + }; + + meta = with lib; { + description = "PEP 561 Typing Stubs for PyGObject"; + homepage = "https://github.com/pygobject/pygobject-stubs"; + changelog = "https://github.com/pygobject/pygobject-stubs/blob/${src.rev}/CHANGELOG.md"; + license = licenses.lgpl21Only; + maintainers = with maintainers; [ hacker1024 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5786bf18fbe1..e3b79fc3a4de 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9046,6 +9046,8 @@ self: super: with self; { inherit (pkgs.buildPackages) meson; }; + pygobject-stubs = callPackage ../development/python-modules/pygobject-stubs { }; + pygogo = callPackage ../development/python-modules/pygogo { }; pygpgme = callPackage ../development/python-modules/pygpgme { }; From 518696b7c1412c526c8b9bcadab3eb86002a2e32 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Thu, 17 Aug 2023 22:55:36 +0000 Subject: [PATCH 2/4] python3.pkgs.gobject-stubs: Remove optional "dev" dependencies Co-authored-by: Fabian Affolter --- .../python-modules/pygobject-stubs/default.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkgs/development/python-modules/pygobject-stubs/default.nix b/pkgs/development/python-modules/pygobject-stubs/default.nix index a1836cdbf2d6..2cecb2e3867c 100644 --- a/pkgs/development/python-modules/pygobject-stubs/default.nix +++ b/pkgs/development/python-modules/pygobject-stubs/default.nix @@ -26,16 +26,6 @@ buildPythonPackage rec { setuptools ]; - passthru.optional-dependencies = { - dev = [ - black - codespell - isort - mypy - pre-commit - pygobject3 - ]; - }; meta = with lib; { description = "PEP 561 Typing Stubs for PyGObject"; From 3c500a0cc8290c547151daf95a701509f2860f36 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Thu, 17 Aug 2023 22:57:21 +0000 Subject: [PATCH 3/4] python3.pkgs.gobject-stubs: Use lgpl21Plus license Co-authored-by: Fabian Affolter --- pkgs/development/python-modules/pygobject-stubs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pygobject-stubs/default.nix b/pkgs/development/python-modules/pygobject-stubs/default.nix index 2cecb2e3867c..ab34b576e96f 100644 --- a/pkgs/development/python-modules/pygobject-stubs/default.nix +++ b/pkgs/development/python-modules/pygobject-stubs/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { description = "PEP 561 Typing Stubs for PyGObject"; homepage = "https://github.com/pygobject/pygobject-stubs"; changelog = "https://github.com/pygobject/pygobject-stubs/blob/${src.rev}/CHANGELOG.md"; - license = licenses.lgpl21Only; + license = licenses.lgpl21Plus; maintainers = with maintainers; [ hacker1024 ]; }; } From 8b84d90d84c6369dc6625ff620af2fd28b2edcfe Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Fri, 18 Aug 2023 09:00:20 +1000 Subject: [PATCH 4/4] python3.pkgs.gobject-stubs: Disable the check phase --- pkgs/development/python-modules/pygobject-stubs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pygobject-stubs/default.nix b/pkgs/development/python-modules/pygobject-stubs/default.nix index ab34b576e96f..77ec68ea2884 100644 --- a/pkgs/development/python-modules/pygobject-stubs/default.nix +++ b/pkgs/development/python-modules/pygobject-stubs/default.nix @@ -26,6 +26,8 @@ buildPythonPackage rec { setuptools ]; + # This package does not include any tests. + doCheck = false; meta = with lib; { description = "PEP 561 Typing Stubs for PyGObject";