From 1731332165f3612a87299ccb5dd90ba93908068b Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 1 Jun 2024 04:47:00 +0200 Subject: [PATCH 1/2] python312Packages.sigparse: init at 3.0.0 sigparse fix --- .../python-modules/sigparse/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/sigparse/default.nix diff --git a/pkgs/development/python-modules/sigparse/default.nix b/pkgs/development/python-modules/sigparse/default.nix new file mode 100644 index 000000000000..1c3fd7330f80 --- /dev/null +++ b/pkgs/development/python-modules/sigparse/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + pytestCheckHook, + fetchpatch +}: + +buildPythonPackage rec { + pname = "sigparse"; + version = "3.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Lunarmagpie"; + repo = "sigparse"; + rev = "refs/tags/v${version}"; + hash = "sha256-VzWDqplYgwrJXXd5IUzEIp0YRuofybqmGrNKPaGqQFM="; + }; + + patches = [ + # pyproject.toml version file is set as 1.0.0 + (fetchpatch { + url = "https://github.com/Lunarmagpie/sigparse/pull/14/commits/44780382410bc6913bdd8ff7e92948078adb736c.patch"; + hash = "sha256-3EOkdBQDBodMBp4ENdvquJlRvAAywQhdWAX4dWFmhL0="; + }) + ]; + + build-system = [ poetry-core ]; + pythonImportsCheck = [ "sigparse" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + meta = with lib; { + description = "Backports python 3.10 typing features into 3.7, 3.8, and 3.9"; + license = licenses.mit; + homepage = "https://github.com/Lunarmagpie/sigparse"; + maintainers = with maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index abd5218c0c7a..c4a487233c6c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13905,6 +13905,8 @@ self: super: with self; { signxml = callPackage ../development/python-modules/signxml { }; + sigparse = callPackage ../development/python-modules/sigparse { }; + sigrok = callPackage ../development/python-modules/sigrok { }; sigstore = callPackage ../development/python-modules/sigstore { }; From a0fc47d935ed7c1dbb28f0007b482bb715997d40 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 1 Jun 2024 04:58:31 +0200 Subject: [PATCH 2/2] python312Packages.hikari-cresent: init at 0.6.6 --- .../hikari-crescent/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/hikari-crescent/default.nix diff --git a/pkgs/development/python-modules/hikari-crescent/default.nix b/pkgs/development/python-modules/hikari-crescent/default.nix new file mode 100644 index 000000000000..368b683cd98f --- /dev/null +++ b/pkgs/development/python-modules/hikari-crescent/default.nix @@ -0,0 +1,59 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + hikari, + sigparse, + pytestCheckHook, + python-dotenv, + pytest-asyncio, + croniter, + pynacl +}: + +buildPythonPackage rec { + pname = "hikari-crescent"; + version = "0.6.6"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hikari-crescent"; + repo = "hikari-crescent"; + rev = "refs/tags/v${version}"; + hash = "sha256-PZAmz7Wofg6jnF25p/8leJQ9PeZaE3q5q2GUJG7NEB0="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + hikari + sigparse + ]; + + postPatch = '' + # pythonRelaxDepsHook did not work + substituteInPlace pyproject.toml \ + --replace-fail 'hikari = "==' 'hikari = ">=' + ''; + + pythonImportsCheck = [ "crescent" ]; + + nativeCheckInputs = [ + pytestCheckHook + python-dotenv + pytest-asyncio + croniter + pynacl + ]; + + disabledTests = [ "test_handle_resp" ]; + + meta = with lib; { + description = "A command handler for Hikari that keeps your project neat and tidy"; + license = licenses.mit; + homepage = "https://github.com/hikari-crescent/hikari-crescent"; + maintainers = with maintainers; [ sigmanificient ]; + mainProgram = "hikari-crescent"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c4a487233c6c..9b812147dc5e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5390,6 +5390,8 @@ self: super: with self; { hikari = callPackage ../development/python-modules/hikari { }; + hikari-crescent = callPackage ../development/python-modules/hikari-crescent { }; + hikari-lightbulb = callPackage ../development/python-modules/hikari-lightbulb { }; hikvision = callPackage ../development/python-modules/hikvision { };