diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index d199fd7fda3..e8cf63fbccf 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 d7b485eec15..00000000000 --- 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)