]> git.scottworley.com Git - git-cache/blobdiff - default.nix
Adapt to nixpkgs' nativeCheckInputs change
[git-cache] / default.nix
index 6c57b0d389bd9f9d1ae2c26ee2232b0ec5851078..d2337001f358cca6a852fa39f7b5452404d3bed1 100644 (file)
@@ -1,11 +1,25 @@
 { pkgs ? import <nixpkgs> { }, lint ? false }:
-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";
+in pkgs.python3Packages.callPackage
+({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }:
   buildPythonPackage rec {
     pname = "git-cache";
-    version = "1.2.0-pre";
+    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 ];
+    };
   }) { }