summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/X11/x11vnc/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/X11/x11vnc/default.nix b/pkgs/tools/X11/x11vnc/default.nix
index 9e38a2bc888e..6dc785621b59 100644
--- a/pkgs/tools/X11/x11vnc/default.nix
+++ b/pkgs/tools/X11/x11vnc/default.nix
@@ -24,17 +24,21 @@ stdenv.mkDerivation rec {
       libvncserver
     ];
 
-  preConfigure = ''
-    configureFlags="--mandir=$out/share/man"
-
+  postPatch = ''
     substituteInPlace src/unixpw.c \
         --replace '"/bin/su"' '"/run/wrappers/bin/su"' \
         --replace '"/bin/true"' '"${coreutils}/bin/true"'
 
     sed -i -e '/#!\/bin\/sh/a"PATH=${xorg.xdpyinfo}\/bin:${xorg.xauth}\/bin:$PATH\\n"' -e 's|/bin/su|/run/wrappers/bin/su|g' src/ssltools.h
+
+    # Xdummy script is currently broken, so we avoid building it. This removes everything Xdummy-related from the affected Makefile
     sed -i -e '/^\tXdummy.c\ \\$/,$d' -e 's/\tx11vnc_loop\ \\/\tx11vnc_loop/' misc/Makefile.am
   '';
 
+  preConfigure = ''
+    configureFlags="--mandir=$out/share/man"
+  '';
+
   meta = with stdenv.lib; {
     description = "A VNC server connected to a real X11 screen";
     homepage = https://github.com/LibVNC/x11vnc/;