X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/9ee71b8de80b57ed5851203b581ac09b3792d2c8..864c15119640eb6fee56d926044db1ac0b7cad0d:/default.nix diff --git a/default.nix b/default.nix index 9e2a5f1..62798c1 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,32 @@ { pkgs ? import { }, lint ? false }: -pkgs.python3Packages.callPackage -({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, }: + +let + git-cache-fallback = { buildPythonPackage, fetchgit, git, mypy, }: + buildPythonPackage rec { + pname = "git-cache"; + version = "1.0.0"; + src = fetchgit { + url = "https://scottworley.com/git-cache.git"; + rev = "v${version}"; + sha256 = "06mzjc424988n2s1h25x2bi3mxbk2pnba31zkjljgw4cgw2p9036"; + }; + checkInputs = [ git mypy ]; + doCheck = true; + checkPhase = "./test.sh"; + }; + +in pkgs.python3Packages.callPackage +({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, git-cache, }: buildPythonPackage rec { pname = "pinch"; - version = "2.1.0-pre"; + version = "3.0.0"; src = lib.cleanSource ./.; + propagatedBuildInputs = [ git-cache ]; checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; doCheck = true; checkPhase = "./test.sh"; - }) { } + }) { + git-cache = + pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage + git-cache-fallback { }); + }