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.2";
- sha256 = "0s0rk1m0irsdj0xjnix9y1825pjv7lhbmnn73jgjbj1hi6wqwpfh";
- }
- }/pinch.py "$@"
- '';
+ rev = version;
+ sha256 = "0si7z78iy8b5dfjs8ijy8bq9fwcfq51syqxijkc6mg5m7awwsf3l";
+ };
+ checkInputs = [ nix git mypy ];
+ doCheck = true;
+ checkPhase = "./test.sh";
+ }) { };
}