From b3559b7817d057ee04dfdfe8dcf8da2d892bc6ba Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Tue, 15 Mar 2022 21:50:39 +0100 Subject: [PATCH 1/2] python3Packages.ndspy: 3.0.0 -> 4.0.0 --- .../python-modules/ndspy/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/ndspy/default.nix b/pkgs/development/python-modules/ndspy/default.nix index 9c4d91df9d65..be3510823b38 100644 --- a/pkgs/development/python-modules/ndspy/default.nix +++ b/pkgs/development/python-modules/ndspy/default.nix @@ -1,18 +1,19 @@ -{ lib, buildPythonPackage, fetchPypi, crcmod }: +{ lib, buildPythonPackage, fetchFromGitHub, crcmod, pytestCheckHook }: buildPythonPackage rec { pname = "ndspy"; - version = "3.0.0"; + version = "4.0.0"; - src = fetchPypi { - inherit pname version; - sha256 = "1s0i81gspas22bjwk9vhy3x5sw1svyybk7c2j1ixc77drr9ym20a"; + src = fetchFromGitHub { + owner = "RoadrunnerWMC"; + repo = pname; + rev = "v${version}"; + sha256 = "0x3sp10had1mq192m7kgjivvs8kpjagxjgj9d4z95dfjhzzbjh70"; }; propagatedBuildInputs = [ crcmod ]; - - doCheck = false; # there are no tests - pythonImportsCheck = [ "ndspy" ]; + checkInputs = [ pytestCheckHook ]; + preCheck = "cd tests"; meta = with lib; { homepage = "https://github.com/RoadrunnerWMC/ndspy"; From 69db43f107db622868e1a4c69cddd27f71edb2a9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 24 Mar 2022 09:08:37 +0100 Subject: [PATCH 2/2] python3Packages.ndspy: disable on older Python releases --- .../python-modules/ndspy/default.nix | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ndspy/default.nix b/pkgs/development/python-modules/ndspy/default.nix index be3510823b38..7408949649fa 100644 --- a/pkgs/development/python-modules/ndspy/default.nix +++ b/pkgs/development/python-modules/ndspy/default.nix @@ -1,8 +1,17 @@ -{ lib, buildPythonPackage, fetchFromGitHub, crcmod, pytestCheckHook }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, crcmod +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "ndspy"; version = "4.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "RoadrunnerWMC"; @@ -11,13 +20,25 @@ buildPythonPackage rec { sha256 = "0x3sp10had1mq192m7kgjivvs8kpjagxjgj9d4z95dfjhzzbjh70"; }; - propagatedBuildInputs = [ crcmod ]; - checkInputs = [ pytestCheckHook ]; - preCheck = "cd tests"; + propagatedBuildInputs = [ + crcmod + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "ndspy" + ]; + + preCheck = '' + cd tests + ''; meta = with lib; { + description = "Python library for many Nintendo DS file formats"; homepage = "https://github.com/RoadrunnerWMC/ndspy"; - description = "A Python library for many Nintendo DS file formats"; license = licenses.gpl3Plus; maintainers = with maintainers; [ xfix ]; };