From 45e67eb30e88dabd2b36253a28e6b5c0b4f5ec79 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Apr 2024 10:41:18 +0200 Subject: [PATCH 1/2] python312Packages.ajsonrpc: refactor --- .../python-modules/ajsonrpc/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ajsonrpc/default.nix b/pkgs/development/python-modules/ajsonrpc/default.nix index 47643f6e94b4..41f074aacc0e 100644 --- a/pkgs/development/python-modules/ajsonrpc/default.nix +++ b/pkgs/development/python-modules/ajsonrpc/default.nix @@ -1,26 +1,37 @@ -{ lib, pythonOlder, buildPythonPackage, fetchPypi, pytestCheckHook }: +{ lib +, pythonOlder +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, setuptools +}: buildPythonPackage rec { pname = "ajsonrpc"; version = "1.2.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "791bac18f0bf0dee109194644f151cf8b7ff529c4b8d6239ac48104a3251a19f"; + hash = "sha256-eRusGPC/De4QkZRkTxUc+Lf/UpxLjWI5rEgQSjJRoZ8="; }; + build-system = [ + setuptools + ]; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "ajsonrpc" ]; meta = with lib; { - description = "Async JSON-RPC 2.0 protocol + asyncio server"; - mainProgram = "async-json-rpc-server"; + description = "Async JSON-RPC 2.0 protocol and asyncio server"; homepage = "https://github.com/pavlov99/ajsonrpc"; + changelog = "https://github.com/pavlov99/ajsonrpc/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ oxzi ]; + mainProgram = "async-json-rpc-server"; }; } From 87ce0c4fc76cca22ffd2cd8852ab2959588a132f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Apr 2024 10:41:38 +0200 Subject: [PATCH 2/2] python312Packages.ajsonrpc: format with nixfmt --- .../python-modules/ajsonrpc/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/ajsonrpc/default.nix b/pkgs/development/python-modules/ajsonrpc/default.nix index 41f074aacc0e..66e94c019c59 100644 --- a/pkgs/development/python-modules/ajsonrpc/default.nix +++ b/pkgs/development/python-modules/ajsonrpc/default.nix @@ -1,9 +1,10 @@ -{ lib -, pythonOlder -, buildPythonPackage -, fetchPypi -, pytestCheckHook -, setuptools +{ + lib, + pythonOlder, + buildPythonPackage, + fetchPypi, + pytestCheckHook, + setuptools, }: buildPythonPackage rec { @@ -18,9 +19,7 @@ buildPythonPackage rec { hash = "sha256-eRusGPC/De4QkZRkTxUc+Lf/UpxLjWI5rEgQSjJRoZ8="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ];