all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 0/3] add c-ares and aria2
Date: Thu, 5 Nov 2015 11:19:53 +0200	[thread overview]
Message-ID: <20151105111953.19ef0e99@debian-netbook> (raw)
In-Reply-To: <87d1vryzn8.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1877 bytes --]

On Tue, 03 Nov 2015 14:35:07 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > This patch has driven me crazy a bit. C-ares is a library for asynchronous DNS
> > lookups, and aria2 is a cli program to download multiple files/torrents
> > simultaneously, and also a git-annex dependency. C-ares builds without any
> > problems, but aria2 was a different story. The first problem is that the tests
> > seem to need network connectivity, and it tries to access files outside the
> > build chroot. Disabling the tests was the easy part.  
> 
> It’s cheating!  ;-)  Could you investigate and see whether/how tests
> could run in the build environment?  A common problem wrt. networking in
> host name lookups.  In the build environment, only “localhost” can be
> found.
> 
> > The second problem was that pkg-config wouldn't find c-ares, so it
> > kept on building without it.  
> 
> In that case, I would do this:
> 
>   guix build -K aria2
>   # … build fails
>   cd /tmp/nix-build*aria2*
>   source environment-variables
>   pkg-config c-ares --libs
> 
> (Replace “c-ares” with the name corresponding to the actual .pc file
> provided by c-ares.)
> 
> It might be that this command fails because of a missing dependency that
> the .pc file requires.
> 
> Ludo’.

In the end rebuilding c-ares with the release tarball and not the github
tarball fixed the issues with aria2 not recognizing c-ares. I wasn't able to
get anything more out of aria2, more than it not finding the locations and
leaving me with with variables pointing to /path/to/dir and the like.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-c-ares.patch --]
[-- Type: text/x-patch, Size: 3220 bytes --]

From 1f601d7707623ff21da6567eec7f57bef133c3f5 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Thu, 29 Oct 2015 16:18:36 +0200
Subject: [PATCH 1/2] gnu: Add c-ares.

* gnu/packages/aria2.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am          |  1 +
 gnu/packages/aria2.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 gnu/packages/aria2.scm

diff --git a/gnu-system.am b/gnu-system.am
index 946b77e..881ee35 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -35,6 +35,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/aidc.scm				\
   gnu/packages/apl.scm				\
   gnu/packages/apr.scm				\
+  gnu/packages/aria2.scm			\
   gnu/packages/asciidoc.scm			\
   gnu/packages/aspell.scm			\
   gnu/packages/attr.scm				\
diff --git a/gnu/packages/aria2.scm b/gnu/packages/aria2.scm
new file mode 100644
index 0000000..707a3ce
--- /dev/null
+++ b/gnu/packages/aria2.scm
@@ -0,0 +1,49 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages aria2)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages pkg-config))
+
+(define-public c-ares
+  (package
+    (name "c-ares")
+    (version "1.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://c-ares.haxx.se/download/" name "-" version
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "1nyka87yf2jfd0y6sspll0yxwb8zi7kyvajrdbjmh4axc5s1cw1x"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://c-ares.haxx.se/")
+    (synopsis "C library for asynchronous DNS requests")
+    (description
+      "C-ares is a C library that performs DNS requests and name resolution
+asynchronously.  It is intended for applications which need to perform DNS
+queries without blocking, or need to perform multiple DNS queries in parallel.
+The primary examples of such applications are servers which communicate with
+multiple clients and programs with graphical user interfaces.")
+    (license (license:x11-style "http://c-ares.haxx.se/license.html"))))
-- 
2.6.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-aria2.patch --]
[-- Type: text/x-patch, Size: 2734 bytes --]

From ef12a054927c42442ba0806caabee75be0d6f88f Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Tue, 3 Nov 2015 22:05:47 +0200
Subject: [PATCH 2/2] gnu: Add aria2.

* gnu/packages/aria2.scm (aria2): New variable.
---
 gnu/packages/aria2.scm | 44 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/aria2.scm b/gnu/packages/aria2.scm
index 707a3ce..5a28a77 100644
--- a/gnu/packages/aria2.scm
+++ b/gnu/packages/aria2.scm
@@ -21,7 +21,14 @@
   #:use-module (guix download)
   #:use-module (guix packages)
   #:use-module (guix build-system gnu)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages nettle)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages ssh)
+  #:use-module (gnu packages xml))
 
 (define-public c-ares
   (package
@@ -47,3 +54,38 @@ queries without blocking, or need to perform multiple DNS queries in parallel.
 The primary examples of such applications are servers which communicate with
 multiple clients and programs with graphical user interfaces.")
     (license (license:x11-style "http://c-ares.haxx.se/license.html"))))
+
+(define-public aria2
+  (package
+    (name "aria2")
+    (version "1.19.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
+                                  "releases/download/release-" version "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0gnm1b7yp5q6fcajz1ln2f1rv64p6dv0nz9bcwpqrkcmsinlh19n"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--enable-libaria2")
+       #:tests? #f)) ; tests require network connectivity
+    (native-inputs
+     `(("pkg-config", pkg-config)))
+    (inputs
+     `(("c-ares" ,c-ares)
+       ("gnutls" ,gnutls)
+       ("gmp" ,gmp)
+       ("libssh2" ,libssh2)
+       ("libxml2" ,libxml2)
+       ("nettle" ,nettle)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (home-page "http://aria2.sourceforge.net/")
+    (synopsis "Utility for parallel downloading files")
+    (description
+      "Aria2 is a lightweight, multi-protocol & multi-source command-line
+downloadu tility.  It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
+Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
+    (license license:gpl2+)))
-- 
2.6.2


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-11-05  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02  7:15 [PATCH 0/3] add c-ares and aria2 Efraim Flashner
2015-11-02  7:15 ` [PATCH 1/3] gnu: Add c-ares Efraim Flashner
2015-11-03 13:42   ` Ludovic Courtès
2015-11-02  7:15 ` [PATCH 2/3] gnu: Add aria2 Efraim Flashner
2015-11-02  7:15 ` [PATCH 3/3] gnu: aria2: Build with c-ares Efraim Flashner
2015-11-02  7:17 ` [PATCH 0/3] add c-ares and aria2 Efraim Flashner
2015-11-03 13:35 ` Ludovic Courtès
2015-11-05  9:19   ` Efraim Flashner [this message]
2015-11-08 13:33     ` Efraim Flashner
2015-11-12 13:05       ` Ludovic Courtès
2015-11-12 17:38         ` Efraim Flashner
2015-11-12 20:33           ` Ludovic Courtès
2015-11-12 13:07     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151105111953.19ef0e99@debian-netbook \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.