From da390f9631685ac730670fe18401f64778284d5a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 12 Apr 2024 14:33:50 +0200 Subject: [PATCH] python312Packages.riscv-config: refactor --- .../python-modules/riscv-config/default.nix | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/riscv-config/default.nix b/pkgs/development/python-modules/riscv-config/default.nix index 3ffc742df089..0421a337eae9 100644 --- a/pkgs/development/python-modules/riscv-config/default.nix +++ b/pkgs/development/python-modules/riscv-config/default.nix @@ -6,23 +6,37 @@ , pythonOlder , pyyaml , ruamel-yaml +, setuptools +, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "riscv-config"; version = "3.18.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "riscv-software-src"; - repo = pname; + repo = "riscv-config"; rev = "refs/tags/${version}"; hash = "sha256-lBjSHfnuNPi4Ks5ZCRLqJx3/l4GMmMEEIud8ZVl/S4Q="; }; - propagatedBuildInputs = [ + pythonRelaxDeps = [ + "pyyaml" + ]; + + build-system = [ + setuptools + ]; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + dependencies = [ cerberus pyyaml ruamel-yaml @@ -37,10 +51,10 @@ buildPythonPackage rec { meta = with lib; { description = "RISC-V configuration validator"; - mainProgram = "riscv-config"; homepage = "https://github.com/riscv/riscv-config"; changelog = "https://github.com/riscv-software-src/riscv-config/blob/${version}/CHANGELOG.md"; - maintainers = with maintainers; [ genericnerdyusername ]; license = licenses.bsd3; + maintainers = with maintainers; [ genericnerdyusername ]; + mainProgram = "riscv-config"; }; }