Merge pull request #6555 from ts468/xpra

Fix/update Xpra
This commit is contained in:
Arseniy Seroka 2015-02-27 14:07:21 +03:00
commit 2f674d85af
4 changed files with 140 additions and 10 deletions

View file

@ -1,15 +1,17 @@
{ stdenv, fetchurl, buildPythonPackage { stdenv, fetchurl, buildPythonPackage
, python, cython, pkgconfig , python, cython, pkgconfig
, xorg, gtk, glib, pango, cairo, gdk_pixbuf, pygtk, atk, pygobject, pycairo , xorg, gtk, glib, pango, cairo, gdk_pixbuf, pygtk, atk, pygobject, pycairo
, ffmpeg, x264, libvpx, pil, libwebp }: , makeWrapper, xkbcomp, xorgserver, getopt, xauth, utillinux, which, fontsConf, xkeyboard_config
, ffmpeg, x264, libvpx, pil, libwebp
, libfakeXinerama }:
buildPythonPackage rec { buildPythonPackage rec {
name = "xpra-0.11.6"; name = "xpra-0.14.19";
namePrefix = ""; namePrefix = "";
src = fetchurl { src = fetchurl {
url = "http://xpra.org/src/${name}.tar.bz2"; url = "https://www.xpra.org/src/${name}.tar.xz";
sha256 = "0n3lr8nrfmrll83lgi1nzalng902wv0dcmcyx4awnman848dxij0"; sha256 = "0jifaysz4br1v0zibnzgd0k02rgybbsysvwrgbar1452sjb3db5m";
}; };
buildInputs = [ buildInputs = [
@ -18,25 +20,27 @@ buildPythonPackage rec {
xorg.libX11 xorg.renderproto xorg.libXrender xorg.libXi xorg.inputproto xorg.kbproto xorg.libX11 xorg.renderproto xorg.libXrender xorg.libXi xorg.inputproto xorg.kbproto
xorg.randrproto xorg.damageproto xorg.compositeproto xorg.xextproto xorg.recordproto xorg.randrproto xorg.damageproto xorg.compositeproto xorg.xextproto xorg.recordproto
xorg.xproto xorg.fixesproto xorg.libXtst xorg.libXfixes xorg.libXcomposite xorg.libXdamage xorg.xproto xorg.fixesproto xorg.libXtst xorg.libXfixes xorg.libXcomposite xorg.libXdamage
xorg.libXrandr xorg.libXrandr xorg.libxkbfile
pango cairo gdk_pixbuf atk gtk glib pango cairo gdk_pixbuf atk gtk glib
ffmpeg libvpx x264 libwebp ffmpeg libvpx x264 libwebp
makeWrapper
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pil pygtk pygobject pil pygtk pygobject
]; ];
# Even after i tried monkey patching, their tests just fail, looks like postPatch = ''
# they don't have automated testing out of the box? http://xpra.org/trac/ticket/177 sed -i 's|DEFAULT_XVFB_COMMAND = "Xvfb|DEFAULT_XVFB_COMMAND = "Xvfb -xkbdir ${xkeyboard_config}/etc/X11/xkb|' xpra/platform/features.py
doCheck = false; '';
preBuild = '' preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0) $(pkg-config --cflags pygtk-2.0) $(pkg-config --cflags xtst)" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0) $(pkg-config --cflags pygtk-2.0) $(pkg-config --cflags xtst)"
''; '';
setupPyBuildFlags = ["--enable-Xdummy"]; setupPyBuildFlags = ["--with-Xdummy"];
preInstall = '' preInstall = ''
# see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix # see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
@ -44,9 +48,26 @@ buildPythonPackage rec {
sed -i '/ = data_files/d' setup.py sed -i '/ = data_files/d' setup.py
''; '';
postInstall = ''
wrapProgram $out/bin/xpra \
--set XKB_BINDIR "${xkbcomp}/bin" \
--set FONTCONFIG_FILE "${fontsConf}" \
--prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \
--prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin
'';
#TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
#postFixup = ''
# sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
# sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra
# sed -i '4iexport PATH=${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin\${PATH:+:}\$PATH' $out/bin/xpra
#'';
meta = { meta = {
homepage = http://xpra.org/; homepage = http://xpra.org/;
description = "Persistent remote applications for X"; description = "Persistent remote applications for X";
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ tstrobel ];
}; };
} }

View file

@ -0,0 +1,73 @@
{ stdenv, fetchurl, buildPythonPackage
, python, cython, pkgconfig
, xorg, gtk3, glib, pango, cairo, gdk_pixbuf, atk, pygobject3, pycairo, gobjectIntrospection
, makeWrapper, xkbcomp, xorgserver, getopt, xauth, utillinux, which, fontsConf, xkeyboard_config
, ffmpeg, x264, libvpx, libwebp
, libfakeXinerama }:
buildPythonPackage rec {
name = "xpra-0.14.19";
namePrefix = "";
src = fetchurl {
url = "https://www.xpra.org/src/${name}.tar.xz";
sha256 = "0jifaysz4br1v0zibnzgd0k02rgybbsysvwrgbar1452sjb3db5m";
};
buildInputs = [
pkgconfig
xorg.libX11 xorg.renderproto xorg.libXrender xorg.libXi xorg.inputproto xorg.kbproto
xorg.randrproto xorg.damageproto xorg.compositeproto xorg.xextproto xorg.recordproto
xorg.xproto xorg.fixesproto xorg.libXtst xorg.libXfixes xorg.libXcomposite xorg.libXdamage
xorg.libXrandr xorg.libxkbfile
pango cairo gdk_pixbuf atk gtk3 glib gobjectIntrospection
ffmpeg libvpx x264 libwebp
makeWrapper
];
propagatedBuildInputs = [
pygobject3 pycairo cython
];
postPatch = ''
sed -i 's|DEFAULT_XVFB_COMMAND = "Xvfb|DEFAULT_XVFB_COMMAND = "Xvfb -xkbdir ${xkeyboard_config}/etc/X11/xkb|' xpra/platform/features.py
'';
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-3.0) $(pkg-config --cflags xtst)"
'';
setupPyBuildFlags = [ "--with-gtk3" "--without-gtk2" "--with-Xdummy" ];
preInstall = ''
# see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
${python}/bin/${python.executable} setup.py install_data --install-dir=$out --root=$out
sed -i '/ = data_files/d' setup.py
'';
postInstall = ''
wrapProgram $out/bin/xpra \
--set XKB_BINDIR "${xkbcomp}/bin" \
--set FONTCONFIG_FILE "${fontsConf}" \
--prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \
--prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin
'';
#TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
#postFixup = ''
# sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
# sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra
# sed -i '4iexport PATH=${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin\${PATH:+:}\$PATH' $out/bin/xpra
#'';
meta = {
homepage = http://xpra.org/;
description = "Persistent remote applications for X";
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, fetchurl, libX11, libXinerama }:
stdenv.mkDerivation rec {
name = "libfakeXinerama-${version}";
version = "0.1.0";
src = fetchurl {
url = "https://www.xpra.org/src/${name}.tar.bz2";
sha256 = "0gxb8jska2anbb3c1m8asbglgnwylgdr44x9lr8yh91hjxsqadkx";
};
buildInputs = [ libX11 libXinerama ];
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
buildPhase = ''
gcc -O2 -Wall fakeXinerama.c -fPIC -o libfakeXinerama.so.1.0 -shared
'';
installPhase = ''
mkdir -p $out/lib
cp libfakeXinerama.so.1.0 $out/lib
ln -s libXinerama.so.1.0 $out/lib/libXinerama.so.1
ln -s libXinerama.so.1 $out/lib/libXinerama.so
'';
meta = {
homepage = http://xpra.org/;
description = "fakeXinerama for Xpra";
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ tstrobel ];
};
}

View file

@ -12099,7 +12099,10 @@ let
libxpdf = callPackage ../applications/misc/xpdf/libxpdf.nix { }; libxpdf = callPackage ../applications/misc/xpdf/libxpdf.nix { };
xpra = callPackage ../tools/X11/xpra { }; xpra = callPackage ../tools/X11/xpra { inherit (texFunctions) fontsConf; };
libfakeXinerama = callPackage ../tools/X11/xpra/libfakeXinerama.nix { inherit (xlibs) libXinerama; };
#TODO: 'pil' is not available for python3, yet
xpraGtk3 = callPackage ../tools/X11/xpra/gtk3.nix { inherit (texFunctions) fontsConf; inherit (python3Packages) buildPythonPackage python cython pygobject3 pycairo; };
xrestop = callPackage ../tools/X11/xrestop { }; xrestop = callPackage ../tools/X11/xrestop { };