1 { pkgs ? import <nixpkgs> { }, lint ? false }:
4 checkInputsAreNative = pkgs.lib.hasInfix "nativeCheckInputs"
5 (builtins.readFile <nixpkgs/doc/stdenv/stdenv.chapter.md>);
7 if checkInputsAreNative then "nativeCheckInputs" else "checkInputs";
9 git-cache-fallback = { buildPythonPackage, fetchgit, git, backoff, mypy, }:
10 buildPythonPackage rec {
14 url = "https://git.scottworley.com/pub/git/git-cache";
16 hash = "sha256-g4TS/zX3e29Q3ThsCAX2wLLlYbi8fdux5uqAc+b/Oww=";
18 propagatedBuildInputs = [ backoff ];
19 "${checkInputsName}" = [ git mypy ];
21 checkPhase = "./test.sh";
24 in pkgs.python3Packages.callPackage
25 ({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, git-cache, }:
26 buildPythonPackage rec {
28 version = "3.3.1-pre";
29 src = lib.cleanSource ./.;
30 propagatedBuildInputs = [ git-cache ];
31 "${checkInputsName}" = [ nix git mypy ]
32 ++ lib.optionals lint [ autopep8 pylint ];
34 checkPhase = "./test.sh";
36 description = "A replacement for `nix-channel --update`";
37 homepage = "https://git.scottworley.com/pinch";
38 license = pkgs.lib.licenses.gpl3;
39 maintainers = with pkgs.lib.maintainers; [ chkno ];
43 pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage
44 git-cache-fallback { });