]> git.scottworley.com Git - git-cache/blob - default.nix
Adapt to nixpkgs' nativeCheckInputs change
[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.2";
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 }) { }