-{ pkgs ? import <nixpkgs> { } }:
-pkgs.python3Packages.callPackage
-({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, }:
+{ pkgs ? import <nixpkgs> { }, lint ? false }:
+
+let
+ checkInputsAreNative = pkgs.lib.hasInfix "nativeCheckInputs"
+ (builtins.readFile <nixpkgs/doc/stdenv/stdenv.chapter.md>);
+ checkInputsName =
+ if checkInputsAreNative then "nativeCheckInputs" else "checkInputs";
+
+ git-cache-fallback = { buildPythonPackage, fetchgit, git, backoff, mypy, }:
+ buildPythonPackage rec {
+ pname = "git-cache";
+ version = "1.5.0";
+ src = fetchgit {
+ url = "https://git.scottworley.com/pub/git/git-cache";
+ rev = "v${version}";
+ hash = "sha256-g4TS/zX3e29Q3ThsCAX2wLLlYbi8fdux5uqAc+b/Oww=";
+ };
+ propagatedBuildInputs = [ backoff ];
+ "${checkInputsName}" = [ git mypy ];
+ doCheck = true;
+ checkPhase = "./test.sh";
+ };
+
+in pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, nix_2_3, git
+ , autopep8, makeWrapper, mypy, pylint, git-cache, }: