X-Git-Url: http://git.scottworley.com/auto-upgrade-with-pinch/blobdiff_plain/4ed6fe195d49b7e9cfe087cbce799db8998d1e60..c1a6f7a35de34fcfd241198d4c037e57a31e8558:/overlays/pinch.nix diff --git a/overlays/pinch.nix b/overlays/pinch.nix index 1b2c65f..0dad303 100644 --- a/overlays/pinch.nix +++ b/overlays/pinch.nix @@ -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.1"; - sha256 = "0ilbhvr0d83kfwkm7ak64gik44gi2axfnp9rzsa7g5cwz9qaxdbv"; - }}/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"; + }) { }; }