1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, pytest 6, configparser 7, isPy3k 8}: 9 10buildPythonPackage rec { 11 pname = "Send2Trash"; 12 version = "1.4.2"; 13 14 src = fetchFromGitHub { 15 owner = "hsoft"; 16 repo = "send2trash"; 17 rev = version; 18 sha256 = "1w502i5h8xaqf03g6h95h4vs1wqfv6kg925dn63phrwmg1hfz2xx"; 19 }; 20 21 doCheck = !stdenv.isDarwin; 22 checkPhase = "HOME=. py.test"; 23 checkInputs = [ pytest ] ++ lib.optional (!isPy3k) configparser; 24 25 meta = with lib; { 26 description = "Send file to trash natively under macOS, Windows and Linux"; 27 homepage = https://github.com/hsoft/send2trash; 28 license = licenses.bsd3; 29 }; 30}