about summary refs log tree commit diff
path: root/pkgs/tools/misc/trash-cli
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2021-04-29 21:58:42 +0200
committerRobert Helgesson <robert@rycee.net>2021-04-29 22:24:09 +0200
commit0586a566ff443ba20e134f778857f5df44a6ea3a (patch)
tree86c2785d1f4bfb098decee6bfe4fc0abd330d625 /pkgs/tools/misc/trash-cli
parent07edccbb6ccf70fb407a25f192ab8e3795e02c7c (diff)
trash-cli: 0.20.12.26 -> 0.21.4.18
Diffstat (limited to 'pkgs/tools/misc/trash-cli')
-rw-r--r--pkgs/tools/misc/trash-cli/default.nix13
-rw-r--r--pkgs/tools/misc/trash-cli/nix-paths.patch26
2 files changed, 9 insertions, 30 deletions
diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix
index d199fd7fda3da..e8cf63fbccfe0 100644
--- a/pkgs/tools/misc/trash-cli/default.nix
+++ b/pkgs/tools/misc/trash-cli/default.nix
@@ -2,22 +2,27 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "trash-cli";
-  version = "0.20.12.26";
+  version = "0.21.4.18";
 
   src = fetchFromGitHub {
     owner = "andreafrancia";
     repo = "trash-cli";
     rev = version;
-    sha256 = "15iivl9xln1bw1zr2x5zvqyb6aj7mc8hfqi6dniq6xkp5m046ib7";
+    sha256 = "16xmg2d9rfmm5l1dxj3dydijpv3kwswrqsbj1sihyyka4s915g61";
   };
 
   propagatedBuildInputs = [ python3Packages.psutil ];
 
   checkInputs = with python3Packages; [
-    nose
     mock
+    pytest
   ];
-  checkPhase = "nosetests";
+
+  # Run tests, skipping `test_user_specified` since its result depends on the
+  # mount path.
+  checkPhase = ''
+    pytest -k 'not test_user_specified'
+  '';
 
   meta = with lib; {
     homepage = "https://github.com/andreafrancia/trash-cli";
diff --git a/pkgs/tools/misc/trash-cli/nix-paths.patch b/pkgs/tools/misc/trash-cli/nix-paths.patch
deleted file mode 100644
index d7b485eec158a..0000000000000
--- a/pkgs/tools/misc/trash-cli/nix-paths.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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():
-     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)