diff --git a/pkgs/development/python-modules/argh/default.nix b/pkgs/development/python-modules/argh/default.nix index bbe120ec14fe..fd9ff184000f 100644 --- a/pkgs/development/python-modules/argh/default.nix +++ b/pkgs/development/python-modules/argh/default.nix @@ -1,11 +1,10 @@ { lib , buildPythonPackage , fetchPypi -, pytest -, py -, mock -, glibcLocales +, fetchpatch , iocapture +, mock +, pytestCheckHook }: buildPythonPackage rec { @@ -17,18 +16,27 @@ buildPythonPackage rec { sha256 = "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65"; }; - checkInputs = [ pytest py mock glibcLocales iocapture ]; + patches = [ + # https://github.com/neithere/argh/issues/148 + (fetchpatch { + name = "argh-0.26.2-fix-py3.9-msgs.patch"; + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch?id=6f194f12a2e30aad7da347848f7b0187e188f983"; + sha256 = "nBmhF2PXVeS7cBNujzip6Bb601LRHrjmhlGKFr/++Oo="; + }) + ]; - checkPhase = '' - export LANG="en_US.UTF-8" - py.test - ''; + checkInputs = [ + iocapture + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "argh" ]; meta = with lib; { - homepage = "https://github.com/neithere/argh/"; + homepage = "https://github.com/neithere/argh"; description = "An unobtrusive argparse wrapper with natural syntax"; - license = licenses.lgpl2; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ domenkozar ]; }; - } diff --git a/pkgs/tools/misc/barman/default.nix b/pkgs/tools/misc/barman/default.nix index c9a561c8729f..699a38f3a879 100644 --- a/pkgs/tools/misc/barman/default.nix +++ b/pkgs/tools/misc/barman/default.nix @@ -20,7 +20,6 @@ python3Packages.buildPythonApplication rec { propagatedBuildInputs = with python3Packages; [ argcomplete - argh azure-identity azure-storage-blob boto3 diff --git a/pkgs/tools/networking/yrd/default.nix b/pkgs/tools/networking/yrd/default.nix index 75a89b859fe8..1aace6aefbb5 100644 --- a/pkgs/tools/networking/yrd/default.nix +++ b/pkgs/tools/networking/yrd/default.nix @@ -1,27 +1,37 @@ -{ lib, fetchFromGitHub, pythonPackages }: +{ lib +, python3 +, fetchFromGitHub +}: -let +python3.pkgs.buildPythonApplication rec { pname = "yrd"; version = "0.5.3"; - sha256 = "1yx1hr8z4cvlb3yi24dwafs0nxq41k4q477jc9q24w61a0g662ps"; - -in pythonPackages.buildPythonApplication { - name = "${pname}-${version}"; src = fetchFromGitHub { owner = "kpcyrd"; repo = pname; rev = "v${version}"; - inherit sha256; + sha256 = "1yx1hr8z4cvlb3yi24dwafs0nxq41k4q477jc9q24w61a0g662ps"; }; - propagatedBuildInputs = with pythonPackages; [ argh ]; + propagatedBuildInputs = with python3.pkgs; [ + argh + requests + ]; + + checkInputs = with python3.pkgs; [ + nose + ]; + + checkPhase = '' + nosetests -v yrd + ''; meta = with lib; { description = "Cjdns swiss army knife"; maintainers = with maintainers; [ akru ]; platforms = platforms.linux; - license = licenses.gpl3; + license = licenses.gpl3Only; homepage = "https://github.com/kpcyrd/yrd"; }; }