python3Packages.widgetsnbextension: add setuptools to nativeBuildInputs

and migrate checkPhase to pytestCheckHook
This commit is contained in:
Martin Weinelt 2022-09-17 02:49:40 +02:00 committed by Frederik Rietdijk
parent 88373b3900
commit 872a77c58e

View File

@ -1,7 +1,8 @@
{ lib, stdenv
, buildPythonPackage
, fetchFromGitHub
, pytest
, setuptools
, pytestCheckHook
}:
buildPythonPackage rec {
@ -12,13 +13,23 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "hsoft";
repo = "send2trash";
rev = version;
sha256 = "sha256-kDUEfyMTk8CXSxTEi7E6kl09ohnWHeaoif+EIaIJh9Q=";
rev = "refs/tags/${version}";
hash = "sha256-kDUEfyMTk8CXSxTEi7E6kl09ohnWHeaoif+EIaIJh9Q=";
};
nativeBuildInputs = [
setuptools
];
doCheck = !stdenv.isDarwin;
checkPhase = "HOME=$TMPDIR pytest";
checkInputs = [ pytest ];
preCheck = ''
export HOME=$TMPDIR
'';
checkInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Send file to trash natively under macOS, Windows and Linux";