summary refs log tree commit diff
path: root/pkgs/tools/X11/xpra
diff options
context:
space:
mode:
authorLouis Bettens <louis@bettens.info>2022-01-22 10:41:09 +0100
committerLouis Bettens <louis@bettens.info>2022-01-22 20:08:40 +0100
commita3354b61b699d4fb34ce17a94562ddf65b19cf96 (patch)
tree3c10b08c658566c858c322601c1ed3f6e338d023 /pkgs/tools/X11/xpra
parent6d8215281b2f87a5af9ed7425a26ac575da0438f (diff)
downloadnixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.tar
nixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.tar.gz
nixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.tar.bz2
nixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.tar.lz
nixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.tar.xz
nixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.tar.zst
nixpkgs-a3354b61b699d4fb34ce17a94562ddf65b19cf96.zip
xpra: 4.2 -> 4.3.1
Diffstat (limited to 'pkgs/tools/X11/xpra')
-rw-r--r--pkgs/tools/X11/xpra/default.nix18
-rw-r--r--pkgs/tools/X11/xpra/fix-41106.patch12
-rw-r--r--pkgs/tools/X11/xpra/fix-paths.patch27
3 files changed, 27 insertions, 30 deletions
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index c3cea1ed061..78aaa355d6e 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -1,6 +1,5 @@
 { lib
 , fetchurl
-, fetchpatch
 , substituteAll, python3, pkg-config, runCommand, writeText
 , xorg, gtk3, glib, pango, cairo, gdk-pixbuf, atk, pandoc
 , wrapGAppsHook, xorgserver, getopt, xauth, util-linux, which
@@ -44,11 +43,11 @@ let
   '';
 in buildPythonApplication rec {
   pname = "xpra";
-  version = "4.2";
+  version = "4.3.1";
 
   src = fetchurl {
-    url = "https://xpra.org/src/${pname}-${version}.tar.gz";
-    hash = "sha256-KkQw4FJeH4G5jZ4GdP3aXZ3zxu4GALbiOI6POKJW6fk=";
+    url = "https://xpra.org/src/${pname}-${version}.tar.xz";
+    hash = "sha256-v0Abn0oYcl1I4H9GLN1pV9hk9tTE+Wlv2gPTtEE6t6k=";
   };
 
   patches = [
@@ -57,21 +56,14 @@ in buildPythonApplication rec {
       inherit libfakeXinerama;
     })
     ./fix-41106.patch  # https://github.com/NixOS/nixpkgs/issues/41106
-    # Xorg won't start without. Remove on next version!
-    (fetchpatch {
-      url = "https://github.com/Xpra-org/xpra/commit/f9f242abad69363dfa558e1f6f7956ae99164b67.patch";
-      sha256 = "sha256-TOP9RuXPuqxyKY/7LSSrCWnAmJstEE+D5EwjMiVmchM=";
-    })
   ];
 
-  postPatch = ''
-    substituteInPlace setup.py --replace '/usr/include/security' '${pam}/include/security'
-  '';
+  INCLUDE_DIRS = "${pam}/include";
 
   nativeBuildInputs = [ pkg-config wrapGAppsHook pandoc ]
     ++ lib.optional withNvenc cudatoolkit;
   buildInputs = with xorg; [
-    libX11 xorgproto libXrender libXi
+    libX11 xorgproto libXrender libXi libXres
     libXtst libXfixes libXcomposite libXdamage
     libXrandr libxkbfile
     ] ++ [
diff --git a/pkgs/tools/X11/xpra/fix-41106.patch b/pkgs/tools/X11/xpra/fix-41106.patch
index d0834543aa9..81870fc1a2a 100644
--- a/pkgs/tools/X11/xpra/fix-41106.patch
+++ b/pkgs/tools/X11/xpra/fix-41106.patch
@@ -1,15 +1,15 @@
 diff --git a/xpra/server/server_util.py b/xpra/server/server_util.py
-index dd7c7c1..066b9ff 100644
+index f46998ee9f..60068f21b6 100644
 --- a/xpra/server/server_util.py
 +++ b/xpra/server/server_util.py
-@@ -37,6 +37,10 @@ def sh_quotemeta(s):
-     return b"'" + s.replace(b"'", b"'\\''") + b"'"
+@@ -157,6 +157,10 @@ def xpra_env_shell_script(socket_dir, env):
+     return b"\n".join(script)
  
- def xpra_runner_shell_script(xpra_file, starting_dir, socket_dir):
+ def xpra_runner_shell_script(xpra_file, starting_dir):
 +    # Nixpkgs contortion:
 +    # xpra_file points to a shell wrapper, not to the python script.
 +    dirname, basename = os.path.split(xpra_file)
 +    xpra_file = os.path.join(dirname, "."+basename+"-wrapped")
      script = []
-     script.append(b"#!/bin/sh\n")
-     for var, value in os.environb.items():
+     # We ignore failures in cd'ing, b/c it's entirely possible that we were
+     # started from some temporary directory and all paths are absolute.
diff --git a/pkgs/tools/X11/xpra/fix-paths.patch b/pkgs/tools/X11/xpra/fix-paths.patch
index b5a58bb03f8..aee47a6ad53 100644
--- a/pkgs/tools/X11/xpra/fix-paths.patch
+++ b/pkgs/tools/X11/xpra/fix-paths.patch
@@ -1,23 +1,28 @@
 diff --git a/setup.py b/setup.py
-index f962330..b02b6dd 100755
+index fc67abb50a..c29db3a6d2 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -2224,11 +2224,7 @@ if v4l2_ENABLED:
-     videodev2_h = "/usr/include/linux/videodev2.h"
+@@ -2348,17 +2348,7 @@ if v4l2_ENABLED:
+             break
      constants_pxi = "xpra/codecs/v4l2/constants.pxi"
      if not os.path.exists(videodev2_h) or should_rebuild(videodev2_h, constants_pxi):
 -        ENABLE_DEVICE_CAPS = 0
 -        if os.path.exists(videodev2_h):
--            with open(videodev2_h) as f:
--                hdata = f.read()
--            ENABLE_DEVICE_CAPS = int(hdata.find("device_caps")>=0)
+-            try:
+-                with subprocess.Popen("cpp -fpreprocessed %s | grep -q device_caps" % videodev2_h,
+-                                     shell=True) as proc:
+-                    ENABLE_DEVICE_CAPS = proc.wait()==0
+-            except OSError:
+-                with open(videodev2_h) as f:
+-                    hdata = f.read()
+-                ENABLE_DEVICE_CAPS = int(hdata.find("device_caps")>=0)
+-                print("failed to detect device caps, assuming off")
 +        ENABLE_DEVICE_CAPS = 1
          with open(constants_pxi, "wb") as f:
              f.write(b"DEF ENABLE_DEVICE_CAPS=%i" % ENABLE_DEVICE_CAPS)
-     cython_add(Extension("xpra.codecs.v4l2.pusher",
-     
+     add_cython_ext("xpra.codecs.v4l2.pusher",
 diff --git a/xpra/x11/fakeXinerama.py b/xpra/x11/fakeXinerama.py
-index c867258..617af7c 100755
+index d5c1c8bb10..88c77e8142 100755
 --- a/xpra/x11/fakeXinerama.py
 +++ b/xpra/x11/fakeXinerama.py
 @@ -22,31 +22,7 @@ fakeXinerama_config_files = [
@@ -48,8 +53,8 @@ index c867258..617af7c 100755
 -            log("find_libfakeXinerama()", exc_info=True)
 -            log.error("Error: cannot launch ldconfig -p to locate libfakeXinerama:")
 -            log.error(" %s", e)
--    return find_lib(libname)
-+    return "@libfakeXinerama@/lib/libfakeXinerama.so.1.0"
+-    return find_lib("libfakeXinerama.so.1")
++    return "@libfakeXinerama@/lib/libfakeXinerama.so.1"
  
  current_xinerama_config = None