diff mbox series

[bug#68742,v3] gnu: river: Add river.desktop file.

Message ID 53bd1ea6e9a06df4f89c8caf394f5cfac9fc1a75.1707413520.git.erikeah@protonmail.com
State New
Headers show
Series [bug#68742,v3] gnu: river: Add river.desktop file. | expand

Commit Message

Erik Eduardo Feb. 8, 2024, 5:32 p.m. UTC
* gnu/packages/zig-xyz.scm (river)[arguments]: Add
  'install-wayland-session phase after 'install phase to install the
  river.desktop file inside share/wayland-sessions directory

Change-Id: I19fbcfa09a6b06ed602ec4be1b06cc6e2cd2a9a1
---
 gnu/packages/zig-xyz.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)


base-commit: cce7a6d2d2b18f51d1fcab67b02a38c11d6f4f2d

Comments

Ekaitz Zarraga Feb. 8, 2024, 7:08 p.m. UTC | #1
Hi,

On 2024-02-08 18:32, Erik Eduardo wrote:
> * gnu/packages/zig-xyz.scm (river)[arguments]: Add
>    'install-wayland-session phase after 'install phase to install the
>    river.desktop file inside share/wayland-sessions directory
> 
> Change-Id: I19fbcfa09a6b06ed602ec4be1b06cc6e2cd2a9a1
> ---
>   gnu/packages/zig-xyz.scm | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
> index 200b5c9940..8343555660 100644
> --- a/gnu/packages/zig-xyz.scm
> +++ b/gnu/packages/zig-xyz.scm
> @@ -52,7 +52,16 @@ (define-public river
>       (build-system zig-build-system)
>       (arguments
>        (list
> -      #:zig-build-flags #~(list "-Dxwayland")   ;experimental xwayland support
> +      #:phases #~(modify-phases %standard-phases
> +                   (add-after 'install 'install-wayland-session
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let* ((out (assoc-ref outputs "out"))
> +                              (wayland-sessions (string-append out
> +                                                 "/share/wayland-sessions")))
> +                         (mkdir-p wayland-sessions)
> +                         (install-file "contrib/river.desktop"
> +                                       wayland-sessions)))))
> +      #:zig-build-flags #~(list "-Dxwayland") ;experimental xwayland support
>         #:zig-release-type "safe"))
>       (native-inputs (list libevdev
>                            libxkbcommon
> 
> base-commit: cce7a6d2d2b18f51d1fcab67b02a38c11d6f4f2d


Looks good to me. But I don't have commit access.

If I get access I'll push. Also if someone wants to push this, I'll be 
grateful.

Let's hope it is pushed soon.

Thanks!
Ekaitz Zarraga Feb. 9, 2024, 2:13 p.m. UTC | #2
On 2024-02-08 18:32, Erik Eduardo wrote:
> * gnu/packages/zig-xyz.scm (river)[arguments]: Add
>    'install-wayland-session phase after 'install phase to install the
>    river.desktop file inside share/wayland-sessions directory
> 
> Change-Id: I19fbcfa09a6b06ed602ec4be1b06cc6e2cd2a9a1
> ---
>   gnu/packages/zig-xyz.scm | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
> index 200b5c9940..8343555660 100644
> --- a/gnu/packages/zig-xyz.scm
> +++ b/gnu/packages/zig-xyz.scm
> @@ -52,7 +52,16 @@ (define-public river
>       (build-system zig-build-system)
>       (arguments
>        (list
> -      #:zig-build-flags #~(list "-Dxwayland")   ;experimental xwayland support
> +      #:phases #~(modify-phases %standard-phases
> +                   (add-after 'install 'install-wayland-session
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let* ((out (assoc-ref outputs "out"))
> +                              (wayland-sessions (string-append out
> +                                                 "/share/wayland-sessions")))
> +                         (mkdir-p wayland-sessions)
> +                         (install-file "contrib/river.desktop"
> +                                       wayland-sessions)))))
> +      #:zig-build-flags #~(list "-Dxwayland") ;experimental xwayland support
>         #:zig-release-type "safe"))
>       (native-inputs (list libevdev
>                            libxkbcommon
> 
> base-commit: cce7a6d2d2b18f51d1fcab67b02a38c11d6f4f2d

Oh Erik!
But we are missing something very important here!

Add your copyright header to the top of the file, the rest of us feel 
alone there in the top. We need some company.

You can also use `#$output` instead of `(assoc-ref outputs "out")`, 
which might be cool to use, as you are already using a gexp in the 
phases for example.

Please send a new version and I'll mark it as reviewed (now I learned 
how to do it :) )

Best,
Ekaitz
diff mbox series

Patch

diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
index 200b5c9940..8343555660 100644
--- a/gnu/packages/zig-xyz.scm
+++ b/gnu/packages/zig-xyz.scm
@@ -52,7 +52,16 @@  (define-public river
     (build-system zig-build-system)
     (arguments
      (list
-      #:zig-build-flags #~(list "-Dxwayland")   ;experimental xwayland support
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'install 'install-wayland-session
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (wayland-sessions (string-append out
+                                                 "/share/wayland-sessions")))
+                         (mkdir-p wayland-sessions)
+                         (install-file "contrib/river.desktop"
+                                       wayland-sessions)))))
+      #:zig-build-flags #~(list "-Dxwayland") ;experimental xwayland support
       #:zig-release-type "safe"))
     (native-inputs (list libevdev
                          libxkbcommon