1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/misc/trash-cli/default.nix
2020-11-14 09:19:31 +01:00

40 lines
966 B
Nix

{ stdenv, fetchFromGitHub, fetchpatch, coreutils
, python3Packages, substituteAll }:
python3Packages.buildPythonApplication rec {
pname = "trash-cli";
version = "0.20.11.7";
src = fetchFromGitHub {
owner = "andreafrancia";
repo = "trash-cli";
rev = version;
sha256 = "0083vagy0jkahb5sw1il7r53ggk45zbjwwjsqd76v7ph3v1awf4v";
};
patches = [
(substituteAll {
src = ./nix-paths.patch;
df = "${coreutils}/bin/df";
libc =
if stdenv.hostPlatform.isDarwin
then "/usr/lib/libSystem.dylib"
else "${stdenv.cc.libc}/lib/libc.so.6";
})
];
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;
};
}