2021-01-15 22:18:51 +00:00
{ lib , stdenv
2020-04-24 23:36:52 +00:00
, buildPythonPackage
, fetchFromGitHub
2022-09-30 11:47:45 +00:00
, setuptools
, pytestCheckHook
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " S e n d 2 T r a s h " ;
2021-12-26 17:43:05 +00:00
version = " 1 . 8 . 1 b 0 " ;
format = " p y p r o j e c t " ;
2020-04-24 23:36:52 +00:00
src = fetchFromGitHub {
owner = " h s o f t " ;
repo = " s e n d 2 t r a s h " ;
2022-09-30 11:47:45 +00:00
rev = " r e f s / t a g s / ${ version } " ;
hash = " s h a 2 5 6 - k D U E f y M T k 8 C X S x T E i 7 E 6 k l 0 9 o h n W H e a o i f + E I a I J h 9 Q = " ;
2020-04-24 23:36:52 +00:00
} ;
2023-03-15 16:39:30 +00:00
postPatch = ''
# Confuses setuptools validation
# setuptools.extern.packaging.requirements.InvalidRequirement: One of the parsed requirements in `extras_require[win32]` looks like a valid environment marker: 'sys_platform == "win32"'
sed - i ' /win32 = /d ' setup . cfg
# setuptools.extern.packaging.requirements.InvalidRequirement: One of the parsed requirements in `extras_require[objc]` looks like a valid environment marker: 'sys_platform == "darwin"'
sed - i ' /objc = /d ' setup . cfg
'' ;
2022-09-30 11:47:45 +00:00
nativeBuildInputs = [
setuptools
] ;
2020-04-24 23:36:52 +00:00
doCheck = ! stdenv . isDarwin ;
2022-09-30 11:47:45 +00:00
preCheck = ''
export HOME = $ TMPDIR
'' ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2022-09-30 11:47:45 +00:00
pytestCheckHook
] ;
2020-04-24 23:36:52 +00:00
2021-01-15 22:18:51 +00:00
meta = with lib ; {
2020-04-24 23:36:52 +00:00
description = " S e n d f i l e t o t r a s h n a t i v e l y u n d e r m a c O S , W i n d o w s a n d L i n u x " ;
homepage = " h t t p s : / / g i t h u b . c o m / h s o f t / s e n d 2 t r a s h " ;
2023-03-15 16:39:30 +00:00
changelog = " h t t p s : / / g i t h u b . c o m / a r s e n e t a r / s e n d 2 t r a s h / b l o b / ${ version } / C H A N G E S . r s t " ;
2020-04-24 23:36:52 +00:00
license = licenses . bsd3 ;
2023-03-15 16:39:30 +00:00
maintainers = with maintainers ; [ ] ;
2020-04-24 23:36:52 +00:00
} ;
}