]> git.scottworley.com Git - git-cache/blame - default.nix
Support "tag <tag>" syntax for fetching tags
[git-cache] / default.nix
CommitLineData
bef7ce53 1{ pkgs ? import <nixpkgs> { }, lint ? false }:
f36d5c6f 2
ce9660cb
SW
3let
4 checkInputsAreNative = pkgs.lib.hasInfix "nativeCheckInputs"
5 (builtins.readFile <nixpkgs/doc/stdenv/stdenv.chapter.md>);
6 checkInputsName =
7 if checkInputsAreNative then "nativeCheckInputs" else "checkInputs";
8in pkgs.python3Packages.callPackage
f36d5c6f 9({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }:
bef7ce53
SW
10 buildPythonPackage rec {
11 pname = "git-cache";
50c43b55 12 version = "1.5.0-pre";
bef7ce53 13 src = lib.cleanSource ./.;
f36d5c6f 14 propagatedBuildInputs = [ backoff ];
ce9660cb
SW
15 "${checkInputsName}" = [ nix git mypy ]
16 ++ lib.optionals lint [ autopep8 pylint ];
bef7ce53
SW
17 doCheck = true;
18 checkPhase = "./test.sh";
50685beb
SW
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 };
604501ec 25 }) { }