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