Skip to content

Commit

Permalink
trash-cli: 0.12.9.14 -> 0.17.1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
ndowens authored and rycee committed Mar 3, 2017
1 parent 3d2e118 commit 477014f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 89 deletions.
24 changes: 10 additions & 14 deletions pkgs/tools/misc/trash-cli/default.nix
@@ -1,33 +1,29 @@
{ stdenv, fetchurl, substituteAll, coreutils, python2, python2Packages }:
{ stdenv, fetchFromGitHub, coreutils
, python3, python3Packages, substituteAll }:

assert stdenv.isLinux;

python2Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
name = "trash-cli-${version}";
version = "0.12.9.14";
version = "0.17.1.14";
namePrefix = "";

src = fetchurl {
url = "https://github.com/andreafrancia/trash-cli/archive/${version}.tar.gz";
sha256 = "10idvzrlppj632pw6mpk1zy9arn1x4lly4d8nfy9cz4zqv06lhvh";
src = fetchFromGitHub {
owner = "andreafrancia";
repo = "trash-cli";
rev = "${version}";
sha256 = "1bqazna223ibqjwbc1wfvfnspfyrvjy8347qlrgv4cpng72n7gfi";
};


patches = [
# Fix paths.
(substituteAll {
src = ./nix-paths.patch;
df = "${coreutils}/bin/df";
python = "${python2}/bin/${python2.executable}";
libc = "${stdenv.cc.libc.out}/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 ];
buildInputs = with python3Packages; [ nose mock ];

checkPhase = "nosetests";

Expand Down

This file was deleted.

17 changes: 2 additions & 15 deletions pkgs/tools/misc/trash-cli/nix-paths.patch
@@ -1,18 +1,5 @@
diff -Nurp trash-cli-0.12.9.14-orig/integration_tests/test_trash_rm_script.py trash-cli-0.12.9.14/integration_tests/test_trash_rm_script.py
--- trash-cli-0.12.9.14-orig/integration_tests/test_trash_rm_script.py 2014-12-23 10:10:43.808470486 +0100
+++ trash-cli-0.12.9.14/integration_tests/test_trash_rm_script.py 2014-12-23 10:11:02.688517975 +0100
@@ -9,7 +9,7 @@ from pprint import pprint
@istest
class WhenNoArgs:
def setUp(self):
- process = Popen(['python', 'trashcli/rm.py'],
+ process = Popen(['@python@', 'trashcli/rm.py'],
env={'PYTHONPATH':'.'},
stdin=None,
stdout=PIPE,
diff -Nurp trash-cli-0.12.9.14-orig/trashcli/list_mount_points.py trash-cli-0.12.9.14/trashcli/list_mount_points.py
--- trash-cli-0.12.9.14-orig/trashcli/list_mount_points.py 2014-12-23 10:10:43.808470486 +0100
+++ trash-cli-0.12.9.14/trashcli/list_mount_points.py 2014-12-23 10:19:04.954796457 +0100
--- a/trashcli/list_mount_points.py 2014-12-23 10:10:43.808470486 +0100
+++ a/trashcli/list_mount_points.py 2014-12-23 10:19:04.954796457 +0100
@@ -12,7 +12,7 @@ def mount_points_from_getmnt():

def mount_points_from_df():
Expand Down

0 comments on commit 477014f

Please sign in to comment.