diff options
author | Sisiutl <sisiutl@egregore.fun> | 2024-10-15 16:45:18 +0200 |
---|---|---|
committer | Sisiutl <sisiutl@egregore.fun> | 2024-10-15 17:36:15 +0200 |
commit | f4a66ff6e4e495e4e42a57d103b04586cbe1bdee (patch) | |
tree | 277dbb1b1863c1255b79a2c480af43ef30f2a612 | |
parent | 7f9c9df20430a47a9b28c42d6708d1b516bf527d (diff) |
xpra remastered
-rw-r--r-- | sigils/packages/xorg.scm | 197 |
1 files changed, 197 insertions, 0 deletions
diff --git a/sigils/packages/xorg.scm b/sigils/packages/xorg.scm new file mode 100644 index 0000000..b2455d2 --- /dev/null +++ b/sigils/packages/xorg.scm @@ -0,0 +1,197 @@ +(define-module (sigils packages xorg) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix build-system python) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages bash) + #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages digest) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages fribidi) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gstreamer) + #:use-module (gnu packages gtk) + #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python-compression) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages video) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (sigils packages python-xyz)) + +(define-public xpra + (package + (name "xpra") + (version "6.1.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Xpra-org/xpra.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sf5xx38x223ykxlbfy73ps442m1bnhkbpavhk4iqydgfr468vbg")) + (patches (search-patches "xpra-6.0-systemd-run.patch" + "xpra-6.1-install_libs.patch")))) + (build-system python-build-system) + (inputs + (list bash-minimal ; for wrap-program + ;; glib + ;; gobject-introspection + ;; librsvg + ;; icu4c + ;; pixman + ;; fribidi + ;; libepoxy + ;; graphene + ;; libtiff + gstreamer + gst-plugins-base + libappindicator + libnotify + ;; gdk-pixbuf + python-pyxdg + python-pyinotify + cups-minimal + pulseaudio + ;; Essential dependencies. + libjpeg-turbo + libwebp + ffmpeg + libx11 + libxrandr + libxtst + libxfixes + libxkbfile + libxcomposite + libxdamage + libxext + libxres + lz4 + xauth + xorg-server + xf86-video-dummy + xf86-input-mouse + xf86-input-keyboard + python-pycairo + python-pygobject + xxhash + python-pillow + ;; Optional dependencies. + libx264 + x265 + libvpx + python-rencode ; For speed. + python-numpy + python-pyopengl ; Drawing acceleration. + python-pyopengl-accelerate ; Same. + python-paramiko ; Tunneling over SSH. + python-dbus ; For desktop notifications. + dbus ; For dbus-launch command. + python-lz4 ; Faster compression than zlib. + python-netifaces + python-pycups)) + ;; original + (propagated-inputs + (list gst-plugins-good + gtk+)) + (native-inputs (list pkg-config pandoc python-cython-3)) + (arguments + (list + #:configure-flags #~(list "--without-Xdummy" + "--without-Xdummy_wrapper" + "--with-opengl" + "--without-debug" + "--without-strict") ; Ignore compiler warnings. + #:modules '((guix build python-build-system) + (guix build utils)) + ;; Do not run test-cases. This would rebuild all modules and they seem + ;; to require python2. + #:tests? #f + #:phases + #~(modify-phases %standard-phases + ;; Must pass the same flags as 'install, otherwise enabled modules may + ;; not be built. + (replace 'build + (lambda* (#:key configure-flags #:allow-other-keys) + (apply invoke (append (list "python" "setup.py" "build") + configure-flags)))) + (add-before 'install 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + ;; Fix python executable calls + (substitute* '("xpra/platform/paths.py") + (("f\"python\\{vi\\.major\\}\\.\\{vi\\.minor\\}\"") + (format #f "~s" (search-input-file inputs "bin/python3")))) + ;; fix binary paths. + (substitute* '("xpra/scripts/config.py" + "xpra/x11/vfb_util.py") + (("\"Xvfb\"") + (format #f "~s" (search-input-file inputs "bin/Xvfb"))) + (("\"Xorg\"") + (format #f "~s" (search-input-file inputs "bin/Xorg"))) + (("\"xauth\"") + (format #f "~s" (search-input-file inputs "bin/xauth")))) + ;; Fix directory of config files. + (substitute* '("xpra/scripts/config.py" + "xpra/platform/posix/paths.py") + (("\"/etc/xpra/?\"") + (string-append "\"" #$output "/etc/xpra/\""))) + ;; XXX: Stolen from (gnu packages linux) + (define (append-to-file name body) + (let ((file (open-file name "a"))) + (display body file) + (close-port file))) + ;; Add Xorg module paths. + (append-to-file + "fs/etc/xpra/xorg.conf" + (string-append + "\nSection \"Files\"\nModulePath \"" + #$(this-package-input "xf86-video-dummy") "/lib/xorg/modules," + #$(this-package-input "xf86-input-mouse") "/lib/xorg/modules," + #$(this-package-input "xf86-input-keyboard") "/lib/xorg/modules," + #$(this-package-input "xorg-server") "/lib/xorg/modules\"\n" + "EndSection\n\n")) + (substitute* '("xpra/scripts/config.py" + "fs/etc/xpra/conf.d/60_server.conf.in" + "tests/unittests/unit/server/mixins/notification_test.py") + ;; The trailing -- is intentional, so we only replace it inside + ;; a command line. + (("dbus-launch --") + (string-append (search-input-file inputs "/bin/dbus-launch") + " --"))) + ;; /run/user does not exist on guix system. + (substitute* "./xpra/scripts/config.py" + (("socket-dir.*: \"\",") + "socket-dir\" : \"~/.xpra\",")))) + ;; GTK3 will not be found, if GI can’t find its typelibs. + (add-after 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + ;; XXX: only export typelibs in inputs + (wrap-program (search-input-file outputs "bin/xpra") + `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))) + (home-page "https://www.xpra.org/") + (synopsis "Remote access to individual applications or full desktops") + (description "Xpra is a persistent remote display server and client for)))))))))) +forwarding applications and desktop screens. It gives you remote access to +individual applications or full desktops. On X11, it is also known as +``@command{screen} for X11'': it allows you to run programs, usually on a +remote host, direct their display to your local machine, and then to +disconnect from these programs and reconnect from the same or another machine, +without losing any state. It can also be used to forward full desktops from +X11 servers, Windows, or macOS.") + (license license:gpl2+))) |