aboutsummaryrefslogtreecommitdiffstats
path: root/oni/packages/window-management.scm
blob: fc6aa83a10909b40cde28fcc60844f931030ef36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(define-module (oni packages window-management)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages zig-xyz)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages gnome)
  #:use-module (guix gexp))

;; This is a temporary copy until
;; https://codeberg.org/guix/guix/pulls/11817/files is merged and I can install
;; it through there.
(define-public gliver
  (let ((commit "ff31171b9c1e89fe2a602ec9d8f603d274adc549")
        (revision "0"))
    (package
      (name "gliver")
      (version (git-version "0.0.4" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
                (commit commit)
                (url "https://codeberg.org/ebeem/gliver.git")))
         (sha256
          "1ajafbvzxnhfq7n0mbqyc4ibdxk007x0idx2c9vs3sdg3c6chsap")))
      (build-system gnu-build-system)
      (arguments
       (list
        #:modules `(((guix build guile-build-system)
                     #:select (target-guile-effective-version))
                    ,@%default-gnu-modules)
        #:phases (with-imported-modules
                     `((guix build guile-build-system)
                       ,@%default-gnu-imported-modules)
                   #~(modify-phases %standard-phases
                       (delete 'configure)
                       (add-after 'install 'patch-desktop-file
                         (lambda* (#:key inputs #:allow-other-keys)
                           (substitute*
                               (string-append #$output "/share/wayland-sessions/gliver.desktop")
                             (("Exec=river -c gliver")
                              (string-append
                               "Exec=" (assoc-ref inputs "river") "/bin/river -c " #$output "/bin/gliver")))))
                       (add-after 'install 'wrap-program
                         (lambda* (#:key inputs #:allow-other-keys)
                           (let* ((bin (string-append #$output "/bin"))
                                  (version (target-guile-effective-version))
                                  (guile-load-path (string-append "/share/guile/site/" version))
                                  (guile-load-compiled-path (string-append "/lib/guile/" version "/site-ccache"))
                                  (gcairo (assoc-ref inputs "guile-cairo"))
                                  (program-wrapper (lambda (program)
                                                     (wrap-program (string-append bin program)
                                                       `("GUILE_LOAD_PATH" prefix
                                                         (,(string-append #$output guile-load-path)
                                                          ,(string-append gcairo guile-load-path)))
                                                       `("GUILE_LOAD_COMPILED_PATH"
                                                         prefix
                                                         (,(string-append #$output guile-load-compiled-path)
                                                          ,(string-append gcairo guile-load-compiled-path)))))))
                             (program-wrapper "/gliver")
                             (program-wrapper "/gliver-repl"))))))
        #:make-flags
        #~(list (string-append "PREFIX=" #$output)
                "GUILE_AUTO_COMPILE=0")))
      (native-inputs (list guile-3.0-latest pkg-config))
      (inputs (list river wayland-protocols guile-3.0-latest wayland libxkbcommon guile-cairo pango librsvg))
      (home-page "https://codeberg.org/ebeem/gliver")
      (synopsis "Guile Scheme Wayland window manager based on River")
      (description
       "Gliver is a keyboard-driven & manually tiling window manager using River
written in Guile Scheme. It attempts to be highly customizable while relying
 entirely on the keyboard for input.")
      (license license:gpl3+))))

gliver