From bb034f61a29552f0349536d2e2b8a11a4602cc4d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 11 May 2023 05:03:17 +0000 Subject: [PATCH 1/2] python310Packages.riscv-isac: 0.16.1 -> 0.17.0 --- pkgs/development/python-modules/riscv-isac/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/riscv-isac/default.nix b/pkgs/development/python-modules/riscv-isac/default.nix index 98fff40285b2..a577cb8a054f 100644 --- a/pkgs/development/python-modules/riscv-isac/default.nix +++ b/pkgs/development/python-modules/riscv-isac/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "riscv-isac"; - version = "0.16.1"; + version = "0.17.0"; src = fetchFromGitHub { owner = "riscv-software-src"; repo = pname; - rev = version; - hash = "sha256-Krjr9bvpoOeNfMbYj/QbJ+Y+AVLjwrzj8KKMUXCfnMA="; + rev = "refs/tags/${version}"; + hash = "sha256-I0RsvSCrSlNGVj8z+WUQx6vbdNkKCRyMFvNx+0mTBAE="; }; postPatch = "substituteInPlace riscv_isac/requirements.txt --replace 'pyelftools==0.26' pyelftools"; From 9b979714b6745a9ba1d24a2468806410396a2a1f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 May 2023 09:41:22 +0200 Subject: [PATCH 2/2] python310Packages.riscv-isac: add changelog to meta - switch to pytestCheckHook - add pythonImportsCheck --- .../python-modules/riscv-isac/default.nix | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/riscv-isac/default.nix b/pkgs/development/python-modules/riscv-isac/default.nix index a577cb8a054f..13aca2c0d7b6 100644 --- a/pkgs/development/python-modules/riscv-isac/default.nix +++ b/pkgs/development/python-modules/riscv-isac/default.nix @@ -1,19 +1,24 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchFromGitHub -, lib , click , colorlog , gitpython +, pluggy , pyelftools , pytablewriter -, pytest +, pytestCheckHook , pyyaml , ruamel-yaml +, pythonOlder }: buildPythonPackage rec { pname = "riscv-isac"; version = "0.17.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "riscv-software-src"; @@ -22,23 +27,36 @@ buildPythonPackage rec { hash = "sha256-I0RsvSCrSlNGVj8z+WUQx6vbdNkKCRyMFvNx+0mTBAE="; }; - postPatch = "substituteInPlace riscv_isac/requirements.txt --replace 'pyelftools==0.26' pyelftools"; + postPatch = '' + substituteInPlace riscv_isac/requirements.txt \ + --replace "pyelftools==0.26" "pyelftools" \ + --replace "pytest" "" + ''; propagatedBuildInputs = [ click colorlog gitpython + pluggy pyelftools pytablewriter - pytest pyyaml ruamel-yaml ]; + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "riscv_isac" + ]; + meta = with lib; { - homepage = "https://github.com/riscv/riscv-isac"; description = "An ISA coverage extraction tool"; - maintainers = with maintainers; [ genericnerdyusername ]; + homepage = "https://github.com/riscv/riscv-isac"; + changelog = "https://github.com/riscv-software-src/riscv-isac/blob/${version}/CHANGELOG.md"; license = licenses.bsd3; + maintainers = with maintainers; [ genericnerdyusername ]; }; }