about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix23
1 files changed, 17 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix b/nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix
index 56387835cc6e..67873f929ad4 100644
--- a/nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/nix-prefetch-github/default.nix
@@ -1,25 +1,27 @@
 { fetchPypi
 , lib
 , buildPythonPackage
+, pythonOlder
 , attrs
 , click
 , effect
 , jinja2
+, git
+, pytestCheckHook
+, pytest-black
+, pytestcov
+, pytest-isort
 }:
 
 buildPythonPackage rec {
   pname = "nix-prefetch-github";
-  version = "2.4";
+  version = "3.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-PVB/cL0NVB5pHxRMjg8TLatvIvHjfCvaRWBanVHYT+E=";
+    sha256 = "sha256-EN+EbVXUaf+id5UsK4EBm/9k9FYaH79g08kblvW60XA=";
   };
 
-  # The tests for this package require nix and network access.  That's
-  # why we cannot execute them inside the building process.
-  doCheck = false;
-
   propagatedBuildInputs = [
     attrs
     click
@@ -27,6 +29,15 @@ buildPythonPackage rec {
     jinja2
   ];
 
+  checkInputs = [ pytestCheckHook pytest-black pytestcov pytest-isort git ];
+  checkPhase = ''
+    pytest -m 'not network'
+  '';
+
+  # latest version of isort will cause tests to fail
+  # ignore tests which are impure
+  disabledTests = [ "isort" "life" "outputs" "fetch_submodules" ];
+
   meta = with lib; {
     description = "Prefetch sources from github";
     homepage = "https://github.com/seppeljordan/nix-prefetch-github";