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