summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/X11/xpra
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2019-03-22 14:27:55 -0500
committerWill Dietz <w@wdtz.org>2019-03-22 17:32:55 -0500
commitd48e8f67a2e1698e6c66f1eded2968cc84b7fb76 (patch)
treeb56c675aa159f8a7a57f44af70195b522d7e8f5c /pkgs/tools/X11/xpra
parentdb7be5298809304d55bfc563f2685854baf83aea (diff)
xpra: 2.3.4 -> 2.5, unbreak
Diffstat (limited to 'pkgs/tools/X11/xpra')
-rw-r--r--pkgs/tools/X11/xpra/default.nix29
-rw-r--r--pkgs/tools/X11/xpra/fix-paths.patch29
2 files changed, 34 insertions, 24 deletions
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index 1d6ea45c9c5e..efafbb3692ed 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, callPackage, substituteAll, python3, pkgconfig
, xorg, gtk3, glib, pango, cairo, gdk_pixbuf, atk
, wrapGAppsHook, xorgserver, getopt, xauth, utillinux, which
-, ffmpeg, x264, libvpx, libwebp
+, ffmpeg_4, x264, libvpx, libwebp, x265
, libfakeXinerama
, gst_all_1, pulseaudio, gobject-introspection
, pam }:
@@ -14,11 +14,11 @@ let
xf86videodummy = callPackage ./xf86videodummy { };
in buildPythonApplication rec {
pname = "xpra";
- version = "2.3.4";
+ version = "2.5";
src = fetchurl {
url = "https://xpra.org/src/${pname}-${version}.tar.xz";
- sha256 = "0wa3kx54himy3i1b2801hlzfilh3cf4kjk40k1cjl0ds28m5hija";
+ sha256 = "0q6c7ijgpp2wk6jlh0pzqki1w60i36wyl2zfwkg0gpdh40ypab3x";
};
patches = [
@@ -28,7 +28,11 @@ in buildPythonApplication rec {
})
];
- nativeBuildInputs = [ pkgconfig gobject-introspection wrapGAppsHook ];
+ postPatch = ''
+ substituteInPlace setup.py --replace '/usr/include/security' '${pam}/include/security'
+ '';
+
+ nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
buildInputs = with xorg; [
libX11 xorgproto libXrender libXi
libXtst libXfixes libXcomposite libXdamage
@@ -36,9 +40,9 @@ in buildPythonApplication rec {
] ++ [
cython
- pango cairo gdk_pixbuf atk gtk3 glib
+ pango cairo gdk_pixbuf atk.out gtk3 glib
- ffmpeg libvpx x264 libwebp
+ ffmpeg_4 libvpx x264 libwebp x265
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
@@ -47,11 +51,13 @@ in buildPythonApplication rec {
gst_all_1.gst-libav
pam
+ gobject-introspection
];
-
propagatedBuildInputs = with python3.pkgs; [
pillow rencode pycrypto cryptography pycups lz4 dbus-python
- netifaces numpy websockify pygobject3 pycairo gst-python pam
+ netifaces numpy pygobject3 pycairo gst-python pam
+ pyopengl paramiko opencv python-uinput pyxdg
+ ipaddress idna
];
NIX_CFLAGS_COMPILE = [
@@ -64,6 +70,9 @@ in buildPythonApplication rec {
"--without-strict"
"--with-gtk3"
"--without-gtk2"
+ # Override these, setup.py checks for headers in /usr/* paths
+ "--with-pam"
+ "--with-vsock"
];
preFixup = ''
@@ -76,6 +85,8 @@ in buildPythonApplication rec {
doCheck = false;
+ enableParallelBuilding = true;
+
passthru = { inherit xf86videodummy; };
meta = {
@@ -85,8 +96,6 @@ in buildPythonApplication rec {
description = "Persistent remote applications for X";
platforms = platforms.linux;
license = licenses.gpl2;
- # https://github.com/NixOS/nixpkgs/pull/48872#issuecomment-433559636
- broken = true;
maintainers = with maintainers; [ tstrobel offline numinit ];
};
}
diff --git a/pkgs/tools/X11/xpra/fix-paths.patch b/pkgs/tools/X11/xpra/fix-paths.patch
index c50ec28c35e2..ac8107235be5 100644
--- a/pkgs/tools/X11/xpra/fix-paths.patch
+++ b/pkgs/tools/X11/xpra/fix-paths.patch
@@ -9,25 +9,26 @@
cython_add(Extension("xpra.client.gtk3.cairo_workaround",
["xpra/client/gtk3/cairo_workaround.pyx"],
**pkgconfig(pycairo)
---- a/xpra/client/gtk3/cairo_workaround.pyx
-+++ b/xpra/client/gtk3/cairo_workaround.pyx
-@@ -65,7 +65,7 @@
- void cairo_surface_flush (cairo_surface_t *surface)
- void cairo_surface_mark_dirty (cairo_surface_t *surface)
-
--cdef extern from "pycairo/pycairo.h":
-+cdef extern from "py3cairo.h":
- ctypedef struct Pycairo_CAPI_t:
- pass
- ctypedef struct PycairoSurface:
+@@ -2363,10 +2363,7 @@
+ v4l2_pkgconfig = pkgconfig()
+ #fuly warning: cython makes this difficult,
+ #we have to figure out if "device_caps" exists in the headers:
+- ENABLE_DEVICE_CAPS = False
+- if os.path.exists("/usr/include/linux/videodev2.h"):
+- hdata = open("/usr/include/linux/videodev2.h").read()
+- ENABLE_DEVICE_CAPS = hdata.find("device_caps")>=0
++ ENABLE_DEVICE_CAPS = True
+ kwargs = {"ENABLE_DEVICE_CAPS" : ENABLE_DEVICE_CAPS}
+ make_constants("xpra", "codecs", "v4l2", "constants", **kwargs)
+ cython_add(Extension("xpra.codecs.v4l2.pusher",
--- a/xpra/x11/bindings/keyboard_bindings.pyx
+++ b/xpra/x11/bindings/keyboard_bindings.pyx
@@ -19,7 +19,7 @@
DEF PATH_MAX = 1024
- DEF DFLT_XKB_RULES_FILE = "base"
--DEF DFLT_XKB_CONFIG_ROOT = "/usr/share/X11/xkb"
-+DEF DFLT_XKB_CONFIG_ROOT = "@xkeyboardconfig@/share/X11/xkb"
+ DEF DFLT_XKB_RULES_FILE = b"base"
+-DEF DFLT_XKB_CONFIG_ROOT = b"/usr/share/X11/xkb"
++DEF DFLT_XKB_CONFIG_ROOT = b"@xkeyboardconfig@/share/X11/xkb"
###################################
# Headers, python magic