nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ fetchFromGitHub
2, lib
3, buildPythonPackage
4, git
5, which
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "nix-prefetch-github";
11 version = "5.1.2";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "seppeljordan";
17 repo = "nix-prefetch-github";
18 rev = "v${version}";
19 sha256 = "GHUH3Oog800qrdgXs5AEa4O6ovZ1LT0k3P4YwEHfwlY=";
20 };
21
22 checkInputs = [ git which ];
23
24 checkPhase = ''
25 python -m unittest discover
26 '';
27 # ignore tests which are impure
28 DISABLED_TESTS = "network requires_nix_build";
29
30 meta = with lib; {
31 description = "Prefetch sources from github";
32 homepage = "https://github.com/seppeljordan/nix-prefetch-github";
33 license = licenses.gpl3;
34 maintainers = with maintainers; [ seppeljordan ];
35 };
36}