about summary refs log tree commit diff
path: root/pkgs/development/python-modules/nix-prefetch-github/default.nix
blob: 6df6f15c068be958a542bae7191e6645bdd369e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ fetchFromGitHub
, lib
, buildPythonPackage
, git
, pythonOlder
}:

buildPythonPackage rec {
  pname = "nix-prefetch-github";
  version = "5.0.1";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "seppeljordan";
    repo = "nix-prefetch-github";
    rev = "v${version}";
    sha256 = "DOmFfUCLJ+rnS4PznQaQrDrqjUU4DXmOrC9BspqKZVM=";
  };

  checkInputs = [ git ];

  checkPhase = ''
    python -m unittest discover
  '';
  # ignore tests which are impure
  DISABLED_TESTS = "network requires_nix_build";

  meta = with lib; {
    description = "Prefetch sources from github";
    homepage = "https://github.com/seppeljordan/nix-prefetch-github";
    license = licenses.gpl3;
    maintainers = with maintainers; [ seppeljordan ];
  };
}