2018-10-16 10:40:27 +01:00
|
|
|
{ stdenv, fetchFromGitHub,
|
|
|
|
openssl, zlib, libjpeg, xorg, coreutils, libvncserver,
|
|
|
|
autoreconfHook, pkgconfig }:
|
2008-02-22 03:06:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-10-16 10:40:27 +01:00
|
|
|
name = "x11vnc-${version}";
|
|
|
|
version = "0.9.15";
|
2010-07-29 19:55:16 +01:00
|
|
|
|
2018-10-16 10:40:27 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LibVNC";
|
|
|
|
repo = "x11vnc";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1a1b65k1hsy4nhg2sx1yrpaz3vx6s7rmrx8nwygpaam8wpdlkh8p";
|
2010-07-29 19:55:16 +01:00
|
|
|
};
|
|
|
|
|
2018-10-16 10:40:27 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
|
2010-07-29 19:55:16 +01:00
|
|
|
buildInputs =
|
|
|
|
[ xorg.libXfixes xorg.fixesproto openssl xorg.libXdamage
|
|
|
|
xorg.damageproto zlib xorg.libX11 xorg.xproto libjpeg
|
|
|
|
xorg.libXtst xorg.libXinerama xorg.xineramaproto xorg.libXrandr
|
|
|
|
xorg.randrproto xorg.libXext xorg.xextproto xorg.inputproto
|
|
|
|
xorg.recordproto xorg.libXi xorg.libXrender xorg.renderproto
|
2018-10-16 10:40:27 +01:00
|
|
|
libvncserver
|
2010-07-29 19:55:16 +01:00
|
|
|
];
|
|
|
|
|
2018-10-17 19:13:07 +01:00
|
|
|
postPatch = ''
|
2018-10-16 10:40:27 +01:00
|
|
|
substituteInPlace src/unixpw.c \
|
2017-01-29 10:11:01 +00:00
|
|
|
--replace '"/bin/su"' '"/run/wrappers/bin/su"' \
|
2011-11-10 19:06:02 +00:00
|
|
|
--replace '"/bin/true"' '"${coreutils}/bin/true"'
|
2013-11-08 15:37:10 +00:00
|
|
|
|
2018-10-16 10:40:27 +01:00
|
|
|
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
|
2018-10-17 19:13:07 +01:00
|
|
|
|
|
|
|
# Xdummy script is currently broken, so we avoid building it. This removes everything Xdummy-related from the affected Makefile
|
2018-10-17 09:09:16 +01:00
|
|
|
sed -i -e '/^\tXdummy.c\ \\$/,$d' -e 's/\tx11vnc_loop\ \\/\tx11vnc_loop/' misc/Makefile.am
|
2010-12-06 18:01:46 +00:00
|
|
|
'';
|
|
|
|
|
2018-10-17 19:13:07 +01:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="--mandir=$out/share/man"
|
|
|
|
'';
|
|
|
|
|
2018-09-12 20:47:25 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A VNC server connected to a real X11 screen";
|
2018-10-16 10:40:27 +01:00
|
|
|
homepage = https://github.com/LibVNC/x11vnc/;
|
2018-09-12 20:47:25 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
2018-10-16 10:43:48 +01:00
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
2008-02-22 03:06:12 +00:00
|
|
|
};
|
|
|
|
}
|