x11vnc: moving substitutions, commenting sed line

moved substitutions to postPatch phase and commented on workaround sed line, as requested in the code reviews
This commit is contained in:
Christoph Neidahl (OPNA2608) 2018-10-17 20:13:07 +02:00
parent 0800c3a722
commit 07f135c7f5

View File

@ -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/;