git.iko.soy/typeable/nixpkgs
on master help sign in
trash-cli: 0.20.12.26 -> 0.21.4.18
commit0586a566ff443ba20e134f778857f5df44a6ea3a authorRobert Helgesson <robert@rycee.net> dateThu 29 Apr 2021, 21:58 (6 years ago) parent07edccb
2 files changed+9−30
pkgs/tools/misc/trash-cli/default.nix+9−4 pkgs/tools/misc/trash-cli/nix-paths.patch−26
pkgs/tools/misc/trash-cli/default.nix+9−4
@@ -2,22 +2,27 @@
22
33python3Packages.buildPythonApplication rec {
44 pname = "trash-cli";
5− version = "0.20.12.26";
5+ version = "0.21.4.18";
66
77 src = fetchFromGitHub {
88 owner = "andreafrancia";
99 repo = "trash-cli";
1010 rev = version;
11− sha256 = "15iivl9xln1bw1zr2x5zvqyb6aj7mc8hfqi6dniq6xkp5m046ib7";
11+ sha256 = "16xmg2d9rfmm5l1dxj3dydijpv3kwswrqsbj1sihyyka4s915g61";
1212 };
1313
1414 propagatedBuildInputs = [ python3Packages.psutil ];
1515
1616 checkInputs = with python3Packages; [
17− nose
1817 mock
18+ pytest
1919 ];
20− checkPhase = "nosetests";
20+
21+ # Run tests, skipping `test_user_specified` since its result depends on the
22+ # mount path.
23+ checkPhase = ''
24+ pytest -k 'not test_user_specified'
25+ '';
2126
2227 meta = with lib; {
2328 homepage = "https://github.com/andreafrancia/trash-cli";
pkgs/tools/misc/trash-cli/nix-paths.patchdeleted−26
@@ -1,26 +0,0 @@
1−--- a/trashcli/list_mount_points.py 2014-12-23 10:10:43.808470486 +0100
2−+++ a/trashcli/list_mount_points.py 2014-12-23 10:19:04.954796457 +0100
3−@@ -12,7 +12,7 @@ def mount_points_from_getmnt():
4−
5− def mount_points_from_df():
6− import subprocess
7−- df_output = subprocess.Popen(["df", "-P"], stdout=subprocess.PIPE).stdout
8−+ df_output = subprocess.Popen(["@df@", "-P"], stdout=subprocess.PIPE).stdout
9− return list(_mount_points_from_df_output(df_output))
10−
11− def _mount_points_from_df_output(df_output):
12−@@ -46,13 +46,7 @@ def _mounted_filesystems_from_getmnt() :
13− ("mnt_freq", c_int), # Dump frequency (in days).
14− ("mnt_passno", c_int)] # Pass number for `fsck'.
15−
16−- if sys.platform == "cygwin":
17−- libc_name = "cygwin1.dll"
18−- else:
19−- libc_name = find_library("c")
20−-
21−- if libc_name == None :
22−- libc_name="/lib/libc.so.6" # fix for my Gentoo 4.0
23−+ libc_name = "@libc@"
24−
25− libc = cdll.LoadLibrary(libc_name)
26− libc.getmntent.restype = POINTER(mntent_struct)