1{ lib, stdenv 2, buildPythonPackage 3, fetchFromGitHub 4, setuptools 5, pytestCheckHook 6}: 7 8buildPythonPackage rec { 9 pname = "Send2Trash"; 10 version = "1.8.1b0"; 11 format = "pyproject"; 12 13 src = fetchFromGitHub { 14 owner = "hsoft"; 15 repo = "send2trash"; 16 rev = "refs/tags/${version}"; 17 hash = "sha256-kDUEfyMTk8CXSxTEi7E6kl09ohnWHeaoif+EIaIJh9Q="; 18 }; 19 20 nativeBuildInputs = [ 21 setuptools 22 ]; 23 24 doCheck = !stdenv.isDarwin; 25 26 preCheck = '' 27 export HOME=$TMPDIR 28 ''; 29 30 checkInputs = [ 31 pytestCheckHook 32 ]; 33 34 meta = with lib; { 35 description = "Send file to trash natively under macOS, Windows and Linux"; 36 homepage = "https://github.com/hsoft/send2trash"; 37 license = licenses.bsd3; 38 }; 39}