-pkgs.python3Packages.callPackage
-({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, }:
+
+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.4.3";
+ src = fetchgit {
+ url = "https://git.scottworley.com/pub/git/git-cache";
+ rev = "v${version}";
+ hash = "sha256-Qr62bGdlFFkzYTl6ot34UiOJxbP1Eeelx2OEd96vrqI=";
+ };
+ 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, }: