From c2715b4f942779774ae9a6d791891626aa81918d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 May 2024 13:33:38 +0200 Subject: [PATCH 1/2] python312Packages.nats-python: refactor --- .../python-modules/nats-python/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/nats-python/default.nix b/pkgs/development/python-modules/nats-python/default.nix index 9662dddd5ddb..c59660063f61 100644 --- a/pkgs/development/python-modules/nats-python/default.nix +++ b/pkgs/development/python-modules/nats-python/default.nix @@ -10,30 +10,31 @@ buildPythonPackage rec { pname = "nats-python"; version = "0.8.0"; - disabled = pythonOlder "3.6"; - format = "pyproject"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Gr1N"; repo = "nats-python"; - rev = version; - sha256 = "1j7skyxldir3mphvnsyhjxmf3cimv4h7n5v58jl2gff4yd0hdw7g"; + rev = "refs/tags/${version}"; + hash = "sha256-7/AGQfPEuSeoRGUXeyDZNbLhapfQa7vhrSPHRruf+sg="; }; - nativeBuildInputs = [ - poetry-core - ]; - patches = [ # Switch to poetry-core, https://github.com/Gr1N/nats-python/pull/19 (fetchpatch { name = "use-poetry-core.patch"; url = "https://github.com/Gr1N/nats-python/commit/71b25b324212dccd7fc06ba3914491adba22e83f.patch"; - sha256 = "1fip1qpzk2ka7qgkrdpdr6vnrnb1p8cwapa51xp0h26nm7yis1gl"; + hash = "sha256-9AUd/anWCAhuD0VdxRm6Ydlst8nttjwfPmqK+S8ON7o="; }) ]; - propagatedBuildInputs = [ + build-system = [ + poetry-core + ]; + + dependencies = [ setuptools ]; @@ -45,6 +46,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python client for NATS messaging system"; homepage = "https://github.com/Gr1N/nats-python"; + changelog = "https://github.com/Gr1N/nats-python/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; From f89e81edcb55053bc56bc9d1be9bc46458c89594 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 May 2024 13:34:00 +0200 Subject: [PATCH 2/2] python312Packages.nats-python: format with nixfmt --- .../python-modules/nats-python/default.nix | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/nats-python/default.nix b/pkgs/development/python-modules/nats-python/default.nix index c59660063f61..f93b2feab69c 100644 --- a/pkgs/development/python-modules/nats-python/default.nix +++ b/pkgs/development/python-modules/nats-python/default.nix @@ -1,10 +1,11 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, fetchpatch -, poetry-core -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + poetry-core, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -30,13 +31,9 @@ buildPythonPackage rec { }) ]; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; - dependencies = [ - setuptools - ]; + dependencies = [ setuptools ]; # Tests require a running NATS server doCheck = false;