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