1{ lib, stdenv 2, buildPythonPackage 3, fetchFromGitHub 4, setuptools 5, pytestCheckHook 6}: 7 8buildPythonPackage rec { 9 pname = "Send2Trash"; 10 version = "1.8.2"; 11 format = "pyproject"; 12 13 src = fetchFromGitHub { 14 owner = "hsoft"; 15 repo = "send2trash"; 16 rev = "refs/tags/${version}"; 17 hash = "sha256-p0Pd9g+nLoT+oruthwjBn2E9rznvcx35VmzOAce2iTY="; 18 }; 19 20 nativeBuildInputs = [ 21 setuptools 22 ]; 23 24 doCheck = !stdenv.isDarwin; 25 26 preCheck = '' 27 export HOME=$TMPDIR 28 ''; 29 30 nativeCheckInputs = [ 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 changelog = "https://github.com/arsenetar/send2trash/blob/${version}/CHANGES.rst"; 38 license = licenses.bsd3; 39 maintainers = with maintainers; [ ]; 40 }; 41}