nixpkgs/pkgs/development/python-modules/send2trash/default.nix
Martin Weinelt 872a77c58e python3Packages.widgetsnbextension: add setuptools to nativeBuildInputs
and migrate checkPhase to pytestCheckHook
2022-09-17 13:46:07 +02:00

40 lines
721 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
'';
checkInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Send file to trash natively under macOS, Windows and Linux";
homepage = "https://github.com/hsoft/send2trash";
license = licenses.bsd3;
};
}