1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00
nixpkgs/pkgs/tools/misc/trash-cli/default.nix
Timo Kaufmann 83dcf66186
trash-cli: fix build (#56818)
More fallout from enabling strictDeps in #55757. `buildInputs` are not
accessible from the check phase.
2019-03-04 14:52:33 +01:00

45 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, fetchpatch, coreutils
, python3Packages, substituteAll }:
python3Packages.buildPythonApplication rec {
name = "trash-cli-${version}";
version = "0.17.1.14";
namePrefix = "";
src = fetchFromGitHub {
owner = "andreafrancia";
repo = "trash-cli";
rev = "${version}";
sha256 = "1bqazna223ibqjwbc1wfvfnspfyrvjy8347qlrgv4cpng72n7gfi";
};
patches = [
(substituteAll {
src = ./nix-paths.patch;
df = "${coreutils}/bin/df";
libc = let ext = if stdenv.isDarwin then ".dylib" else ".so.6";
in "${stdenv.cc.libc}/lib/libc${ext}";
})
# Fix build on Python 3.6.
(fetchpatch {
url = "https://github.com/andreafrancia/trash-cli/commit/a21b80d1e69783bb09376c3f60dd2f2a10578805.patch";
sha256 = "0w49rjh433sjfc2cl5a9wlbr6kcn9f1qg905qsyv7ay3ar75wvyp";
})
];
checkInputs = with python3Packages; [
nose
mock
];
checkPhase = "nosetests";
meta = with stdenv.lib; {
homepage = https://github.com/andreafrancia/trash-cli;
description = "Command line tool for the desktop trash can";
maintainers = [ maintainers.rycee ];
platforms = platforms.unix;
license = licenses.gpl2;
};
}