diff mbox series

[bug#39522] gnu: dunst: Build dunstify.

Message ID 20200209091109.28930-1-brice@waegenei.re
State Accepted
Headers show
Series [bug#39522] gnu: dunst: Build dunstify. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Brice Waegeneire Feb. 9, 2020, 9:11 a.m. UTC
* gnu/packages/dunst.scm (dunst)[arguments]: Add phase install-dunstify.
[inputs]: Add libnotify.
---
 gnu/packages/dunst.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Nicolas Goaziou Feb. 9, 2020, 11:45 p.m. UTC | #1
Hello,

Brice Waegeneire <brice@waegenei.re> writes:

> * gnu/packages/dunst.scm (dunst)[arguments]: Add phase install-dunstify.
> [inputs]: Add libnotify.

Please add a copyright line for you.

> +                  (add-after 'install 'install-dunstify
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((out (assoc-ref outputs "out")))
> +                        (copy-file "dunstify"
> +                                   (string-append out "/bin/dunstify"))))))))

I suggest to use

  (install-file "dunstify" (string-append out "/bin"))

instead.

Also, the phase must end with #t.

Could you send an updated patch?

Thank you!

Regards,
Brice Waegeneire Feb. 10, 2020, 8:57 a.m. UTC | #2
On 2020-02-09 23:45, Nicolas Goaziou wrote:
> I suggest to use
> 
>   (install-file "dunstify" (string-append out "/bin"))
> 
> instead.
> 
> Also, the phase must end with #t.
> 
> Could you send an updated patch?
I wrote a new patch with your suggestion.
Sorry for the missing copyright lines in the previous patches you 
merged, I thought it was non-mandatory on trivial modifications. I added 
one in this new one.
Nicolas Goaziou Feb. 11, 2020, 6:26 p.m. UTC | #3
Hello,

Brice Waegeneire <brice@waegenei.re> writes:

> I wrote a new patch with your suggestion.

Thank you! I applied it as 81565d23df3080b4d43d2ce0bfa49251827a34e9.

> Sorry for the missing copyright lines in the previous patches you
> merged, I thought it was non-mandatory on trivial modifications.

I honestly do not know if it is mandatory in this case. However, trivial
modifications may pile up and it could become a concern at some point.

> I added one in this new one.

Yay!

Regards,
Ludovic Courtès Feb. 14, 2020, 2:04 p.m. UTC | #4
Hello!

> Brice Waegeneire <brice@waegenei.re> writes:
>
>> I wrote a new patch with your suggestion.
>
> Thank you! I applied it as 81565d23df3080b4d43d2ce0bfa49251827a34e9.
>
>> Sorry for the missing copyright lines in the previous patches you
>> merged, I thought it was non-mandatory on trivial modifications.
>
> I honestly do not know if it is mandatory in this case. However, trivial
> modifications may pile up and it could become a concern at some point.

FWIW, I agree with both of you.  :-)

Technically, a contribution is not considered “legally significant” if
it is below 15 lines of code or so (info "(maintain) Legally
Significant").

Furthermore, copyright only applies to things that are “inventive”,
which typically means there’s more than one way to do it.  Thus, one
could argue about whether some of our package definitions are
copyrightable at all (in the EU, there’s a “sui generis” database right
though, so it could fall under that, but IANAL.)

Anyway, long story short: I agree with Nicolas that it’s easier to just
always add a copyright line, and it’s better than forgetting to add one.

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm
index 75f2b80e5f..ecb6c15e16 100644
--- a/gnu/packages/dunst.scm
+++ b/gnu/packages/dunst.scm
@@ -26,6 +26,7 @@ 
   #:use-module (gnu packages base)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -52,9 +53,15 @@ 
                           ;; Otherwise it tries to install service file
                           ;; to "dbus" store directory.
                           (string-append "SERVICEDIR_DBUS=" %output
-                                         "/share/dbus-1/services"))
+                                         "/share/dbus-1/services")
+                          "dunstify")
        #:phases (modify-phases %standard-phases
-                  (delete 'configure))))
+                  (delete 'configure)
+                  (add-after 'install 'install-dunstify
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (copy-file "dunstify"
+                                   (string-append out "/bin/dunstify"))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("perl" ,perl)                   ; for pod2man
@@ -65,6 +72,7 @@ 
        ("glib" ,glib)
        ("cairo" ,cairo)
        ("pango" ,pango)
+       ("libnotify" ,libnotify)         ; for dunstify
        ("libx11" ,libx11)
        ("libxscrnsaver" ,libxscrnsaver)
        ("libxinerama" ,libxinerama)