diff --git a/pkgs/development/python-modules/nix-prefetch-github/default.nix b/pkgs/development/python-modules/nix-prefetch-github/default.nix index d7f203aa4d8d..d4817480e57c 100644 --- a/pkgs/development/python-modules/nix-prefetch-github/default.nix +++ b/pkgs/development/python-modules/nix-prefetch-github/default.nix @@ -1,41 +1,38 @@ -{ fetchPypi +{ fetchFromGitHub , lib , buildPythonPackage -, pythonOlder , attrs , click , effect -, jinja2 , git , pytestCheckHook , pytestcov -, pytest-isort +, pythonOlder }: buildPythonPackage rec { pname = "nix-prefetch-github"; - version = "4.0.2"; + version = "4.0.3"; - src = fetchPypi { - inherit pname version; - sha256 = "ZdaWIkpJk8AvTZmA76VMTXeOUTrWLe+W3vh/e0zwWB4="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "seppeljordan"; + repo = "nix-prefetch-github"; + rev = "v${version}"; + sha256 = "CLcmwobPrL6NiI/nw+/Dwho/r15owV16Jmt5OcfFqvo="; }; propagatedBuildInputs = [ attrs click effect - jinja2 ]; - checkInputs = [ pytestCheckHook pytestcov pytest-isort git ]; - checkPhase = '' - pytest -m 'not network' - ''; + checkInputs = [ pytestCheckHook pytestcov git ]; - # latest version of isort will cause tests to fail # ignore tests which are impure - disabledTests = [ "isort" "life" "outputs" "fetch_submodules" ]; + disabledTests = [ "network" "requires_nix_build" ]; meta = with lib; { description = "Prefetch sources from github";