~ruther/guix-exprs

82423dec3eecfbc36e988c20ce4607447dae5250 — Rutherther 21 days ago 90aaa95
changes I lost track of...
M modules/ruther/environment.scm => modules/ruther/environment.scm +18 -3
@@ 1,4 1,5 @@
(define-module (ruther environment)
  #:use-module (srfi srfi-1)
  #:use-module (ruther modules)
  #:use-module (guix profiles)
  #:use-module (gnu packages)


@@ 8,6 9,7 @@
  #:use-module (guix build-system trivial)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages python)
  #:use-module (gnu packages commencement)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages file)
  #:export (make-environment


@@ 33,7 35,8 @@
                           (binary-paths '("bin"))
                           (extra-paths '("share/info" "share/man" "share/doc" "share/applications"))
                           (rename-function #~identity)
                           (filter-function #~(const #t)))
                           (filter-function #~(const #t))
                           (replace-shell-wrappers? #f))
  "Takes a manifest, makes a package that will have all the binaries the profile has, wrapped to use etc/profile
"
  (let ((profile (profile (content manifest))))


@@ 43,19 46,24 @@
     (source #f)
     (build-system trivial-build-system)
     (native-inputs
      (list file))
      (cons* file
             (if replace-shell-wrappers?
                 (list gcc-toolchain)
                 '())))
     (inputs
      (cons* bash
      (cons* static-bash
            (manifest->packages manifest)))
     (arguments
      (list
       #:modules (source-module-closure
                  '((guix build utils)
                    (ruther build wrappers)
                    (ruther build environment))
                  #:select? ruther-module-name?)
       #:builder #~(begin
                     (use-modules (guix build utils)
                                  (ruther build environment)
                                  (ruther build wrappers)
                                  (ice-9 ftw)
                                  (srfi srfi-1))
                     (mkdir-p #$output)


@@ 102,6 110,7 @@
                         #$@(map (compose car cdr)
                                 (package-inputs this-package))))

                       (format #t "Copying binary files...~%")
                       (copy-binary-files
                        #$output
                        output-binary-folders


@@ 110,8 119,14 @@
                        #:filter-function #$filter-function
                        #:rename-function #$rename-function)

                       (when #$replace-shell-wrappers?
                         (format #f "Replacing shell wrappers...~%")
                         (replace-wrappers-with-binaries output-binaries))

                       ;; Iterate all extra-paths and symlink them to output.
                       (format #t "Copying extra files...~%")
                       (copy-extra-files #$output profile-path extra-folders)
                       (format #t "Patching extra files...~%")
                       (patch-extra-files #$output (zip profile-binaries-realpaths output-binaries))))))
     (synopsis #f)
     (description #f)

M modules/ruther/home/services/wayland.scm => modules/ruther/home/services/wayland.scm +14 -16
@@ 157,18 157,18 @@ This should be called from a wayland compositor like this: `herd start wayland-d
                  ((@ (shepherd support) l10n)
                   "Cannot start wlr-services, because wayland-display is not running and WAYLAND_DISPLAY argument has not been supplied."))
               #f)))))
    (stop #~(lambda* (running-value #:optional (stop-display "yes"))
    (stop #~(lambda* (running-value #:optional (stop-services "yes"))
              (use-modules (shepherd service)
                           (shepherd support))

              (for-each (lambda (service)
                          (stop-service (lookup-service service)))
                        '#$services)
              (when (equal? stop-services "yes")
                (for-each (lambda (service)
                            (stop-service (lookup-service service)))
                          '#$services))

              (when (equal? stop-display "yes")
                ((@ (shepherd support) local-output) ((@ (shepherd support) l10n) "Stopping wayland-display and x-display as well."))
                (stop-service (lookup-service 'x-display))
                (stop-service (lookup-service 'wayland-display)))
              ((@ (shepherd support) local-output) ((@ (shepherd support) l10n) "Stopping wayland-display and x-display as well."))
              (stop-service (lookup-service 'x-display))
              (stop-service (lookup-service 'wayland-display))
              #f)))))

(define-public home-wlr-services-service-type


@@ 192,13 192,12 @@ This should be called from a wayland compositor like this: `herd start wayland-d
  (list
   (shepherd-service
    (documentation "Emacs daemon")
    (requirement '(wayland-display dbus))
    (requirement '(dbus))
    (provision '(emacs))
    (auto-start? #f)
    (modules (cons*
    (auto-start? #t)
    (modules (list
              '(ice-9 popen)
              '(ice-9 rdelim)
              %display-environ-modules))
              '(ice-9 rdelim)))
    (start #~(lambda _
               ;; TODO hey.. DON'T SET the environment of the
               ;; shepherd you idiot. Just save it in a variable.


@@ 231,8 230,7 @@ This should be called from a wayland compositor like this: `herd start wayland-d
               ;;          (or (getenv "PATH") "")))


               (let* ((base-env-vars #$%xwayland-display-environ)
                      (env-vars
               (let* ((env-vars
                       (cons*
                       ;; My own variable to not load login shell
                       "EMACS_NO_SHELL_ENV=1"


@@ 245,7 243,7 @@ This should be called from a wayland compositor like this: `herd start wayland-d
                               ":"
                               (substring var 5))
                              var))
                        base-env-vars))))
                        (default-environment-variables)))))
                 (fork+exec-command
                  (cons*
                   #$(file-append (home-emacs-configuration-emacs config) "/bin/emacs")

M modules/ruther/packages/wayland.scm => modules/ruther/packages/wayland.scm +3 -20
@@ 5,6 5,7 @@

  #:use-module (gnu packages build-tools)
  #:use-module (gnu packages)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages wm)


@@ 201,24 202,6 @@
               (base32
                "1lkn4gzpxgz4fg58s694m4g4scxwb1f4icxy72s85psfkzh6g5w1"))))))

(define-public wlroots-0.19-dev
  (package/inherit wlroots
    (name "wlroots-dev")
    (version "0.19.0-954dba")
    (source
     (origin
       (inherit (package-source wlroots))
       (method git-fetch)
       (uri (git-reference
             (url "https://gitlab.freedesktop.org/wlroots/wlroots")
             (commit "954dba3968c2eea3bf2c21defe01bf540fd102f9")))
       (file-name (git-file-name name version))
       (sha256
        (base32 "16ac4cdlllwv9vw04fxp5c6zf9j88z3xc1v3l88p67ldhz8cw22z"))))
    (propagated-inputs (modify-inputs (package-propagated-inputs wlroots)
                         (replace "pixman" pixman-0.44.2)
                         (replace "wayland-protocols" wayland-protocols/1.40)))))

(define-public (make-dwl-xwayland dwl)
  (package/inherit dwl
    (inputs


@@ 245,7 228,7 @@
    ;; (native-inputs
    ;;  (modify-inputs (package-native-inputs dwl)
    ;;    (append wayland-1.23)))
    (inputs (list wlroots))))
    (inputs (list wlroots-0.18))))

(define-public dwl-0.6
  (package/inherit dwl


@@ 272,7 255,7 @@
             (commit "aa69ed81b558f74e470e69cdcd442f9048ee624c")))
       (sha256
        (base32 "0h05qdw97fddmfv6c8cvpq7vc0lw43cw11fdmkbnm7gq53cy9vm8"))))
    (inputs (list wlroots-0.19-dev))))
    (inputs (list wlroots-0.19))))

(define-public dwlmsg
  (package