3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/trash-cli/default.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, fetchpatch, coreutils
, python3Packages, substituteAll }:
2017-03-03 01:44:17 +00:00
python3Packages.buildPythonApplication rec {
2020-03-29 11:34:50 +01:00
pname = "trash-cli";
2017-03-03 01:44:17 +00:00
version = "0.17.1.14";
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-09 00:38:31 +01:00
rev = version;
2017-03-03 01:44:17 +00:00
sha256 = "1bqazna223ibqjwbc1wfvfnspfyrvjy8347qlrgv4cpng72n7gfi";
2014-12-23 07:35:26 +00:00
};
patches = [
(substituteAll {
src = ./nix-paths.patch;
df = "${coreutils}/bin/df";
2018-06-11 11:26:52 +01:00
libc = let ext = if stdenv.isDarwin then ".dylib" else ".so.6";
in "${stdenv.cc.libc}/lib/libc${ext}";
})
2017-06-02 23:37:48 +01:00
# Fix build on Python 3.6.
(fetchpatch {
url = "https://github.com/andreafrancia/trash-cli/commit/a21b80d1e69783bb09376c3f60dd2f2a10578805.patch";
sha256 = "0w49rjh433sjfc2cl5a9wlbr6kcn9f1qg905qsyv7ay3ar75wvyp";
})
# Fix listing trashed files over mount points, see https://github.com/andreafrancia/trash-cli/issues/95
(fetchpatch {
url = "https://github.com/andreafrancia/trash-cli/commit/436dfddb4c2932ba3ff696e4732750b7bdc58461.patch";
sha256 = "02pkcz7nj67jbnqpw1943nrv95m8xyjvab4j62fa64r73fagm8m4";
})
2014-12-23 07:35:26 +00:00
];
checkInputs = with python3Packages; [
nose
mock
];
2014-12-23 07:35:26 +00:00
checkPhase = "nosetests";
meta = with stdenv.lib; {
homepage = "https://github.com/andreafrancia/trash-cli";
2014-12-23 07:35:26 +00:00
description = "Command line tool for the desktop trash can";
maintainers = [ maintainers.rycee ];
2018-06-11 11:26:52 +01:00
platforms = platforms.unix;
2014-12-23 07:35:26 +00:00
license = licenses.gpl2;
};
}