git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #12378 from heydojo/tigervnc

tigervnc: prevent nix store collision

commit128777155daa55723011b0e570b3420208624c79 authorlethalman <lucabru@src.gnome.org> dateThu 14 Jan 2016, 09:56 (11 years ago) parent23d10123a4aa2a
1 file changed+32−40
pkgs/tools/admin/tigervnc/default.nix+32−40
pkgs/tools/admin/tigervnc/default.nix+32−40
@@ -1,96 +1,86 @@
1−{ stdenv, fetchFromGitHub, libX11, libXext, gettext, libICE, libXtst, libXi, libSM, xorgserver
2−, autoconf, automake, cvs, libtool, nasm, utilmacros, pixman, xkbcomp, xkeyboard_config
3−, fontDirectories, fontutil, libgcrypt, gnutls, pam, flex, bison
4−, fixesproto, damageproto, xcmiscproto, bigreqsproto, randrproto, renderproto
5−, fontsproto, videoproto, compositeproto, scrnsaverproto, resourceproto
6−, libxkbfile, libXfont, libpciaccess, cmake, libjpeg_turbo, libXft, fltk, libXinerama
7−, xineramaproto, libXcursor
1+{ stdenv, fetchgit, xorg
2+, autoconf, automake, cvs, libtool, nasm, pixman, xkeyboard_config
3+, fontDirectories, libgcrypt, gnutls, pam, flex, bison, gettext
4+, cmake, libjpeg_turbo, fltk
85}:
96
107with stdenv.lib;
118
129stdenv.mkDerivation rec {
13− name = "tigervnc-${version}";
1410 version = "1.6.0";
11+ name = "tigervnc-${version}";
1512
16− src = fetchFromGitHub {
17− owner = "TigerVNC";
18− repo = "tigervnc";
19− rev = "v${version}";
13+ src = fetchgit {
14+ url = "https://github.com/TigerVNC/tigervnc/";
2015 sha256 = "1plljv1cxsax88kv52g02n8c1hzwgp6j1p8z1aqhskw36shg4pij";
16+ rev = "5a727f25990d05c9a1f85457b45d6aed66409cb3";
2117 };
2218
2319 inherit fontDirectories;
2420
2521 patchPhase = ''
2622 sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.crossDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am
27− sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.crossDrv else xkbcomp}/bin";' unix/vncserver
23+ sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xorg.xkbcomp.crossDrv else xorg.xkbcomp}/bin";' unix/vncserver
2824 sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.crossDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver
29−
3025 fontPath=
3126 for i in $fontDirectories; do
3227 for j in $(find $i -name fonts.dir); do
3328 addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j)
3429 done
3530 done
36−
3731 sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -fp '"$fontPath"'";' unix/vncserver
3832 '';
3933
40− # I don't know why I can't use in the script
41− # this: ${concatStringsSep " " (map (f: "${f}") xorgserver.patches)}
42− xorgPatches = xorgserver.patches;
43−
44− dontUseCmakeBuildDir = "yes";
34+ dontUseCmakeBuildDir = true;
4535
4636 postBuild = ''
47− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fpermissive -Wno-error=int-to-pointer-cast"
48−
37+ export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error=int-to-pointer-cast"
38+ export CXXFLAGS="$CXXFLAGS -fpermissive"
4939 # Build Xvnc
50− tar xf ${xorgserver.src}
40+ tar xf ${xorg.xorgserver.src}
5141 cp -R xorg*/* unix/xserver
5242 pushd unix/xserver
53− for a in $xorgPatches ../xserver116.patch
54− do
55− patch -p1 < $a
56− done
5743 autoreconf -vfi
58− ./configure $configureFlags --disable-xinerama --disable-xvfb --disable-xnest \
44+ ./configure $configureFlags --disable-devel-docs --disable-docs --disable-xinerama --disable-xvfb --disable-xnest \
5945 --disable-xorg --disable-dmx --disable-dri --disable-dri2 --disable-glx \
6046 --prefix="$out" --disable-unit-tests \
6147 --with-xkb-path=${xkeyboard_config}/share/X11/xkb \
62− --with-xkb-bin-directory=${xkbcomp}/bin \
48+ --with-xkb-bin-directory=${xorg.xkbcomp}/bin \
6349 --with-xkb-output=$out/share/X11/xkb/compiled
6450 make TIGERVNC_SRCDIR=`pwd`/../..
6551 popd
6652 '';
67−
53+
6854 postInstall = ''
6955 pushd unix/xserver
7056 make TIGERVNC_SRCDIR=`pwd`/../.. install
57+ popd
58+ rm -f $out/lib/xorg/protocol.txt
7159 '';
7260
7361 crossAttrs = {
7462 buildInputs = (map (x : x.crossDrv) (buildInputs ++ [
75− fixesproto damageproto xcmiscproto bigreqsproto randrproto renderproto
76− fontsproto videoproto compositeproto scrnsaverproto resourceproto
77− libxkbfile libXfont libpciaccess xineramaproto
63+ xorg.fixesproto xorg.damageproto xorg.xcmiscproto xorg.bigreqsproto xorg.randrproto xorg.renderproto
64+ xorg.fontsproto xorg.videoproto xorg.compositeproto xorg.scrnsaverproto xorg.resourceproto
65+ xorg.libxkbfile xorg.libXfont xorg.libpciaccess xorg.xineramaproto
7866 ]));
7967 };
8068
8169 buildInputs =
82− [ libX11 libXext gettext libICE libXtst libXi libSM libXft
83− nasm libgcrypt gnutls pam pixman libjpeg_turbo fltk xineramaproto
84− libXinerama libXcursor
70+ [ xorg.libX11 xorg.libXext gettext xorg.libICE xorg.libXtst xorg.libXi xorg.libSM xorg.libXft
71+ nasm libgcrypt gnutls pam pixman libjpeg_turbo fltk xorg.xineramaproto
72+ xorg.libXinerama xorg.libXcursor
8573 ];
8674
8775 nativeBuildInputs =
88− [ autoconf automake cvs utilmacros fontutil libtool flex bison
76+ [ autoconf automake cvs xorg.utilmacros xorg.fontutil libtool flex bison
8977 cmake
9078 ]
91− ++ xorgserver.nativeBuildInputs;
79+ ++ xorg.xorgserver.nativeBuildInputs;
80+
81+ propagatedNativeBuildInputs = xorg.xorgserver.propagatedNativeBuildInputs;
9282
93− propagatedNativeBuildInputs = xorgserver.propagatedNativeBuildInputs;
83+ enableParallelBuilding = true;
9484
9585 meta = {
9686 homepage = http://www.tigervnc.org/;
@@ -98,5 +88,7 @@ stdenv.mkDerivation rec {
9888 description = "Fork of tightVNC, made in cooperation with VirtualGL";
9989 maintainers = with stdenv.lib.maintainers; [viric];
10090 platforms = with stdenv.lib.platforms; linux;
91+ # Prevent a store collision.
92+ priority = 4;
10193 };
102−}
94+}