]> git.scottworley.com Git - auto-upgrade-with-pinch/commitdiff
pinch: 1.3 -> 1.5
authorScott Worley <scottworley@scottworley.com>
Fri, 12 Jun 2020 08:53:16 +0000 (01:53 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 12 Jun 2020 09:37:14 +0000 (02:37 -0700)
overlays/pinch.nix

index 29d229385d9f48ae2f530e4cd768a7d9b4e21869..0dad303f43242c049b5c3f4af50bfec1047348db 100644 (file)
@@ -2,13 +2,18 @@ self: super: {
   pinch = if builtins.hasAttr "pinch" super then
     super.pinch
   else
-    super.writeShellScriptBin "pinch" ''
-      exec ${self.python3}/bin/python3 ${
-        super.fetchgit {
+    self.python3Packages.callPackage
+    ({ buildPythonPackage, fetchgit, nix, git, mypy, }:
+      buildPythonPackage rec {
+        pname = "pinch";
+        version = "1.5";
+        src = fetchgit {
           url = "https://scottworley.com/pinch.git";
-          rev = "1.3";
-          sha256 = "1l2pq0pqmjh5q8ggmz6sw6bz0nnz0jy92l5qgax8bmpm1qcszmxf";
-        }
-      }/pinch.py "$@"
-    '';
+          rev = version;
+          sha256 = "0si7z78iy8b5dfjs8ijy8bq9fwcfq51syqxijkc6mg5m7awwsf3l";
+        };
+        checkInputs = [ nix git mypy ];
+        doCheck = true;
+        checkPhase = "./test.sh";
+      }) { };
 }