2018-06-07 17:17:20 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, coreutils
|
2018-07-21 00:44:44 +00:00
|
|
|
, python3Packages, substituteAll }:
|
2018-06-07 17:17:20 +00:00
|
|
|
|
2017-03-03 01:44:17 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-03-29 10:34:50 +00:00
|
|
|
pname = "trash-cli";
|
2020-11-11 17:56:41 +00:00
|
|
|
version = "0.20.11.7";
|
2014-12-23 07:35:26 +00:00
|
|
|
|
2017-03-03 01:44:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andreafrancia";
|
|
|
|
repo = "trash-cli";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2020-11-11 17:56:41 +00:00
|
|
|
sha256 = "0083vagy0jkahb5sw1il7r53ggk45zbjwwjsqd76v7ph3v1awf4v";
|
2014-12-23 07:35:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2018-06-07 17:17:20 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./nix-paths.patch;
|
|
|
|
df = "${coreutils}/bin/df";
|
2018-06-11 10:26:52 +00:00
|
|
|
libc = let ext = if stdenv.isDarwin then ".dylib" else ".so.6";
|
|
|
|
in "${stdenv.cc.libc}/lib/libc${ext}";
|
2018-06-07 17:17:20 +00:00
|
|
|
})
|
2014-12-23 07:35:26 +00:00
|
|
|
];
|
|
|
|
|
2019-03-04 13:52:33 +00:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
nose
|
|
|
|
mock
|
|
|
|
];
|
2014-12-23 07:35:26 +00:00
|
|
|
checkPhase = "nosetests";
|
|
|
|
|
2018-06-07 17:17:20 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/andreafrancia/trash-cli";
|
2014-12-23 07:35:26 +00:00
|
|
|
description = "Command line tool for the desktop trash can";
|
2016-02-10 13:59:36 +00:00
|
|
|
maintainers = [ maintainers.rycee ];
|
2018-06-11 10:26:52 +00:00
|
|
|
platforms = platforms.unix;
|
2014-12-23 07:35:26 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|