* [PATCH v2] gnu: Add cbatticon.
@ 2016-08-09 16:49 ng0
2016-08-09 19:06 ` Ricardo Wurmus
0 siblings, 1 reply; 4+ messages in thread
From: ng0 @ 2016-08-09 16:49 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 38 bytes --]
Last patch had mistakes. Fixed this.
[-- Attachment #1.2: 0001-gnu-Add-cbatticon.patch --]
[-- Type: text/x-patch, Size: 3015 bytes --]
From ac578d27529cc2a5f39f66054b5991e44e65f0b9 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 9 Aug 2016 16:47:37 +0000
Subject: [PATCH] gnu: Add cbatticon.
* gnu/packages/admin.scm (cbatticon): New variable.
---
gnu/packages/admin.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index eada796..4025300 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
+;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,7 +71,9 @@
#:use-module (gnu packages xorg)
#:use-module (gnu packages python)
#:use-module (gnu packages man)
- #:use-module (gnu packages autotools))
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages gtk))
(define-public aide
(package
@@ -1698,3 +1701,44 @@ a new command using the matched rule, and runs it.")
display your disk usage in whatever format you prefer. It is designed to be
highly portable. Great for heterogenous networks.")
(license license:zlib)))
+
+(define-public cbatticon
+ (package
+ (name "cbatticon")
+ (version "1.6.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/valr/";
+ name "/archive/" version ".tar.gz"))
+ (sha256
+ (base32
+ "023fvsa4q7rl98rqgwrb1shyzaybdkkbyz5sywd0s5p7ixkksxqx"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no make check
+ #:make-flags
+ (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (add-before 'build 'patch-paths-in-Makefile
+ (lambda* (#:key outputs #:allow-other-keys)
+ (lambda _
+ (substitute* "Makefile"
+ (("msgfmt") (which "msgfmt"))
+ (("RM = rm -f")
+ (string-append "RM = " (which "rm") " -f")))))))))
+ (propagated-inputs
+ `(("libnotify" ,libnotify)))
+ (inputs
+ `(("gtk+" ,gtk+)
+ ("gnu-gettext" ,gnu-gettext)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (synopsis "A lightweigth battery icon for the system tray")
+ (description "cbatticon is a lightweight battery icon that displays
+the status of your battery.")
+ (home-page "https://github.com/valr/cbatticon")
+ (license license:gpl2+)))
--
2.9.2
[-- Attachment #1.3: Type: text/plain, Size: 134 bytes --]
--
♥Ⓐ ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] gnu: Add cbatticon.
2016-08-09 16:49 [PATCH v2] gnu: Add cbatticon ng0
@ 2016-08-09 19:06 ` Ricardo Wurmus
2016-08-10 8:18 ` ng0
0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2016-08-09 19:06 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
ng0 <ng0@we.make.ritual.n0.is> writes:
> From ac578d27529cc2a5f39f66054b5991e44e65f0b9 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Tue, 9 Aug 2016 16:47:37 +0000
> Subject: [PATCH] gnu: Add cbatticon.
> * gnu/packages/admin.scm (cbatticon): New variable.
> ---
> gnu/packages/admin.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 45 insertions(+), 1 deletion(-)
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index eada796..4025300 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -12,6 +12,7 @@
> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
> ;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
> ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
> +;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -70,7 +71,9 @@
> #:use-module (gnu packages xorg)
> #:use-module (gnu packages python)
> #:use-module (gnu packages man)
> - #:use-module (gnu packages autotools))
> + #:use-module (gnu packages autotools)
> + #:use-module (gnu packages gnome)
> + #:use-module (gnu packages gtk))
> (define-public aide
> (package
> @@ -1698,3 +1701,44 @@ a new command using the matched rule, and runs it.")
> display your disk usage in whatever format you prefer. It is designed to be
> highly portable. Great for heterogenous networks.")
> (license license:zlib)))
> +
> +(define-public cbatticon
> + (package
> + (name "cbatticon")
> + (version "1.6.4")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/valr/";
> + name "/archive/" version ".tar.gz"))
> + (sha256
> + (base32
> + "023fvsa4q7rl98rqgwrb1shyzaybdkkbyz5sywd0s5p7ixkksxqx"))
> + (file-name (string-append name "-" version ".tar.gz"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; no make check
Nit-pick: I’d write “no "check" target” or “no tests”.
> + #:make-flags
> + (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
> + "CC=gcc")
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ; no configure script
> + (add-before 'build 'patch-paths-in-Makefile
> + (lambda* (#:key outputs #:allow-other-keys)
> + (lambda _
Why is this a lambda inside of another lambda? This means that the
substitution really doesn’t happen at build time. This build phase only
returns a function and then moves on.
> + (substitute* "Makefile"
> + (("msgfmt") (which "msgfmt"))
> + (("RM = rm -f")
> + (string-append "RM = " (which "rm") " -f")))))))))
These substitutions don’t seem necessary to me. (Considering that this
doesn’t get executed due to the nested lambda, maybe this is really not
needed.)
> + (propagated-inputs
> + `(("libnotify" ,libnotify)))
Why is this propagated? This shouldn’t be needed. Propagation is best
avoided.
> + (inputs
> + `(("gtk+" ,gtk+)
> + ("gnu-gettext" ,gnu-gettext)))
> + (native-inputs
> + `(("pkg-config" ,pkg-config)))
> + (synopsis "A lightweigth battery icon for the system tray")
Please don’t begin the synopsis with an article (“A”).
s/lightweigth/lightweight/
> + (description "cbatticon is a lightweight battery icon that displays
> +the status of your battery.")
How about adding “in the system tray” to the end of the sentence?
> + (home-page "https://github.com/valr/cbatticon")
> + (license license:gpl2+)))
Okay. Could you please send an updated patch? Thanks!
~~ Ricardo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] gnu: Add cbatticon.
2016-08-09 19:06 ` Ricardo Wurmus
@ 2016-08-10 8:18 ` ng0
2016-08-10 20:38 ` Ricardo Wurmus
0 siblings, 1 reply; 4+ messages in thread
From: ng0 @ 2016-08-10 8:18 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]
Hi,
Ricardo Wurmus <rekado@elephly.net> writes:
> ng0 <ng0@we.make.ritual.n0.is> writes:
>
>> From ac578d27529cc2a5f39f66054b5991e44e65f0b9 Mon Sep 17 00:00:00 2001
>> From: ng0 <ng0@we.make.ritual.n0.is>
>> Date: Tue, 9 Aug 2016 16:47:37 +0000
>> Subject: [PATCH] gnu: Add cbatticon.
>
>> * gnu/packages/admin.scm (cbatticon): New variable.
>> ---
>> gnu/packages/admin.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++-
>> 1 file changed, 45 insertions(+), 1 deletion(-)
...
>> + #:phases
>> + (modify-phases %standard-phases
>> + (delete 'configure) ; no configure script
>> + (add-before 'build 'patch-paths-in-Makefile
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (lambda _
>
> Why is this a lambda inside of another lambda? This means that the
> substitution really doesn’t happen at build time. This build phase only
> returns a function and then moves on.
whoa.. okay I should've waited a day and review it myself before I send
it. this is horrible work i've done, the only reason for this quality is
that I've had anesthesia in hospital 2.5 hours before I wrote this
package... Lesson learned.
>> + (substitute* "Makefile"
>> + (("msgfmt") (which "msgfmt"))
>> + (("RM = rm -f")
>> + (string-append "RM = " (which "rm") " -f")))))))))
>
> These substitutions don’t seem necessary to me. (Considering that this
> doesn’t get executed due to the nested lambda, maybe this is really not
> needed.)
>
>> + (propagated-inputs
>> + `(("libnotify" ,libnotify)))
>
> Why is this propagated? This shouldn’t be needed. Propagation is best
> avoided.
I was convinced this is needed as a runtime dependency and that
propagated-inputs is equal to runtime dependencies as they are installed
with the package.
But you are right, it is not needed to be propagated.
> Okay. Could you please send an updated patch? Thanks!
>
> ~~ Ricardo
>
[-- Attachment #2: 0001-gnu-Add-cbatticon.patch --]
[-- Type: text/x-patch, Size: 2588 bytes --]
From f5becdff233591ddad4aea6797dce947c53b1814 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 9 Aug 2016 16:47:37 +0000
Subject: [PATCH] gnu: Add cbatticon.
* gnu/packages/admin.scm (cbatticon): New variable.
---
gnu/packages/admin.scm | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index eada796..09a883c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
+;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,7 +71,9 @@
#:use-module (gnu packages xorg)
#:use-module (gnu packages python)
#:use-module (gnu packages man)
- #:use-module (gnu packages autotools))
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages gtk))
(define-public aide
(package
@@ -1698,3 +1701,36 @@ a new command using the matched rule, and runs it.")
display your disk usage in whatever format you prefer. It is designed to be
highly portable. Great for heterogenous networks.")
(license license:zlib)))
+
+(define-public cbatticon
+ (package
+ (name "cbatticon")
+ (version "1.6.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/valr/"
+ name "/archive/" version ".tar.gz"))
+ (sha256
+ (base32
+ "023fvsa4q7rl98rqgwrb1shyzaybdkkbyz5sywd0s5p7ixkksxqx"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:make-flags
+ (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)))) ; no configure script
+ (inputs
+ `(("gtk+" ,gtk+)
+ ("gnu-gettext" ,gnu-gettext)
+ ("libnotify" ,libnotify)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (synopsis "Lightweight battery icon for the system tray")
+ (description "cbatticon is a lightweight battery icon that displays
+the status of your battery in the system tray.")
+ (home-page "https://github.com/valr/cbatticon")
+ (license license:gpl2+)))
--
2.9.2
[-- Attachment #3: Type: text/plain, Size: 191 bytes --]
Thanks for reviewing this acciddent.
New patch is attached.
--
♥Ⓐ ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-10 20:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 16:49 [PATCH v2] gnu: Add cbatticon ng0
2016-08-09 19:06 ` Ricardo Wurmus
2016-08-10 8:18 ` ng0
2016-08-10 20:38 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.