GNU bug report logs - #76038
qtile definitions to make it runs on wayland

Previous Next

Package: guix-patches;

Reported by: Orahcio Felicio de Sousa <orahcio <at> gmail.com>

Date: Tue, 4 Feb 2025 02:18:02 UTC

Severity: normal

To reply to this bug, email your comments to 76038 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#76038; Package guix-patches. (Tue, 04 Feb 2025 02:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Orahcio Felicio de Sousa <orahcio <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 04 Feb 2025 02:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Orahcio Felicio de Sousa <orahcio <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: qtile definitions to make it runs on wayland
Date: Tue, 4 Feb 2025 02:17:00 +0000
[Message part 1 (text/plain, inline)]
When I run `qtile -b wayland` qtile gives an error, it does not find the
wlroots library. I could package some dependencies and then make some
changes on the official qtile recipe. I don't know how to send a patch, but
I will append my-qtile (based on the official one) and its additional
dependencies to run on wayland.

Additional dependencies for
qtile-wayland: python-pywlroots, python-pywayland, python-xkbcommon.
wlroots-0.17 needs to build qtile-wayland and python-pywlroots, the last
version on guix gives error.
qtile and pywlroots staff like to use "/usr/include" to find pixman and
libdrm headers, I use (substitute* to give the guix path after 'unpack
phase.

(define-module (python-qtile)
  #:use-module (gnu packages check)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages mpd)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages time)
  #:use-module (gnu packages wm)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages xorg)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix licenses)
  #:use-module (guix build-system python)
  #:use-module (guix build-system pyproject))

(define-public qtile-wayland
  (package
   (name "qtile-wayland")
   (version "0.30.0")
   (source
    (origin
     (method url-fetch)
     (uri (pypi-uri "qtile" version))
     (sha256
      (base32 "0zd2bh4mvgwjxkkwn3angkaqzm7ldcmzg3gdc098jzzlf90fmywm"))))
   (build-system pyproject-build-system)
   (arguments
    (list
     ;; A lot of tests fail despite Xvfb and writable temp/cache space.
     #:tests? #f
     #:test-flags
     #~(list "--ignore=test/widgets/test_widget_init_configure.py")
     #:phases
     #~(modify-phases %standard-phases
     (add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
  (substitute* "libqtile/pangocffi.py"
(("^(gobject = ffi.dlopen).*" all def)
(format #f "~a(~s)~%" def
(search-input-file inputs "/lib/libgobject-2.0.so.0")))
(("^(pango = ffi.dlopen).*" all def)
(format #f "~a(~s)~%" def
(search-input-file inputs "/lib/libpango-1.0.so.0")))
(("^(pangocairo = ffi.dlopen).*" all def)
(format #f "~a(~s)~%" def
(search-input-file
 inputs "/lib/libpangocairo-1.0.so.0"))))
  (substitute* "libqtile/backend/wayland/cffi/build.py"
(("/usr/include/pixman-1")
(string-append #$pixman
"/include/pixman-1"))
(("/usr/include/libdrm")
(string-append #$libdrm
"/include/libdrm")))))
     (add-after 'install 'install-xsessions
(lambda* (#:key outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
 (xsessions (string-append out "/share/xsessions"))
 (qtile (string-append out "/bin/qtile start")))
    (mkdir-p xsessions)
    (copy-file "resources/qtile.desktop"
(string-append xsessions "/qtile.desktop"))
    (substitute* (string-append xsessions "/qtile.desktop")
 (("qtile start") qtile)))))
     (add-before 'check 'pre-check
 (lambda* (#:key tests? #:allow-other-keys)
   (when tests?
     (setenv "HOME" "/tmp")
     (system "Xvfb :1 &")
     (setenv "DISPLAY" ":1")
     (setenv "XDG_CACHE_HOME" "/tmp")))))))
   (inputs
    (list glib pango pulseaudio wlroots-0.17 pixman libdrm))
   (propagated-inputs
    (list python-cairocffi
          python-cffi
          python-dateutil
          python-dbus-fast
          python-iwlib
          python-keyring
          python-libcst
          python-mpd2
          python-pygobject
          python-pyxdg
          python-xcffib
 python-pywlroots
 python-pywayland
 python-xkbcommon))
   (native-inputs
    (list pkg-config
          python-flake8
          python-pep8-naming
          python-pytest
          python-pytest-cov
          python-psutil
          python-setuptools
          python-setuptools-scm
          python-wheel
          xorg-server-for-tests))
   (home-page "http://qtile.org")
   (synopsis "Hackable tiling window manager written and configured in
Python")
   (description "Qtile is simple, small, and extensible.  It's easy to write
your own layouts, widgets, and built-in commands.")
   (license expat)))

(define-public python-pywlroots
  (package
    (name "python-pywlroots")
    (version "0.17.0")
    (source
     (origin
       (method url-fetch)
       (uri "
https://github.com/flacjacket/pywlroots/archive/refs/tags/v0.17.0.tar.gz")
       (sha256
        (base32 "1ghbsdgmgpzhmfgr614bglmrlsgdl1bgdl1lg0y1i6cs9750qyv6"))))
    (build-system python-build-system)
    (arguments (list #:phases
    #~(modify-phases %standard-phases
     (add-before 'build 'set-pixman-path
 (lambda _
   (substitute* "wlroots/ffi_build.py"
(("/usr/include/pixman-1")
 (string-append #$pixman
"/include/pixman-1"))))))))
    (inputs (list wlroots-0.17 pixman))
    (propagated-inputs (list python-cffi python-pywayland python-xkbcommon))
    (native-inputs (list python-cffi python-pytest python-setuptools
                         python-wheel))
;;    (inputs (list wlroots-0.17))
    (home-page "https://github.com/flacjacket/pywlroots")
    (synopsis "Python binding to the wlroots library using cffi")
    (description "Python binding to the wlroots library using cffi.")
    (license ncsa)))

(define-public python-pywayland
  (package
    (name "python-pywayland")
    (version "0.4.18")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pywayland" version))
       (sha256
        (base32 "0cv5aqn23id31mn95q6isn5vcnjcd4dvaqzn52ihbb9sg01dx2jr"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))
    (propagated-inputs (list python-cffi))
    (native-inputs (list python-cffi python-pytest python-setuptools
                         python-wheel wayland wayland-protocols pkg-config))
    (home-page "https://github.com/flacjacket/pywayland")
    (synopsis
     "Python bindings for the libwayland library written in pure Python")
    (description
     "Python bindings for the libwayland library written in pure Python.")
    (license asl2.0)))

(define-public python-xkbcommon
  (package
    (name "python-xkbcommon")
    (version "1.5.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "xkbcommon" version))
       (sha256
        (base32 "0dnwbp8rriwkmsa8a40cpvrccjy7m8xz6jw0vbcka7gnvc44h5xc"))))
    (build-system pyproject-build-system)
    (propagated-inputs (list python-cffi))
    (native-inputs (list python-setuptools python-wheel libxkbcommon))
    (home-page "https://github.com/sde1000/python-xkbcommon")
    (synopsis "Bindings for libxkbcommon using cffi")
    (description "Bindings for libxkbcommon using cffi.")
    (license expat)))
[Message part 2 (text/html, inline)]

This bug report was last modified 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.