2014-12-23 08:35:26 +01:00
|
|
|
{ stdenv, fetchurl, substituteAll, coreutils, python2, python2Packages }:
|
|
|
|
|
2014-12-23 11:30:56 +01:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2016-02-19 13:12:11 +01:00
|
|
|
python2Packages.buildPythonApplication rec {
|
2014-12-23 08:35:26 +01:00
|
|
|
name = "trash-cli-${version}";
|
|
|
|
version = "0.12.9.14";
|
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/andreafrancia/trash-cli/archive/${version}.tar.gz";
|
|
|
|
sha256 = "10idvzrlppj632pw6mpk1zy9arn1x4lly4d8nfy9cz4zqv06lhvh";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Fix paths.
|
|
|
|
(substituteAll {
|
|
|
|
src = ./nix-paths.patch;
|
|
|
|
df = "${coreutils}/bin/df";
|
|
|
|
python = "${python2}/bin/${python2.executable}";
|
2015-04-26 19:54:51 +02:00
|
|
|
libc = "${stdenv.cc.libc.out}/lib/libc.so.6";
|
2014-12-23 08:35:26 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
# Apply https://github.com/JaviMerino/trash-cli/commit/4f45a37a3
|
|
|
|
# to fix failing test case.
|
|
|
|
./fix_should_output_info_for_multiple_files.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = with python2Packages; [ nose mock ];
|
|
|
|
|
|
|
|
checkPhase = "nosetests";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/andreafrancia/trash-cli;
|
|
|
|
description = "Command line tool for the desktop trash can";
|
2016-02-10 14:59:36 +01:00
|
|
|
maintainers = [ maintainers.rycee ];
|
2014-12-23 08:35:26 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|