diff mbox series

bug#54570: [PATCH] gnu: Add parole.

Message ID 874k38sh70.fsf_-_@gnu.org
State Accepted
Headers show
Series bug#54570: [PATCH] gnu: Add parole. | expand

Commit Message

Ludovic Courtès April 4, 2022, 8:54 p.m. UTC
Hi,

"Feng Shu" <tumashu@163.com> skribis:

>>From 03ca3c58c8bc54cec5e12cafbc6dc65aafcbd6cc Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu@163.com>
> Date: Sat, 26 Mar 2022 07:01:25 +0800
> Subject: [patch v2] gnu: Add parole.
>
> * gnu/packages/xfce.scm (parole): New variable.

I made the minor changes below mostly to placate ‘guix lint’.

Thanks!

Ludo’.

Comments

M April 5, 2022, 9:25 a.m. UTC | #1
Ludovic Courtès schreef op ma 04-04-2022 om 22:54 [+0200]:
> +                  #:sh (search-input-file inputs "bin/bash")

FWIW, this line is unneccessary due to the 'patch-shebangs' phase,
though it might be nice for explicitness.

Greetings,
Maxime.
Ludovic Courtès April 6, 2022, 8:10 a.m. UTC | #2
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op ma 04-04-2022 om 22:54 [+0200]:
>> +                  #:sh (search-input-file inputs "bin/bash")
>
> FWIW, this line is unneccessary due to the 'patch-shebangs' phase,

Is it?  The default value of #:sh is (which "bash"), which is the wrong
value when cross-compiling, isn’t it?

Ludo’.
M April 6, 2022, 10:41 a.m. UTC | #3
Ludovic Courtès schreef op wo 06-04-2022 om 10:10 [+0200]:
> Maxime Devos <maximedevos@telenet.be> skribis:
> 
> > Ludovic Courtès schreef op ma 04-04-2022 om 22:54 [+0200]:
> > > +                  #:sh (search-input-file inputs "bin/bash")
> > 
> > FWIW, this line is unneccessary due to the 'patch-shebangs' phase,
> 
> Is it?  The default value of #:sh is (which "bash"), which is the wrong
> value when cross-compiling, isn’t it?

The default value is wrong when cross-compiling, so at least
temporarily, the shebang will be wrong.  However, %standard-phases has

(phases ... install patch-shebangs ...)

so after the 'wrap-parole' phase, 'patch-shebangs' is run, and this
phase will correct the shebang.

<https://lists.gnu.org/r/guix-devel/2021-06/msg00027.html> goes into
more detail.

Greetings,
Maxime.
Ludovic Courtès April 6, 2022, 12:23 p.m. UTC | #4
Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op wo 06-04-2022 om 10:10 [+0200]:
>> Maxime Devos <maximedevos@telenet.be> skribis:
>> 
>> > Ludovic Courtès schreef op ma 04-04-2022 om 22:54 [+0200]:
>> > > +                  #:sh (search-input-file inputs "bin/bash")
>> > 
>> > FWIW, this line is unneccessary due to the 'patch-shebangs' phase,
>> 
>> Is it?  The default value of #:sh is (which "bash"), which is the wrong
>> value when cross-compiling, isn’t it?
>
> The default value is wrong when cross-compiling, so at least
> temporarily, the shebang will be wrong.  However, %standard-phases has
>
> (phases ... install patch-shebangs ...)
>
> so after the 'wrap-parole' phase, 'patch-shebangs' is run, and this
> phase will correct the shebang.

Oh, got it; this is perfect.

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index a4bdc38aa3..44b6c34b29 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -36,6 +36,7 @@  (define-module (gnu packages xfce)
   #:use-module (gnu artwork)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages calendar)
   #:use-module (gnu packages cdrom)
   #:use-module (gnu packages fonts)
@@ -926,14 +927,16 @@  (define-public parole
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'install 'wrap-parole
-            (lambda _
+            (lambda* (#:key inputs #:allow-other-keys)
               (let ((gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
                 (wrap-program (string-append #$output "/bin/parole")
+                  #:sh (search-input-file inputs "bin/bash")
                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))))))))
     (native-inputs
      (list pkg-config intltool gobject-introspection))
     (inputs
-     (list dbus-glib
+     (list bash-minimal                           ;for 'wrap-program'
+           dbus-glib
            (list glib "bin")
            gstreamer
            gst-plugins-base
@@ -942,10 +945,10 @@  (define-public parole
            libxfce4ui
            libxfce4util))
     (home-page "https://www.xfce.org/")
-    (synopsis "Modern simple media player based on the GStreamer framework")
+    (synopsis "Media player based on the GStreamer framework")
     (description "Parole is a modern simple media player based on the
 GStreamer framework and written to fit well in the Xfce desktop.  Parole
-features playback of local media files, DVD/CD and live streams. ")
+features playback of local media files, DVD/CD and live streams.")
     (license gpl2)))                    ;version 2 only
 
 (define-public xfce4-terminal