diff options
author | Robert Helgesson <robert@rycee.net> | 2014-12-23 08:35:26 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2014-12-23 10:22:37 +0100 |
commit | b017231a21c6372456de6fd96aa05df0a77f7cc1 (patch) | |
tree | 91d34949da828f78c77b923ce4557d377a8671dd /pkgs/tools/misc/trash-cli/nix-paths.patch | |
parent | b8b8e80c8714e94a56c58ddaaa641f36d890e54f (diff) | |
download | nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.tar nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.tar.gz nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.tar.bz2 nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.tar.lz nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.tar.xz nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.tar.zst nixlib-b017231a21c6372456de6fd96aa05df0a77f7cc1.zip |
Add package 'trash-cli'.
Diffstat (limited to 'pkgs/tools/misc/trash-cli/nix-paths.patch')
-rw-r--r-- | pkgs/tools/misc/trash-cli/nix-paths.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/misc/trash-cli/nix-paths.patch b/pkgs/tools/misc/trash-cli/nix-paths.patch new file mode 100644 index 000000000000..29412027b7a5 --- /dev/null +++ b/pkgs/tools/misc/trash-cli/nix-paths.patch @@ -0,0 +1,39 @@ +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 +@@ -12,7 +12,7 @@ def mount_points_from_getmnt(): + + def mount_points_from_df(): + import subprocess +- df_output = subprocess.Popen(["df", "-P"], stdout=subprocess.PIPE).stdout ++ df_output = subprocess.Popen(["@df@", "-P"], stdout=subprocess.PIPE).stdout + return list(_mount_points_from_df_output(df_output)) + + def _mount_points_from_df_output(df_output): +@@ -46,13 +46,7 @@ def _mounted_filesystems_from_getmnt() : + ("mnt_freq", c_int), # Dump frequency (in days). + ("mnt_passno", c_int)] # Pass number for `fsck'. + +- if sys.platform == "cygwin": +- libc_name = "cygwin1.dll" +- else: +- libc_name = find_library("c") +- +- if libc_name == None : +- libc_name="/lib/libc.so.6" # fix for my Gentoo 4.0 ++ libc_name = "@libc@" + + libc = cdll.LoadLibrary(libc_name) + libc.getmntent.restype = POINTER(mntent_struct) |