libvncserver: reduce dependencies; only use systemd on linux

Permits building on macOS.
This commit is contained in:
Andrew Childs 2018-01-10 00:43:51 +09:00
parent e114a5c0d7
commit 48bf2c3e81

View File

@ -1,12 +1,8 @@
{stdenv, fetchurl,
libtool, libjpeg, openssl, libX11, libXdamage, xproto, damageproto,
xextproto, libXext, fixesproto, libXfixes, xineramaproto, libXinerama,
libXrandr, randrproto, libXtst, zlib, libgcrypt, autoreconfHook
, systemd, pkgconfig, libpng
libtool, libjpeg, openssl, zlib, libgcrypt, autoreconfHook, pkgconfig, libpng,
systemd
}:
assert stdenv.isLinux;
let
s = # Generated upstream information
rec {
@ -16,27 +12,25 @@ let
url="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${version}.tar.gz";
sha256="15189n09r1pg2nqrpgxqrcvad89cdcrca9gx6qhm6akjf81n6g8r";
};
buildInputs = [
libtool libjpeg openssl libX11 libXdamage xproto damageproto
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
libXrandr randrproto libXtst zlib libgcrypt autoreconfHook systemd
pkgconfig libpng
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
};
preConfigure = ''
sed -e 's@/usr/include/linux@${stdenv.cc.libc}/include/linux@g' -i configure
'';
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [
libtool libjpeg openssl libgcrypt libpng
] ++ stdenv.lib.optional stdenv.isLinux systemd;
propagatedBuildInputs = [ zlib ];
meta = {
inherit (s) version;
description = "VNC server library";
license = stdenv.lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
};
}