diff --git a/pkgs/development/python-modules/send2trash/default.nix b/pkgs/development/python-modules/send2trash/default.nix new file mode 100644 index 000000000000..379f5677bd1c --- /dev/null +++ b/pkgs/development/python-modules/send2trash/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest +, configparser +}: + +buildPythonPackage rec { + pname = "Send2Trash"; + version = "1.4.2"; + + src = fetchFromGitHub { + owner = "hsoft"; + repo = "send2trash"; + rev = version; + sha256 = "1w502i5h8xaqf03g6h95h4vs1wqfv6kg925dn63phrwmg1hfz2xx"; + }; + + checkPhase = "HOME=. py.test"; + checkInputs = [ pytest configparser ]; + + meta = with lib; { + description = "Send file to trash natively under macOS, Windows and Linux"; + homepage = https://github.com/hsoft/send2trash; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d812e395a4ab..1dc82363ca73 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -21877,23 +21877,7 @@ EOF }; }; - send2trash = buildPythonPackage (rec { - name = "Send2Trash-1.3.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/S/Send2Trash/${name}.tar.gz"; - sha256 = "1zjq5ki02l0vl4f1xymsnqyxipx6q81a435p46db07l3mqg4dx1k"; - }; - - # no tests - doCheck = false; - - meta = { - description = "Send file to trash natively under macOS, Windows and Linux"; - homepage = https://github.com/hsoft/send2trash; - license = licenses.bsd3; - }; - }); + send2trash = callPackage ../development/python-modules/send2trash { }; sigtools = buildPythonPackage rec { name = "sigtools-${version}";