2018-02-23 15:50:35 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2018-01-16 21:27:59 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest
|
|
|
|
, configparser
|
2018-04-05 18:42:43 +01:00
|
|
|
, isPy3k
|
2018-01-16 21:27:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Send2Trash";
|
|
|
|
version = "1.4.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hsoft";
|
|
|
|
repo = "send2trash";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1w502i5h8xaqf03g6h95h4vs1wqfv6kg925dn63phrwmg1hfz2xx";
|
|
|
|
};
|
|
|
|
|
2018-02-23 15:50:35 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2018-01-16 21:27:59 +00:00
|
|
|
checkPhase = "HOME=. py.test";
|
2018-04-05 18:42:43 +01:00
|
|
|
checkInputs = [ pytest ] ++ lib.optional (!isPy3k) configparser;
|
2018-01-16 21:27:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Send file to trash natively under macOS, Windows and Linux";
|
|
|
|
homepage = https://github.com/hsoft/send2trash;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|