Patchwork gnu: Add ircii.

login
register
mail settings
Submitter non such
Date Aug. 2, 2016, 11:30 a.m.
Message ID <878twf4dcu.fsf@we.make.ritual.n0.is>
Download mbox | patch
Permalink /patch/14240/
State New
Headers show

Comments

non such - Aug. 2, 2016, 11:30 a.m.
Hi,

Andreas Enge <andreas@enge.fr> writes:

> On Mon, Aug 01, 2016 at 08:54:13PM -0400, Leo Famulari wrote:
>> > +             (snippet
>> > +              '(begin
>> > +                 (substitute* "bsdinstall"
>> > +                   (("/bin/strip") "strip")
>> > +                   (("/bin/cp") "cp")
>> > +                   (("/bin/chmod") "chmod")
>> > +                   (("/etc/chown") "chown")
>> > +                   (("/bin/chgrp") "chgrp")
>> > +                   (("/bin/mkdir") "mkdir")
>> > +                   (("/bin/rm") "rm")
>> > +                   (("/bin/mv") "mv"))))))
>> Does anyone else think we should put this origin snippet in a build phase
>> instead? Or, should we leave it in the origin, where it will be applied
>> to the source code provided by `guix build --source ircii`?
>
> I think it would be more in line with our usual practices to have it in
> a build phase, indeed. Snippets are rather used to remove non-free code
> or bundled software.
>
> Andreas
>

Thanks, in the new revision of the patch both issues you two found are
fixed.
Ricardo Wurmus - Aug. 5, 2016, 6:46 a.m.
ng0 <ng0@we.make.ritual.n0.is> writes:

> Thanks, in the new revision of the patch both issues you two found are
> fixed.

> +         (replace 'configure
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (ncurses (assoc-ref inputs "ncurses"))
> +                   (openssl (assoc-ref inputs "openssl")))
> +               (setenv "CONFIG_SHELL" (which "bash"))
> +               (zero?
> +                (system* "./configure"
> +                         ;; TODO: find a socks4+5 lib with small size
> +                         ;; (string-append "--with-socks5=" ghc-socks)
> +                         (string-append "--prefix=" out)
> +                         (string-append "--enable-ipv6")
> +                         (string-append "--with-openssl=" openssl)
> +                         (string-append "--with-emacs-meta-keys")))))))))

Why is this needed?  Did you try using #:configure-flags instead of
replacing the configure phase?  You can refer to inputs with
“%build-inputs” there.

~~ Ricardo
non such - Aug. 5, 2016, 10:29 a.m.
Ricardo Wurmus <rekado@elephly.net> writes:

> ng0 <ng0@we.make.ritual.n0.is> writes:
>
>> Thanks, in the new revision of the patch both issues you two found are
>> fixed.
>
>> +         (replace 'configure
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out"))
>> +                   (ncurses (assoc-ref inputs "ncurses"))
>> +                   (openssl (assoc-ref inputs "openssl")))
>> +               (setenv "CONFIG_SHELL" (which "bash"))
>> +               (zero?
>> +                (system* "./configure"
>> +                         ;; TODO: find a socks4+5 lib with small size
>> +                         ;; (string-append "--with-socks5=" ghc-socks)
>> +                         (string-append "--prefix=" out)
>> +                         (string-append "--enable-ipv6")
>> +                         (string-append "--with-openssl=" openssl)
>> +                         (string-append "--with-emacs-meta-keys")))))))))
>
> Why is this needed?  Did you try using #:configure-flags instead of
> replacing the configure phase?  You can refer to inputs with
> “%build-inputs” there.
>
> ~~ Ricardo
>

I can try to put it into configure flags, I wrote it like this because
the README suggested it. I'll send a new patch when I'm done with the
gnurl update.
Ricardo Wurmus - Aug. 5, 2016, 11:17 a.m.
ng0 <ng0@we.make.ritual.n0.is> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> ng0 <ng0@we.make.ritual.n0.is> writes:
>>
>>> Thanks, in the new revision of the patch both issues you two found are
>>> fixed.
>>
>>> +         (replace 'configure
>>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>>> +             (let ((out (assoc-ref outputs "out"))
>>> +                   (ncurses (assoc-ref inputs "ncurses"))
>>> +                   (openssl (assoc-ref inputs "openssl")))
>>> +               (setenv "CONFIG_SHELL" (which "bash"))
>>> +               (zero?
>>> +                (system* "./configure"
>>> +                         ;; TODO: find a socks4+5 lib with small size
>>> +                         ;; (string-append "--with-socks5=" ghc-socks)
>>> +                         (string-append "--prefix=" out)
>>> +                         (string-append "--enable-ipv6")
>>> +                         (string-append "--with-openssl=" openssl)
>>> +                         (string-append "--with-emacs-meta-keys")))))))))
>>
>> Why is this needed?  Did you try using #:configure-flags instead of
>> replacing the configure phase?  You can refer to inputs with
>> “%build-inputs” there.
>>
>> ~~ Ricardo
>>
>
> I can try to put it into configure flags, I wrote it like this because
> the README suggested it. I'll send a new patch when I'm done with the
> gnurl update.

Which README file suggested overriding the configure phase?

~~ Ricardo

Patch

From 47de349df8297b84fd48b788fa25b188bc8b4be4 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Mon, 1 Aug 2016 19:31:23 +0000
Subject: [PATCH] gnu: Add ircii.

* gnu/packages/irc.scm (ircii): New variable.
---
 gnu/packages/irc.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 03f014a..2823f7a 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -194,3 +194,58 @@  with a keyboard, though it also supports mouse.  It is customizable
 and extensible with plugins and scripts.")
     (home-page "http://www.weechat.org/")
     (license license:gpl3)))
+
+(define-public ircii
+  (package
+    (name "ircii")
+    (version "20151120")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://ircii.warped.com/"
+                                 name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "178dc279f5j894qvp96dzz7c0jpryqlcqw5g0dc9yaxg9kgw1lqm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-bsdinstall-absolute-names
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "bsdinstall"
+               (("/bin/strip") "strip")
+               (("/bin/cp") "cp")
+               (("/bin/chmod") "chmod")
+               (("/etc/chown") "chown")
+               (("/bin/chgrp") "chgrp")
+               (("/bin/mkdir") "mkdir")
+               (("/bin/rm") "rm")
+               (("/bin/mv") "mv"))))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (ncurses (assoc-ref inputs "ncurses"))
+                   (openssl (assoc-ref inputs "openssl")))
+               (setenv "CONFIG_SHELL" (which "bash"))
+               (zero?
+                (system* "./configure"
+                         ;; TODO: find a socks4+5 lib with small size
+                         ;; (string-append "--with-socks5=" ghc-socks)
+                         (string-append "--prefix=" out)
+                         (string-append "--enable-ipv6")
+                         (string-append "--with-openssl=" openssl)
+                         (string-append "--with-emacs-meta-keys")))))))))
+    (inputs
+     `(("ncurses" ,ncurses)
+       ("openssl" ,openssl)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)))
+    (propagated-inputs
+     `(("libiconv" ,libiconv)))
+    (home-page "http://www.eterna.com.au/ircii/")
+    (synopsis "Terminal-based IRC and ICB client")
+    (description
+     "ircII is a terminal based IRC and ICB client for UNIX systems.")
+    (license license:bsd-3)))
-- 
2.9.2