From a4a9a955f7cec215aca9ef1ab2ff1701678c4b54 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 May 2024 14:53:42 +0200 Subject: [PATCH 1/2] python312Packages.noiseprotocol: refactor --- .../python-modules/noiseprotocol/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/noiseprotocol/default.nix b/pkgs/development/python-modules/noiseprotocol/default.nix index d1cc83e517ad..9cd38289fae7 100644 --- a/pkgs/development/python-modules/noiseprotocol/default.nix +++ b/pkgs/development/python-modules/noiseprotocol/default.nix @@ -1,18 +1,29 @@ -{ lib, buildPythonPackage, fetchFromGitHub, cryptography, pytestCheckHook }: +{ lib +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, setuptools +}: buildPythonPackage rec { pname = "noiseprotocol"; version = "0.3.1"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "plizonczyk"; repo = "noiseprotocol"; - rev = "v${version}"; - sha256 = "1mk0rqpjifdv3v1cjwkdnjbrfmzzjm9f3qqs1r8vii4j2wvhm6am"; + rev = "refs/tags/v${version}"; + hash = "sha256-VZkKNxeSxLhRDhrj4VKV/1eXl7RtcsnCHru5KC/OYNY="; }; - propagatedBuildInputs = [ cryptography ]; + build-system = [ setuptools ]; + + dependencies = [ cryptography ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -21,6 +32,7 @@ buildPythonPackage rec { meta = with lib; { description = "Noise Protocol Framework"; homepage = "https://github.com/plizonczyk/noiseprotocol/"; + changelog = "https://github.com/plizonczyk/noiseprotocol/blob/v${version}/CHANGELOG.rst"; license = licenses.mit; maintainers = with maintainers; [ ]; }; From 1e88b22aaf3fb81ed5b8f485442708c0b1ca8bc1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 May 2024 14:54:08 +0200 Subject: [PATCH 2/2] python312Packages.noiseprotocol: format with nixfmt --- .../python-modules/noiseprotocol/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/noiseprotocol/default.nix b/pkgs/development/python-modules/noiseprotocol/default.nix index 9cd38289fae7..8192e2dd4f30 100644 --- a/pkgs/development/python-modules/noiseprotocol/default.nix +++ b/pkgs/development/python-modules/noiseprotocol/default.nix @@ -1,10 +1,11 @@ -{ lib -, buildPythonPackage -, cryptography -, fetchFromGitHub -, pytestCheckHook -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + cryptography, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + setuptools, }: buildPythonPackage rec {