]> git.scottworley.com Git - git-cache/blob - default.nix
a09bd68da2f70099dc61d6d4b8ebb7f43f10b41d
[git-cache] / default.nix
1 { pkgs ? import <nixpkgs> { }, lint ? false }:
2
3 let
4 checkInputsAreNative = pkgs.lib.hasInfix "nativeCheckInputs"
5 (builtins.readFile <nixpkgs/doc/stdenv/stdenv.chapter.md>);
6 checkInputsName =
7 if checkInputsAreNative then "nativeCheckInputs" else "checkInputs";
8 in pkgs.python3Packages.callPackage
9 ({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }:
10 buildPythonPackage rec {
11 pname = "git-cache";
12 version = "1.4.3";
13 src = lib.cleanSource ./.;
14 propagatedBuildInputs = [ backoff ];
15 "${checkInputsName}" = [ nix git mypy ]
16 ++ lib.optionals lint [ autopep8 pylint ];
17 doCheck = true;
18 checkPhase = "./test.sh";
19 meta = {
20 description = "Cache git content locally";
21 homepage = "https://git.scottworley.com/git-cache";
22 license = pkgs.lib.licenses.gpl3;
23 maintainers = with pkgs.lib.maintainers; [ chkno ];
24 };
25 }) { }