~whereiseveryone/guixrus

6b35a7242f44ed5f39a664af4fc93dce8ac978fc — jgart 2 months ago cdc9c73
bump qtile to 0.22.1
1 files changed, 130 insertions(+), 11 deletions(-)

M guixrus/packages/qtile.scm
M guixrus/packages/qtile.scm => guixrus/packages/qtile.scm +130 -11
@@ 1,7 1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2021 singpolyma <singpolyma@singpolyma.net>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022, 2023 jgart <jgart@dismail.de>
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it


@@ 21,17 21,21 @@
  #:use-module (guix build-system python)
  #:use-module (guix build-system copy)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix build utils)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages mpd)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages security-token)


@@ 46,23 50,118 @@
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages sphinx)
  #:use-module (gnu packages time)
  #:use-module (gnu packages wm)
  #:use-module (gnu packages xdisorg)
  #:use-module (guixrus packages wayland-xyz)
  #:use-module (gnu packages python-xyz))

(define-public python-xkbcommon
  (package
    (name "python-xkbcommon")
    (version "0.8")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "xkbcommon" version))
              (sha256
               (base32
                "05nmjnvpgcday9bax4ngyzbr05a2kdw88v6zlj3mclmpylxrgrav"))))
    (build-system python-build-system)
    (propagated-inputs (list python-cffi))
    (inputs (list libxkbcommon))
    (home-page "https://github.com/sde1000/python-xkbcommon")
    (synopsis "Bindings for libxkbcommon using cffi")
    (description "Bindings for libxkbcommon using cffi")
    (license license:expat)))

(define-public python-pywayland
  (package
    (name "python-pywayland")
    (version "0.4.15")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "pywayland" version))
              (sha256
               (base32
                "0v24sx39n82pyzqcwbwnby7bn978dbg00f8j70hbakqavy6x4gmz"))))
    (build-system python-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
         (add-after 'build 'compile-ffi
                    (lambda* (#:key tests? inputs outputs #:allow-other-keys)
                        (add-installed-pythonpath inputs outputs)
                        (invoke "python" "pywayland/ffi_build.py")))
         (add-before 'check 'setup
           (lambda _
             (setenv "XDG_RUNTIME_DIR" (getcwd))))
         (replace 'check
           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
             (when tests?
               (add-installed-pythonpath inputs outputs)
               (invoke "pytest" "-vv"))))
         (delete 'sanity-check))))
    (native-inputs (list python-pytest python-pytest-cov pkg-config))
    (propagated-inputs (list python-setuptools python-cffi))
    (inputs (list wayland wayland-protocols))
    (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 license:asl2.0)))

;; TODO not finding #include <pixman.h>
#;(define-public python-pywlroots
  (package
    (name "python-pywlroots")
    (version "0.15.24")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "pywlroots" version))
              (sha256
               (base32
                "0wf85a24jcd57lqqvg77w36rvphzaszwnga1f2lyjaqv43323xjf"))))
    (build-system python-build-system)
    (arguments
     (list
      #:tests? #f
      #:phases
      #~(modify-phases %standard-phases
         (add-after 'build 'compile-ffi
                    (lambda* (#:key tests? inputs outputs #:allow-other-keys)
                        (add-installed-pythonpath inputs outputs)
                        (invoke "python" "wlroots/ffi_build.py")))
         (replace 'check
           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
             (when tests?
               (add-installed-pythonpath inputs outputs)
               (invoke "pytest" "-vv"))))
         (delete 'sanity-check))))
    (propagated-inputs (list python-cffi pixman python-pywayland python-xkbcommon))
    (native-inputs (list python-pytest pkg-config))
    (inputs (list wlroots-latest pixman wayland libxcb libxkbcommon libinput eudev))
    (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 license:expat)))

(define-public qtile
  (package
    (name "qtile")
    (version "0.21.0")
    (version "0.22.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "qtile" version))
        (sha256
          (base32 "0m2jvzr5jr499krkrrxh6dhg3mz7dp8da1rn6dq5b6v6dhhziqck"))))
          (base32 "12wg8y33xgb0x0gd9xfylxss97p97dy1cy52yln64493fi6wphr7"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f ; Tests require Xvfb and writable temp/cache space
       #:phases
       (modify-phases %standard-phases
     (list 
      #:tests? #f
      #:phases
      #~(modify-phases %standard-phases
         (add-after 'unpack 'patch-paths
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* "libqtile/pangocffi.py"


@@ 75,19 174,39 @@
                (("^pangocairo = ffi.dlopen.*")
                 (string-append "pangocairo = ffi.dlopen(\""
                  (assoc-ref inputs "pango") "/lib/libpangocairo-1.0.so.0\")\n")))))
         ;; The sanity-check python script is a bit heavy handed. If tests are
         ;; disabled as they are in this package then the sanity-check script
         ;; still complains about the test dependencies not matching up.
         (delete 'sanity-check))))
         (add-before 'build 'ffibuild
                    (lambda _
                      (invoke "./scripts/ffibuild")))
         (add-before 'check 'setup
           (lambda _
             (setenv "HOME" (getcwd))
             (setenv "XDG_RUNTIME_DIR" (getcwd))))
         (add-before 'check 'start-xorg-server
           (lambda* (#:key inputs #:allow-other-keys)
             ;; The test suite requires a running X server.
             (system "Xvfb :1 &")
             (setenv "DISPLAY" ":1")))
         (replace 'check
           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
             (when tests?
               (add-installed-pythonpath inputs outputs)
               (invoke "pytest" "-vv")))))))
    (inputs
      (list glib pango pulseaudio))
    (native-inputs
      (list python-setuptools-scm))
      (list xorg-server-for-tests
            pulseaudio
            wlroots
            python-pytest
            python-pytest-cov
            python-setuptools-scm))
    (propagated-inputs
      (list python-cairocffi
            python-cffi
            python-dateutil
            python-dbus-next
            ;python-pywayland
            ;python-pywlroots
            python-iwlib
            python-keyring
            python-mpd2