X-Git-Url: http://git.scottworley.com/git-cache/blobdiff_plain/839f8d8d2d0815257660e29fe8caea1db3a914a8..ce9660cb142544ff3612bb2e39e2d2860a72dc5c:/default.nix?ds=sidebyside diff --git a/default.nix b/default.nix index 0a040cf..d233700 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,25 @@ { pkgs ? import { }, lint ? false }: -pkgs.python3Packages.callPackage -({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, }: + +let + checkInputsAreNative = pkgs.lib.hasInfix "nativeCheckInputs" + (builtins.readFile ); + checkInputsName = + if checkInputsAreNative then "nativeCheckInputs" else "checkInputs"; +in pkgs.python3Packages.callPackage +({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }: buildPythonPackage rec { pname = "git-cache"; - version = "1.1.0"; + version = "1.4.2"; src = lib.cleanSource ./.; - checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; + propagatedBuildInputs = [ backoff ]; + "${checkInputsName}" = [ nix git mypy ] + ++ lib.optionals lint [ autopep8 pylint ]; doCheck = true; checkPhase = "./test.sh"; + meta = { + description = "Cache git content locally"; + homepage = "https://git.scottworley.com/git-cache"; + license = pkgs.lib.licenses.gpl3; + maintainers = with pkgs.lib.maintainers; [ chkno ]; + }; }) { }