[PATCH] gnu: dunst: Build dunstify.

  • Done
  • quality assurance status badge
Details
3 participants
  • Brice Waegeneire
  • Ludovic Courtès
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Brice Waegeneire
Severity
normal
B
B
Brice Waegeneire wrote on 9 Feb 2020 10:11
(address . guix-patches@gnu.org)
20200209091109.28930-1-brice@waegenei.re
* 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(-)

Toggle diff (40 lines)
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)
--
2.24.1
N
N
Nicolas Goaziou wrote on 10 Feb 2020 00:45
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 39522@debbugs.gnu.org)
87mu9rz5oj.fsf@nicolasgoaziou.fr
Hello,

Brice Waegeneire <brice@waegenei.re> writes:

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

Please add a copyright line for you.

Toggle quote (6 lines)
> + (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,

--
Nicolas Goaziou
B
B
Brice Waegeneire wrote on 10 Feb 2020 09:51
[PATCH v2] gnu: dunst: Build dunstify.
(address . 39522@debbugs.gnu.org)
20200210085148.12612-1-brice@waegenei.re
* gnu/packages/dunst.scm (dunst)[arguments]: Add phase install-dunstify.
[inputs]: Add libnotify.
---
gnu/packages/dunst.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm
index 75f2b80e5f..5b20d6d013 100644
--- a/gnu/packages/dunst.scm
+++ b/gnu/packages/dunst.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015, 2017, 2018 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +27,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 +54,16 @@
;; 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")))
+ (install-file "dunstify"
+ (string-append out "/bin")))
+ #t)))))
(native-inputs
`(("pkg-config" ,pkg-config)
("perl" ,perl) ; for pod2man
@@ -65,6 +74,7 @@
("glib" ,glib)
("cairo" ,cairo)
("pango" ,pango)
+ ("libnotify" ,libnotify) ; for dunstify
("libx11" ,libx11)
("libxscrnsaver" ,libxscrnsaver)
("libxinerama" ,libxinerama)
--
2.25.0
B
B
Brice Waegeneire wrote on 10 Feb 2020 09:57
Re: [bug#39522] [PATCH] gnu: dunst: Build dunstify.
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
2f90edd9716114944689eb3e4abb0f36@waegenei.re
On 2020-02-09 23:45, Nicolas Goaziou wrote:
Toggle quote (9 lines)
> 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.
N
N
Nicolas Goaziou wrote on 11 Feb 2020 19:26
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 39522-done@debbugs.gnu.org)
87zhdpvv3x.fsf@nicolasgoaziou.fr
Hello,

Brice Waegeneire <brice@waegenei.re> writes:

Toggle quote (2 lines)
> I wrote a new patch with your suggestion.

Thank you! I applied it as 81565d23df3080b4d43d2ce0bfa49251827a34e9.

Toggle quote (3 lines)
> 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.

Toggle quote (2 lines)
> I added one in this new one.

Yay!

Regards,

--
Nicolas Goaziou
Closed
L
L
Ludovic Courtès wrote on 14 Feb 2020 15:04
When to add a copyright line?
87mu9lgt9l.fsf_-_@gnu.org
Hello!

Toggle quote (12 lines)
> 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’.
?