diff mbox

gnu: Add wmbattery

Message ID 20160517185836.4a958607@openmailbox.org
State New
Headers show

Commit Message

Kei Yamashita May 17, 2016, 10:58 p.m. UTC
On Tue, 17 May 2016 23:05:17 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Kei Yamashita <kei@openmailbox.org> skribis:
> 
> > Until the patch is applied upstream, this patch should keep things
> > in order within Guix.  
> 
> Good idea.
> 
> > From e07912c6b5ea2ff45d5b923dccad26fef3ca932d Mon Sep 17 00:00:00
> > 2001 From: Kei Yamashita <kei@openmailbox.org>
> > Date: Sat, 14 May 2016 22:27:15 -0400
> > Subject: [PATCH] gnu: wmbattery: Add `patch-upower' phase.
> >
> > * gnu/packages/gnustep.scm (wmbattery): Add `patch-upower' phase.  
> 
> Could you make this a ‘snippet’ in the origin?  I think that such
> source modifications should be either plain patches, or snippets.
> 
> Thanks!
> 
> Ludo’.

Like attached?

Comments

Ludovic Courtès May 18, 2016, 1:35 p.m. UTC | #1
Kei Kebreau <kei@openmailbox.org> skribis:

> On Tue, 17 May 2016 23:05:17 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:

[...]

>> > From e07912c6b5ea2ff45d5b923dccad26fef3ca932d Mon Sep 17 00:00:00
>> > 2001 From: Kei Yamashita <kei@openmailbox.org>
>> > Date: Sat, 14 May 2016 22:27:15 -0400
>> > Subject: [PATCH] gnu: wmbattery: Add `patch-upower' phase.
>> >
>> > * gnu/packages/gnustep.scm (wmbattery): Add `patch-upower' phase.  
>> 
>> Could you make this a ‘snippet’ in the origin?  I think that such
>> source modifications should be either plain patches, or snippets.

[...]

> From b0729d68e78906c0b750935c17a6d98bfac981cf Mon Sep 17 00:00:00 2001
> From: Kei Yamashita <kei@openmailbox.org>
> Date: Tue, 17 May 2016 18:52:16 -0400
> Subject: [PATCH] gnu: wmbattery: Add `patch-upower' phase.
>
> * gnu/packages/gnustep.scm (wmbattery): Add `patch-upower' phase.

I adjusted the commit log and committed, thanks!

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm
index 31fca5b..1faf117 100644
--- a/gnu/packages/gnustep.scm
+++ b/gnu/packages/gnustep.scm
@@ -1,6 +1,6 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 Kei Yamashita <kei@openmailbox.org>
+;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -101,7 +101,13 @@  interface.  It is fast, feature rich, easy to configure, and easy to use.")
                     version ".orig.tar.gz"))
               (sha256
                (base32
-                "0hi6bivv3xd2k68w08krndfl68wdx7nmc2wjzsmcd4q3qgwgyk44"))))
+                "0hi6bivv3xd2k68w08krndfl68wdx7nmc2wjzsmcd4q3qgwgyk44"))
+              (modules '((guix build utils)))
+              (snippet
+               '(substitute* "upower.c"
+                  (("up = up_client_new\\(\\);")
+                   (string-append "if (!up)\n"
+                                  "                up = up_client_new();"))))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f              ; no "check" target