summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/override/nix-prefetch-github.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-10-18 19:25:11 +0200
committerlassulus <lassulus@lassul.us>2020-10-18 19:25:11 +0200
commit5b29d7a435092aafcea15f588effbb6f45a6a56e (patch)
tree07340bc138d7bdea55bbb33e50fc2fa1b5387a57 /tv/5pkgs/override/nix-prefetch-github.nix
parent9626d3cda953929e903b5a06595e98972cb08ffc (diff)
parentb034f63f7a2e4361b32c33c0e1a980eecf1a5aa6 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/5pkgs/override/nix-prefetch-github.nix')
-rw-r--r--tv/5pkgs/override/nix-prefetch-github.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/tv/5pkgs/override/nix-prefetch-github.nix b/tv/5pkgs/override/nix-prefetch-github.nix
new file mode 100644
index 000000000..67873f929
--- /dev/null
+++ b/tv/5pkgs/override/nix-prefetch-github.nix
@@ -0,0 +1,47 @@
+{ fetchPypi
+, lib
+, buildPythonPackage
+, pythonOlder
+, attrs
+, click
+, effect
+, jinja2
+, git
+, pytestCheckHook
+, pytest-black
+, pytestcov
+, pytest-isort
+}:
+
+buildPythonPackage rec {
+ pname = "nix-prefetch-github";
+ version = "3.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-EN+EbVXUaf+id5UsK4EBm/9k9FYaH79g08kblvW60XA=";
+ };
+
+ propagatedBuildInputs = [
+ attrs
+ click
+ effect
+ 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";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ seppeljordan ];
+ };
+}