(service home-sway-service-type (sway-configuration (startup-programs `(,(with-extensions (list ((options->transformation '((with-commit . "guile-g-golf=v0.8.0-rc9"))) guile-g-golf)) #~(string-append "guile " #$(scheme-file "launcher.scm" #~(begin (eval-when (expand load eval) (use-modules (oop goops)) (default-duplicate-binding-handler '(merge-generics replace warn-override-core warn last)) (setenv "GI_TYPELIB_PATH" #$(file-append (directory-union "typelibs" (let ((ungraft (package-mapping (lambda (p) (cond ;; Ungrafted fails to validate runpath. ((string=? (package-name p) "gst-plugins-bad") (specification->package "gst-plugins-bad-minimal")) (else (let ((old (or (package-replacement p) p))) (package (inherit old) (arguments (substitute-keyword-arguments (package-arguments old) ((#:disallowed-references _) (list)) ((#:allowed-references _) #f)))))))) #:deep? #t))) (map ungraft (list gdk-pixbuf graphene gtk harfbuzz pango)))) "/lib/girepository-1.0")) (use-modules (g-golf)) (g-irepository-require "Gtk" #:version "4.0") (for-each (lambda (name) (gi-import-by-name "Gtk" name)) '("Application" "ApplicationWindow" "Builder"))) (use-modules (sxml simple)) (define ui