1{
2 fetchFromGitHub,
3 lib,
4 buildPythonPackage,
5 git,
6 which,
7 pythonOlder,
8 unittestCheckHook,
9 sphinxHook,
10 sphinx-argparse,
11 parameterized,
12 setuptools,
13 nix,
14}:
15
16buildPythonPackage rec {
17 pname = "nix-prefetch-github";
18 version = "7.1.0";
19 pyproject = true;
20
21 outputs = [
22 "out"
23 "man"
24 ];
25 disabled = pythonOlder "3.9";
26
27 src = fetchFromGitHub {
28 owner = "seppeljordan";
29 repo = "nix-prefetch-github";
30 rev = "v${version}";
31 hash = "sha256-eQd/MNlnuzXzgFzvwUMchvHoIvkIrbpGKV7iknO14Cc=";
32 };
33
34 dependencies = [ nix ];
35
36 nativeBuildInputs = [
37 sphinxHook
38 sphinx-argparse
39 setuptools
40 ];
41 nativeCheckInputs = [
42 unittestCheckHook
43 git
44 which
45 parameterized
46 ];
47
48 sphinxBuilders = [ "man" ];
49 sphinxRoot = "docs";
50
51 # ignore tests which are impure
52 DISABLED_TESTS = "network requires_nix_build";
53
54 meta = with lib; {
55 description = "Prefetch sources from github";
56 homepage = "https://github.com/seppeljordan/nix-prefetch-github";
57 license = licenses.gpl3;
58 maintainers = with maintainers; [ seppeljordan ];
59 };
60}