about summary refs log tree commit diff
path: root/pkgs/tools/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r--pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch25
-rw-r--r--pkgs/tools/filesystems/davfs2/default.nix22
2 files changed, 44 insertions, 3 deletions
diff --git a/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch b/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch
new file mode 100644
index 000000000000..3fbbc4c7d0fd
--- /dev/null
+++ b/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch
@@ -0,0 +1,25 @@
+From 0cb1321c4cbb2978318ddad73c9ee6f2a19c55c8 Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Sat, 11 Jan 2020 21:06:33 +0100
+Subject: [PATCH] umount_davfs: substitute ps command
+
+---
+ src/umount_davfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/umount_davfs.c b/src/umount_davfs.c
+index b7019c3..a278679 100644
+--- a/src/umount_davfs.c
++++ b/src/umount_davfs.c
+@@ -157,7 +157,7 @@ main(int argc, char *argv[])
+     }
+     fclose(file);
+ 
+-    char *ps_command = ne_concat("ps -p ", pid, NULL);
++    char *ps_command = ne_concat("@ps@ -p ", pid, NULL);
+     FILE *ps_in = popen(ps_command, "r");
+     if (!ps_in) {
+         error(0, 0,
+-- 
+2.24.1
+
diff --git a/pkgs/tools/filesystems/davfs2/default.nix b/pkgs/tools/filesystems/davfs2/default.nix
index a0d2cfd4ef7d..366db929f582 100644
--- a/pkgs/tools/filesystems/davfs2/default.nix
+++ b/pkgs/tools/filesystems/davfs2/default.nix
@@ -1,4 +1,10 @@
-{ stdenv, fetchurl, neon, zlib }:
+{ stdenv
+, fetchurl
+, neon
+, procps
+, substituteAll
+, zlib
+}:
 
 stdenv.mkDerivation rec {
   name = "davfs2-1.5.6";
@@ -10,11 +16,21 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ neon zlib ];
 
-  patches = [ ./isdir.patch ./fix-sysconfdir.patch ];
+  patches = [
+    ./isdir.patch
+    ./fix-sysconfdir.patch
+    (substituteAll {
+      src = ./0001-umount_davfs-substitute-ps-command.patch;
+      ps = "${procps}/bin/ps";
+    })
+  ];
 
   configureFlags = [ "--sysconfdir=/etc" ];
 
-  makeFlags = ["sbindir=$(out)/sbin" "ssbindir=$(out)/sbin"];
+  makeFlags = [
+    "sbindir=$(out)/sbin"
+    "ssbindir=$(out)/sbin"
+  ];
 
   meta = {
     homepage = https://savannah.nongnu.org/projects/davfs2;