From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH v2] gnu: Add cbatticon. Date: Wed, 10 Aug 2016 08:18:26 +0000 Message-ID: <87fuqdqbot.fsf@we.make.ritual.n0.is> References: <87y44528hf.fsf@we.make.ritual.n0.is> <87eg5xep8q.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXOif-0002aj-Rb for guix-devel@gnu.org; Wed, 10 Aug 2016 04:18:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXOid-0004Ye-7h for guix-devel@gnu.org; Wed, 10 Aug 2016 04:18:32 -0400 Received: from mithlond.libertad.in-berlin.de ([2001:67c:1400:2490::1]:33159 helo=beleriand.n0.is) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXOic-0004Xx-Qa for guix-devel@gnu.org; Wed, 10 Aug 2016 04:18:31 -0400 In-Reply-To: <87eg5xep8q.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, Ricardo Wurmus writes: > ng0 writes: > >> From ac578d27529cc2a5f39f66054b5991e44e65f0b9 Mon Sep 17 00:00:00 2001 >> From: ng0 >> 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 > --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-cbatticon.patch Content-Transfer-Encoding: 8bit >From f5becdff233591ddad4aea6797dce947c53b1814 Mon Sep 17 00:00:00 2001 From: ng0 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 ;;; Copyright © 2016 Peter Feigl ;;; Copyright © 2016 John J. Foerch +;;; Coypright © 2016 ng0 ;;; ;;; 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 --=-=-=--