]> git.scottworley.com Git - auto-upgrade-with-pinch/blobdiff - overlays/pinch.nix
polite-merge: 2.1 -> 2.3, required for git 2.28 -> 2.29
[auto-upgrade-with-pinch] / overlays / pinch.nix
index d85be2d49e17741bce7616f4db98062c35570773..0dad303f43242c049b5c3f4af50bfec1047348db 100644 (file)
@@ -1,9 +1,19 @@
 self: super: {
-  pinch = super.writeShellScriptBin "pinch" ''
-    exec ${self.python3}/bin/python3 ${super.fetchgit {
-      url = "https://scottworley.com/pinch.git";
-      rev = "1.0";
-      sha256 = "0dlyx1vadppalpc1kr777k8ij3x04lz2m938y205xi7k5ab6j6fr";
-    }}/pinch.py "$@"
-  '';
+  pinch = if builtins.hasAttr "pinch" super then
+    super.pinch
+  else
+    self.python3Packages.callPackage
+    ({ buildPythonPackage, fetchgit, nix, git, mypy, }:
+      buildPythonPackage rec {
+        pname = "pinch";
+        version = "1.5";
+        src = fetchgit {
+          url = "https://scottworley.com/pinch.git";
+          rev = version;
+          sha256 = "0si7z78iy8b5dfjs8ijy8bq9fwcfq51syqxijkc6mg5m7awwsf3l";
+        };
+        checkInputs = [ nix git mypy ];
+        doCheck = true;
+        checkPhase = "./test.sh";
+      }) { };
 }