Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #33652 from thefloweringash/libvncserver-deps

libvncserver: reduce dependencies; only use systemd on linux

authored by Michael Raskin and committed by GitHub ffb383ec 1775b036

+8 -14
+8 -14
pkgs/development/libraries/libvncserver/default.nix
··· 1 1 {stdenv, fetchurl, 2 - libtool, libjpeg, openssl, libX11, libXdamage, xproto, damageproto, 3 - xextproto, libXext, fixesproto, libXfixes, xineramaproto, libXinerama, 4 - libXrandr, randrproto, libXtst, zlib, libgcrypt, autoreconfHook 5 - , systemd, pkgconfig, libpng 2 + libtool, libjpeg, openssl, zlib, libgcrypt, autoreconfHook, pkgconfig, libpng, 3 + systemd 6 4 }: 7 - 8 - assert stdenv.isLinux; 9 5 10 6 let 11 7 s = # Generated upstream information ··· 16 12 url="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${version}.tar.gz"; 17 13 sha256="15189n09r1pg2nqrpgxqrcvad89cdcrca9gx6qhm6akjf81n6g8r"; 18 14 }; 19 - buildInputs = [ 20 - libtool libjpeg openssl libX11 libXdamage xproto damageproto 21 - xextproto libXext fixesproto libXfixes xineramaproto libXinerama 22 - libXrandr randrproto libXtst zlib libgcrypt autoreconfHook systemd 23 - pkgconfig libpng 24 - ]; 25 15 in 26 16 stdenv.mkDerivation { 27 17 inherit (s) name version; 28 - inherit buildInputs; 29 18 src = fetchurl { 30 19 inherit (s) url sha256; 31 20 }; 32 21 preConfigure = '' 33 22 sed -e 's@/usr/include/linux@${stdenv.cc.libc}/include/linux@g' -i configure 34 23 ''; 24 + nativeBuildInputs = [ pkgconfig autoreconfHook ]; 25 + buildInputs = [ 26 + libtool libjpeg openssl libgcrypt libpng 27 + ] ++ stdenv.lib.optional stdenv.isLinux systemd; 28 + propagatedBuildInputs = [ zlib ]; 35 29 meta = { 36 30 inherit (s) version; 37 31 description = "VNC server library"; 38 32 license = stdenv.lib.licenses.gpl2Plus ; 39 33 maintainers = [stdenv.lib.maintainers.raskin]; 40 - platforms = stdenv.lib.platforms.linux; 34 + platforms = stdenv.lib.platforms.unix; 41 35 }; 42 36 }