From 187cd6b88e9738d33d686d87e7f724e46e88f960 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 Apr 2026 09:10:16 +0200 Subject: [PATCH] python3Packages.dtfabric: modernize - migrate to finalAttrs - add pythonImportsCheck - update ordering --- .../python-modules/dtfabric/default.nix | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/dtfabric/default.nix b/pkgs/development/python-modules/dtfabric/default.nix index f853f3c637b8..e66403b6ca36 100644 --- a/pkgs/development/python-modules/dtfabric/default.nix +++ b/pkgs/development/python-modules/dtfabric/default.nix @@ -6,38 +6,39 @@ pyyaml, setuptools, }: -buildPythonPackage rec { + +buildPythonPackage (finalAttrs: { pname = "dtfabric"; version = "20260411"; pyproject = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-0hnJJ76wpINsNXecrGCQILqixo4xUhH8dW6djq9/vH4="; }; + pythonRemoveDeps = [ "pip" ]; + build-system = [ setuptools ]; - dependencies = [ - pyyaml - ]; - - pythonRemoveDeps = [ - "pip" - ]; + dependencies = [ pyyaml ]; checkPhase = '' runHook preCheck + ${python.interpreter} run_tests.py + runHook postCheck ''; + pythonImportsCheck = [ "dtfabric" ]; + meta = { - changelog = "https://github.com/libyal/dtfabric/releases/tag/${version}"; description = "Project to manage data types and structures, as used in the libyal projects"; + changelog = "https://github.com/libyal/dtfabric/releases/tag/${finalAttrs.version}"; downloadPage = "https://github.com/libyal/dtfabric/releases"; homepage = "https://github.com/libyal/dtfabric"; license = lib.licenses.asl20; - maintainers = [ lib.maintainers.jayrovacsek ]; + maintainers = with lib.maintainers; [ jayrovacsek ]; }; -} +})