summaryrefslogtreecommitdiff
path: root/pkgs/tools/misc/trash-cli
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/tools/misc/trash-cli
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/tools/misc/trash-cli')
-rw-r--r--pkgs/tools/misc/trash-cli/default.nix11
-rw-r--r--pkgs/tools/misc/trash-cli/nix-paths.patch26
2 files changed, 7 insertions, 30 deletions
diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix
index d199fd7fda3d..cc6d5f8c45bb 100644
--- a/pkgs/tools/misc/trash-cli/default.nix
+++ b/pkgs/tools/misc/trash-cli/default.nix
@@ -2,22 +2,24 @@
python3Packages.buildPythonApplication rec {
pname = "trash-cli";
- version = "0.20.12.26";
+ version = "0.21.5.11";
src = fetchFromGitHub {
owner = "andreafrancia";
repo = "trash-cli";
rev = version;
- sha256 = "15iivl9xln1bw1zr2x5zvqyb6aj7mc8hfqi6dniq6xkp5m046ib7";
+ sha256 = "0ifv717ywq2y0s6m9rkry1fnsr3mg9n2b2zcwaf9r5cxpw90bmym";
};
propagatedBuildInputs = [ python3Packages.psutil ];
checkInputs = with python3Packages; [
- nose
mock
+ pytestCheckHook
];
- checkPhase = "nosetests";
+
+ # Skip `test_user_specified` since its result depends on the mount path.
+ disabledTests = [ "test_user_specified" ];
meta = with lib; {
homepage = "https://github.com/andreafrancia/trash-cli";
@@ -25,5 +27,6 @@ python3Packages.buildPythonApplication rec {
maintainers = [ maintainers.rycee ];
platforms = platforms.unix;
license = licenses.gpl2;
+ mainProgram = "trash";
};
}
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 d7b485eec158..000000000000
--- 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)