From b017231a21c6372456de6fd96aa05df0a77f7cc1 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 23 Dec 2014 08:35:26 +0100 Subject: Add package 'trash-cli'. --- pkgs/tools/misc/trash-cli/default.nix | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/tools/misc/trash-cli/default.nix (limited to 'pkgs/tools/misc/trash-cli/default.nix') diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix new file mode 100644 index 000000000000..8650b9ff67dd --- /dev/null +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, substituteAll, coreutils, python2, python2Packages }: + +python2Packages.buildPythonPackage rec { + 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}"; + libc = "${stdenv.gcc.libc}/lib/libc.so.6"; + }) + + # 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"; + maintainer = [ maintainers.rycee ]; + license = licenses.gpl2; + }; +} -- cgit 1.4.1