summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/nix-prefetch-github/default.nix
blob: ae1d3c35eac291b32737184c0c59ef1d77a6f176 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  fetchFromGitHub,
  lib,
  buildPythonPackage,
  git,
  which,
  unittestCheckHook,
  sphinxHook,
  sphinx-argparse,
  parameterized,
  setuptools,
  nix,
}:

buildPythonPackage rec {
  pname = "nix-prefetch-github";
  version = "7.1.0";
  pyproject = true;

  outputs = [
    "out"
    "man"
  ];

  src = fetchFromGitHub {
    owner = "seppeljordan";
    repo = "nix-prefetch-github";
    rev = "v${version}";
    hash = "sha256-eQd/MNlnuzXzgFzvwUMchvHoIvkIrbpGKV7iknO14Cc=";
  };

  dependencies = [ nix ];

  nativeBuildInputs = [
    sphinxHook
    sphinx-argparse
    setuptools
  ];
  nativeCheckInputs = [
    unittestCheckHook
    git
    which
    parameterized
  ];

  sphinxBuilders = [ "man" ];
  sphinxRoot = "docs";

  # ignore tests which are impure
  DISABLED_TESTS = "network requires_nix_build";

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