Fix Linux detection in libvncserver to build linuxvnc

This commit is contained in:
Michael Raskin 2013-10-20 17:34:42 +04:00
parent 81ef604ae0
commit 69128628af
3 changed files with 34 additions and 26 deletions

View File

@ -1,29 +1,38 @@
args :
let
lib = args.lib;
fetchurl = args.fetchurl;
version = lib.attrByPath ["version"] "0.9.9" args;
buildInputs = with args; [
{stdenv, fetchurl,
libtool, libjpeg, openssl, libX11, libXdamage, xproto, damageproto,
xextproto, libXext, fixesproto, libXfixes, xineramaproto, libXinerama,
libXrandr, randrproto, libXtst, zlib
}:
let
s = # Generated upstream information
rec {
baseName="libvncserver";
version="0.9.9";
name="${baseName}-${version}";
hash="1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
url="mirror://sourceforge/project/libvncserver/libvncserver/0.9.9/LibVNCServer-0.9.9.tar.gz";
sha256="1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
};
buildInputs = [
libtool libjpeg openssl libX11 libXdamage xproto damageproto
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
libXrandr randrproto libXtst zlib
];
in
rec {
src = fetchurl {
url = "mirror://sourceforge/libvncserver/LibVNCServer-${version}.tar.gz";
sha256 = "1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
};
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
configureFlags = [];
/* doConfigure should be specified separately */
phaseNames = ["doConfigure" "doMakeInstall"];
name = "libvncserver-" + version;
src = fetchurl {
inherit (s) url sha256;
};
preConfigure = ''
sed -e 's@/usr/include/linux@${stdenv.gcc.libc}/include/linux@g' -i configure
'';
meta = {
description = "VNC server library";
inherit (s) version;
description = "VNC server library";
license = stdenv.lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,4 @@
url http://sourceforge.net/projects/libvncserver/files/libvncserver/
SF_version_dir
version_link '[.]tar[.][bgx]z[0-9]*/download$'
SF_redirect

View File

@ -5058,12 +5058,7 @@ let
libvisual = callPackage ../development/libraries/libvisual { };
libvncserver = builderDefsPackage (import ../development/libraries/libvncserver) {
inherit libtool libjpeg openssl zlib;
inherit (xlibs) xproto libX11 damageproto libXdamage
libXext xextproto fixesproto libXfixes xineramaproto
libXinerama libXrandr randrproto libXtst;
};
libvncserver = callPackage ../development/libraries/libvncserver {};
libviper = callPackage ../development/libraries/libviper { };