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