From 92da05ac54bb5ef8870ccbf295ab7c1a5e2b9e08 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 19 Oct 2024 21:48:58 +0200 Subject: [PATCH] python312Packages.python-registry: refactor --- .../python-registry/default.nix | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/python-registry/default.nix b/pkgs/development/python-modules/python-registry/default.nix index 04c6e81d3911..b08d82bb3e48 100644 --- a/pkgs/development/python-modules/python-registry/default.nix +++ b/pkgs/development/python-modules/python-registry/default.nix @@ -1,29 +1,33 @@ { lib, buildPythonPackage, - enum-compat, fetchFromGitHub, pytestCheckHook, unicodecsv, + pythonOlder, + setuptools, six, }: buildPythonPackage rec { pname = "python-registry"; version = "1.4"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "williballenthin"; - repo = pname; - rev = version; - sha256 = "0gwx5jcribgmmbz0ikhz8iphz7yj2d2nmk24nkdrjd3y5irly11s"; + repo = "python-registry"; + rev = "refs/tags/${version}"; + hash = "sha256-OgRPcyx+NJnbtETMakUT0p8Pb0Qfzgj+qvWtmJksnT8="; }; - propagatedBuildInputs = [ - enum-compat - unicodecsv - ]; + pythonRemoveDeps = [ "enum-compat" ]; + + build-system = [ setuptools ]; + + dependencies = [ unicodecsv ]; nativeCheckInputs = [ pytestCheckHook @@ -35,8 +39,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "Registry" ]; meta = with lib; { - description = "Pure Python parser for Windows Registry hives"; + description = "Module to parse the Windows Registry hives"; homepage = "https://github.com/williballenthin/python-registry"; + changelog = "https://github.com/williballenthin/python-registry/releases/tag/${version}"; license = licenses.asl20; maintainers = [ ]; };