From 3d821f2daeee8d78d227803581b5ece00d877642 Mon Sep 17 00:00:00 2001 From: jgart Date: Sun, 12 Mar 2023 19:00:14 +0100 Subject: [PATCH] qtile: install desktop file --- guixrus/packages/qtile.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/guixrus/packages/qtile.scm b/guixrus/packages/qtile.scm index e15ebf6..a7a11a2 100644 --- a/guixrus/packages/qtile.scm +++ b/guixrus/packages/qtile.scm @@ -158,8 +158,8 @@ (base32 "12wg8y33xgb0x0gd9xfylxss97p97dy1cy52yln64493fi6wphr7")))) (build-system python-build-system) (arguments - (list - #:tests? #f + (list + #:tests? #f ; TODO #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths @@ -190,7 +190,17 @@ (lambda* (#:key tests? inputs outputs #:allow-other-keys) (when tests? (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv"))))))) + (invoke "pytest" "-vv")))) + (add-after 'install 'install-xsession + (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)))))))) (inputs (list glib pango pulseaudio)) (native-inputs -- 2.45.2