depot/third_party/nixpkgs/pkgs/development/python-modules/send2trash/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

39 lines
727 B
Nix

{ lib, stdenv
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "Send2Trash";
version = "1.8.1b0";
format = "pyproject";
src = fetchFromGitHub {
owner = "hsoft";
repo = "send2trash";
rev = "refs/tags/${version}";
hash = "sha256-kDUEfyMTk8CXSxTEi7E6kl09ohnWHeaoif+EIaIJh9Q=";
};
nativeBuildInputs = [
setuptools
];
doCheck = !stdenv.isDarwin;
preCheck = ''
export HOME=$TMPDIR
'';
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Send file to trash natively under macOS, Windows and Linux";
homepage = "https://github.com/hsoft/send2trash";
license = licenses.bsd3;
};
}