Re: [PATCH 0/12]: Add asdf-build-system.

2016-09-28 Thread Andy Patterson
On Tue, 27 Sep 2016 00:15:20 -0400
Andy Patterson  wrote:

> Getting things to work "out of the box": I'd like to set up an
> environment variable to allow implementations to find installed
> libraries, but it's a bit tricky:

After having thought about it some more, and having tried some things, I
came up with another solution which is able to integrate with guix's
existing environment variable handling. I've attached it as patches,
which would probably best be applied right after the first patch in
the main series, but could really go anywhere.

With these changes, the system is functionally complete, so I'm just
waiting for comments. Any suggestions are welcome.

Thanks,

--
Andy>From ec4e6fef499dede3b591282c4ced2153dde4f661 Mon Sep 17 00:00:00 2001
From: Andy Patterson 
Date: Wed, 28 Sep 2016 19:04:44 -0400
Subject: [PATCH 1/2] gnu: sbcl: Honour GUIX_SBCL_SOURCE_REGISTRY.

* gnu/packages/lisp.scm (asdf-substitutions): New variable.
(sbcl) [source]: Add snippet.
[native-search-paths]: Add GUIX_SBCL_SOURCE_REGISTRY.
---
 gnu/packages/lisp.scm | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 5bbd672..4564549 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -47,6 +47,20 @@
   #:use-module (gnu packages version-control)
   #:use-module (ice-9 match))
 
+(define (asdf-substitutions lisp)
+  `((("\\(defun environment-source-registry \\(\\)")
+ (format #f
+ "
+  (defun guix-source-registry () (getenv \"GUIX_~a_SOURCE_REGISTRY\"))
+
+  (defun environment-source-registry ()"
+ ,(string-upcase lisp)))
+(("\\(environment-source-registry")
+ "(guix-source-registry
+  environment-source-registry")
+(("#:environment-source-registry")
+ "#:environment-source-registry #:guix-source-registry")))
+
 (define-public gcl
   (package
 (name "gcl")
@@ -226,7 +240,12 @@ an interpreter, a compiler, a debugger, and much more.")
(uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
version "-source.tar.bz2"))
(sha256
-(base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5"
+(base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5"))
+   (modules '((guix build utils)))
+   (snippet
+;; Add $GUIX_SBCL_SOURCE_REGISTRY to *default-source-registries*
+`(substitute* "contrib/asdf/asdf.lisp"
+   ,@(asdf-substitutions name)
 (build-system gnu-build-system)
 (outputs '("out" "doc"))
 ;; Bootstrap with CLISP.
@@ -315,6 +334,11 @@ an interpreter, a compiler, a debugger, and much more.")
#t
  ;; No 'check' target, though "make.sh" (build phase) runs tests.
  #:tests? #f))
+(native-search-paths
+ (list (search-path-specification
+(variable "GUIX_SBCL_SOURCE_REGISTRY")
+(files '("share/common-lisp/sbcl-bundle-systems"
+ "share/common-lisp/systems")
 (home-page "http://www.sbcl.org/;)
 (synopsis "Common Lisp implementation")
 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
-- 
2.10.0

>From aa81b363dfcaec8b82e66dd9db9f0c4fa0ef52f8 Mon Sep 17 00:00:00 2001
From: Andy Patterson 
Date: Wed, 28 Sep 2016 19:06:22 -0400
Subject: [PATCH 2/2] gnu: ecl: Honour GUIX_ECL_SOURCE_REGISTRY.

* gnu/packages/lisp.scm (ecl)[source]: Add snippet.
[native-search-paths]: Add GUIX_ECL_SOURCE_REGISTRY.
---
 gnu/packages/lisp.scm | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 4564549..4ec163a 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -126,7 +126,12 @@ interface to the Tk widget system.")
  "https://common-lisp.net/project/ecl/static/files/release/;
  name "-" version ".tgz"))
(sha256
-(base32 "16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d"
+(base32 "16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d"))
+   (modules '((guix build utils)))
+   (snippet
+;; Add $GUIX_ECL_SOURCE_REGISTRY to *default-source-registries*
+`(substitute* "contrib/asdf/asdf.lisp"
+   ,@(asdf-substitutions name)
 (build-system gnu-build-system)
 ;; src/configure uses 'which' to confirm the existence of 'gzip'.
 (native-inputs `(("which" ,which)))
@@ -167,6 +172,11 @@ interface to the Tk widget system.")
  `("LIBRARY_PATH" suffix ,library-directories)
  `("LD_LIBRARY_PATH" suffix ,library-directories)
  (add-after 'wrap 'check (assoc-ref %standard-phases 'check)
+(native-search-paths
+ (list (search-path-specification
+(variable "GUIX_ECL_SOURCE_REGISTRY")
+(files '("share/common-lisp/ecl-bundle-systems"

Re: guix environment guix doesn't provide guix dependencies?

2016-09-28 Thread Ludovic Courtès
Hi Chris,

Chris Marusich  skribis:

> John Darrington  writes:

[...]

>> I don't think so.   Running ./bootstrap is not part of the normal process 
>> for *building*
>> guix - only for bootstrapping.  But you are right - it is common to want to 
>> do that.
>> For this reason I often run:
>>
>>  guix environment guix --ad-hoc automake autoconf texinfo help2man
>>
>>
>> But perhaps you are right - the manual might want to mention this.
>>
>> J'
>
> That makes sense.  I feel like it used to provide all the dependencies,
> including autoconf etc., but that was months ago, and I might be
> mis-remembering.  It works fine when I add the needed bootstrap
> dependencies with --ad-hoc.

In fact there’s a small time window during which “guix environment guix”
doesn’t provide autoconf et al.: it’s when the ‘guix’ variable in (gnu
packages package-management) refers to a released tarball instead of a
Git checkout, since a build from tarball doesn’t depend on autoconf et
al.

So if you run “guix environment guix” on a commit different from
v0.11.0 + 1, you effectively get all the dependencies.

I admit this is a bit confusing.  Not sure how to document/improve that.

Ideas?

Ludo’.



Re: Call for volunteer(s) for Guix "security" web page

2016-09-28 Thread Ludovic Courtès
Leo Famulari  skribis:

> From 64b1df0a9565154ac2a1bd5289a13572b00bb5e0 Mon Sep 17 00:00:00 2001
> From: Leo Famulari 
> Date: Tue, 27 Sep 2016 14:12:02 -0400
> Subject: [PATCH] doc: Give the full key fingerprint instead of the long key
>  ID.
>
> * doc/guix.texi (OPENPGP-SIGNING-KEY-ID): Use fingerprint instead of
> long key ID.

OK, thanks!

Ludo'.



Re: [PATCH 4/6] gnu: linux-libre-beagle-bone-black: Remove kernel variant.

2016-09-28 Thread Ludovic Courtès
Mark H Weaver  skribis:

> Our conventions for commit logs, which follow the GNU Coding Standards
> for Change Logs (see section 6.8 of the GNU Coding Standards), is that
> explanations belong in the comments of the code itself, not in the
> commit log.  If that had been done in the example you give above, you
> would have known why the line was needed in a small fraction of the time
> that it must have taken you to perform all the steps above.
>
> However, I agree that commits that _remove_ code should include the
> rationale in the commit log, if the reason is not obvious and if there's
> no sensible place to put the explanation in the code.
>
> What do you think?

+1

Ludo’.



Re: [PATCH 4/6] gnu: linux-libre-beagle-bone-black: Remove kernel variant.

2016-09-28 Thread Ludovic Courtès
John Darrington  skribis:

> I don't object to a having a common style.   I just wish that the information
> that we put in our messages a) gave the rationale for the change; and b) 
> didn't
> merely repeat information which git show could have told me.

The rationale should really go to comments in the code:
.

A notable exception is reverts or removals: for these, I think it’s best
to have an explanation in the code, so that someone browsing the history
can understand why that happened.

Ludo’.



Re: [PATCH 4/6] gnu: linux-libre-beagle-bone-black: Remove kernel variant.

2016-09-28 Thread Ludovic Courtès
Hi,

Vincent Legoll  skribis:

> Is it just me finding this changelog format usefulness to be
> very low ?

The change log is just a log of changes, not the place where we explain
the why and how—this rather goes to comments.  See

for the rationale.

Ludo’.



Re: [PATCH] gnu: Add linux-pam.

2016-09-28 Thread Ludovic Courtès
Hi,

rennes  skribis:

> From b4753711aabcefa410b2eb4ced9d25e084bb7658 Mon Sep 17 00:00:00 2001
> From: Rene Saavedra 
> Date: Tue, 20 Sep 2016 14:59:20 -0500
> Subject: [PATCH] gnu: Add linux-pam.
>
>   * gnu/packages/linux.scm (linux-pam): Use it.
>   * gnu/packages/patches/linux-pam-no-setfsuid.patch: New file.
>   * gnu/local.mk (dist_patch_DATA): Add it.

Applied a slightly modified variant as
411264c250cb6a6485851890f0d3ec5fb508dbfa.

Thanks!

Ludo’.



Re: Call for volunteer(s) for Guix "security" web page

2016-09-28 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Tue, Sep 27, 2016 at 10:58:09AM +0200, Ludovic Courtès wrote:
> From eeff071ec9fbe527a97e2c7487e79e4b843916a1 Mon Sep 17 00:00:00 2001
> From: Leo Famulari 
> Date: Sun, 25 Sep 2016 18:43:28 -0400
> Subject: [PATCH] www: security: New page.
>
> * website/www/security.scm: New file.
> * website/www.scm (%web-pages): Add security-page.
> * website/www/shared.scm (html-page-links): Add "Security".

Very good, go ahead!  :-)

Thank you!

Ludo’.



Re: Binutils build failure on MIPS

2016-09-28 Thread Ludovic Courtès
Hello!

Vincent Legoll  skribis:

> On Tue, Sep 13, 2016 at 10:26 AM, Ludovic Courtès  wrote:
>> l...@gnu.org (Ludovic Courtès) skribis:

[...]

>> And now for MIPS!  I was so joyful that I almost forgot that
>> binutils-cross-boot0-2.27 fails to build on MIPS:
>>
>>   https://hydra.gnu.org/build/1470440/nixlog/3/raw
>>
>> I cannot find any error message in the build log, so I don’t know what’s
>> going on.
>>
>> Could someone take a look?
>
> I found this:
>
> /tmp/nix-build-binutils-cross-boot0-2.27.drv-0/binutils-2.27/ld/configure:
> unhandled emulation
> [...]
> make[1]: *** [Makefile:7125: configure-ld] Error 1
> make[1]: *** Waiting for unfinished jobs
>
> Something similar was discussed in comp.gnu.binutils, it was also about 
> mips...
>
> http://webcache.googleusercontent.com/search?q=cache:waWLFBpEIPQJ:permalink.gmane.org/gmane.comp.gnu.binutils/69283+=1=en=clnk=us=lang_de%7Clang_en%7Clang_fr

This is fixed in 789f09a073a7239aee2e551d52b5b5ea9f41bb90!  \o/

It was a silly Bash 4.2 bug described in:

  http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007

Ludo’.



Re: guix environment guix doesn't provide guix dependencies?

2016-09-28 Thread myglc2
Eric Bavier  writes:

> On Tue, 27 Sep 2016 22:10:31 -0700
> Chris Marusich  wrote:
>
>> John Darrington  writes:
>> 
>> > On Tue, Sep 27, 2016 at 09:18:30PM -0700, Chris Marusich wrote:
>> >  Hi,
>> >  
>> >  The manual says ((guix) Building from Git):
>> >  
>> >  --8<---cut here---start->8---
>> > The easiest way to set up a development environment for Guix is, of
>> >  course, by using Guix!  The following command starts a new shell where
>> >  all the dependencies and appropriate environment variables are set up 
>> > to
>> >  hack on Guix:
>> >  
>> >   guix environment guix
>> >  --8<---cut here---end--->8---
>> >  
>> >  After running this command successfully, I get the following error 
>> > while
>> >  running ./bootstrap:
>> >  
>> >  --8<---cut here---start->8---
>> >  + exec autoreconf -vfi
>> >  ./bootstrap: line 5: exec: autoreconf: not found
>> >  --8<---cut here---end--->8---
>> >  
>> >  This makes me wonder: has something changed, and the manual is now
>> >  incorrect?
>> >  
>> >
>> > I don't think so.   Running ./bootstrap is not part of the normal process 
>> > for *building*
>> > guix - only for bootstrapping.  But you are right - it is common to want 
>> > to do that.
>> > For this reason I often run:
>> >
>> >  guix environment guix --ad-hoc automake autoconf texinfo help2man
>> >
>> >
>> > But perhaps you are right - the manual might want to mention this.
>> >
>> > J'  
>> 
>> That makes sense.  I feel like it used to provide all the dependencies,
>> including autoconf etc., but that was months ago, and I might be
>> mis-remembering.  It works fine when I add the needed bootstrap
>> dependencies with --ad-hoc.

The conversation above beautifully illustrates how maddening Guix is ...

... and the line below demonstrates it's beauty.

> You can also do 
>
>   guix environment -e "(@ (gnu packages package-management) guix)"

Someone, please add it to the manual!



Re: [PATCH] mailmanclient

2016-09-28 Thread Hartmut Goebel
Am 28.09.2016 um 19:48 schrieb Leo Famulari:
>> > Is this necessary for all python2 package variants? I rarely see this.
> For any use of the python2-variant system, yes. I replied to a lot of
> your submitted packages a couple days ago to point out that they needed
> this change.

I want to emphasis again me recent change to the python-build-system,
which makes setuptools available for Python 2, too, and will thus
unburden from the need of both setting python2-variant and manually
inheriting a package to add python2-setuptools. So for most cases a
plain package-with-python2 transformation would be enough.

Maybe you want to review that patch-series soon :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH 00/14] Change python-build-system (fixes bug 20765)

2016-09-28 Thread Hartmut Goebel
Am 28.09.2016 um 17:54 schrieb Marius Bakke:
> I am unable to apply these patches with "git am".
> Any chance you can resend after "git format-patch"? For long patch
> series, I tend to "git format-patch -n master --stdout > series.patch".
I'm using "git format-patch --cover-letter -M origin/master -o
outgoing/" and can't see what should be different (except that you'll
end up with all patches in a single file).

The patch-series was created based on
58478cc1cb225e2eed979afa4021f850f3ebf121.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH 00/14] Change python-build-system (fixes bug 20765)

2016-09-28 Thread Hartmut Goebel
Am 28.09.2016 um 17:54 schrieb Marius Bakke:
> Or push a branch somewhere?

Branch is now available at 


-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Superseded packages

2016-09-28 Thread Leo Famulari
On Wed, Sep 28, 2016 at 10:44:26AM +0200, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> > So the attached patch moves attic after borg and supersedes it. Is it
> > expected that we have to shuffle the package definition around like
> > this?
> 
> Yes, because ‘properties’ are evaluated eagerly.
> 
> We could change the ‘superseded’ property to always be a promise, as
> Efraim suggests; we’ll see later if that’s really necessary.
> 
> The patch LGTM.

Okay, pushed. Thanks for the details!



Re: gnu: Add xonsh

2016-09-28 Thread Leo Famulari
On Wed, Sep 21, 2016 at 10:01:30PM +0200, Stefan Reichör wrote:
> Subject: [PATCH] gnu: Add xonsh.
> 
> * gnu/packages/python.scm (xonsh): New variable.

I corrected the license to bsd-2 [0], moved the package definition to
(gnu packages shells) and pushed as 1d51585573f491.

Thanks!

[0]
https://github.com/xonsh/xonsh/blob/e10c38deccf94189012cca9864cac2bff77dd984/license



Re: [PATCH] mailmanclient

2016-09-28 Thread Leo Famulari
On Wed, Sep 28, 2016 at 05:25:52PM +, ng0 wrote:
> Leo Famulari  writes:
> 
> > [ Unknown signature status ]
> > On Wed, Sep 28, 2016 at 05:02:56PM +, ng0 wrote:
> >> Subject: [PATCH] gnu: Add python-mailmanclient.
> >> 
> >> * gnu/packages/mail.scm (python-mailmanclient): New variable.
> >
> >> +(define-public python2-mailmanclient
> >> +  (let ((base (package-with-python2
> >> +   (strip-python2-variant python-mailmanclient
> >> +(package (inherit base)
> >> +  (native-inputs
> >> +   `(("python2-setuptools" ,python2-setuptools))
> >
> > This variant will not be used unless there is a python2-variant
> > properties field in python-mailman, like this:
> >
> > (properties `((python2-variant . ,(delay python2-mailmanclient
> >
> > You can see the recent commit "gnu: Add python-q. (e8c9b01090)" for an
> > example in context.
> 
> Is this necessary for all python2 package variants? I rarely see this.

For any use of the python2-variant system, yes. I replied to a lot of
your submitted packages a couple days ago to point out that they needed
this change.

If you are just doing a plain package-with-python2 transformation, then
it's not required. Python2-variant is used when package-with-python2 is
not enough, because there are extra inputs, arguments, etc.



Re: [PATCH] mailmanclient

2016-09-28 Thread Hartmut Goebel
Am 28.09.2016 um 19:14 schrieb Leo Famulari:
> > +   `(("python2-setuptools" ,python2-setuptools))
This will no longer be needed if my latest changes to the
python-build-systm will be accepted.

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog:
http://www.goebel-consult.de/blog/filmgesprach-zu-201ecitizenfour201c-in-herrsching

Kolumne:
http://www.cissp-gefluester.de/2011-10-aus-der-schublade-in-die-koepfe



signature.asc
Description: OpenPGP digital signature


Re: [PATCH] mailmanclient

2016-09-28 Thread ng0
Leo Famulari  writes:

> [ Unknown signature status ]
> On Wed, Sep 28, 2016 at 05:02:56PM +, ng0 wrote:
>> Subject: [PATCH] gnu: Add python-mailmanclient.
>> 
>> * gnu/packages/mail.scm (python-mailmanclient): New variable.
>
>> +(define-public python2-mailmanclient
>> +  (let ((base (package-with-python2
>> +   (strip-python2-variant python-mailmanclient
>> +(package (inherit base)
>> +  (native-inputs
>> +   `(("python2-setuptools" ,python2-setuptools))
>
> This variant will not be used unless there is a python2-variant
> properties field in python-mailman, like this:
>
> (properties `((python2-variant . ,(delay python2-mailmanclient
>
> You can see the recent commit "gnu: Add python-q. (e8c9b01090)" for an
> example in context.

Is this necessary for all python2 package variants? I rarely see this.
-- 
  ng0



Re: [PATCH] mailmanclient

2016-09-28 Thread Leo Famulari
On Wed, Sep 28, 2016 at 05:02:56PM +, ng0 wrote:
> Subject: [PATCH] gnu: Add python-mailmanclient.
> 
> * gnu/packages/mail.scm (python-mailmanclient): New variable.

> +(define-public python2-mailmanclient
> +  (let ((base (package-with-python2
> +   (strip-python2-variant python-mailmanclient
> +(package (inherit base)
> +  (native-inputs
> +   `(("python2-setuptools" ,python2-setuptools))

This variant will not be used unless there is a python2-variant
properties field in python-mailman, like this:

(properties `((python2-variant . ,(delay python2-mailmanclient

You can see the recent commit "gnu: Add python-q. (e8c9b01090)" for an
example in context.


signature.asc
Description: PGP signature


Re: [PATCH] mailmanclient

2016-09-28 Thread ng0
ng0  writes:

> [ Unknown signature status ]
> A start for someone who wants to work on packaging mailman3, you need
> this and afterwards django-mailman3, then comes hyperkitty, and
> afterwards mailman3 itself I think.
> Added python2 variant because mailman3 has some mixture in the
> dependency chain going on.
>
> From bdcb5e7e77bd3e215016b3d9fde5094d618e64b9 Mon Sep 17 00:00:00 2001
> From: ng0 
> Date: Wed, 28 Sep 2016 16:58:29 +
> Subject: [PATCH] gnu: Add python-mailmanclient.
>
> * gnu/packages/mail.scm (python-mailmanclient): New variable.
> ---
>  gnu/packages/mail.scm | 32 +++-
>  1 file changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index 09c15e2..41e564a 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -15,7 +15,7 @@
>  ;;; Copyright © 2016 Lukas Gradl 
>  ;;; Copyright © 2016 Alex Kost 
>  ;;; Copyright © 2016 Troy Sankey 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016 ng0 
>  ;;; Copyright © 2016 Clément Lassieur 
>  ;;; Copyright © 2016 Arun Isaac 
>  ;;; Copyright © 2016 John Darrington 
> @@ -1493,3 +1493,33 @@ transfer protocols.")
>  (license (non-copyleft "file://LICENSE"
> "See LICENSE in the distribution."
>  
> +(define-public python-mailmanclient
> +  (package
> +(name "python-mailmanclient")
> +(version "1.0.1")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "mailmanclient" version))
> +   (sha256
> +(base32
> + "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"
> +(build-system python-build-system)
> +(arguments
> + `(#:tests? #f)) ; Requires mailman running
> +(inputs
> + `(("python-six" ,python-six)
> +   ("python-httplib2" ,python-httplib2)))
> +(home-page "http://launchpad.net/mailman.client;)
> +(synopsis "Python bindings for the Mailman 3 REST API")
> +(description
> + "The mailmanclient library provides official Python bindings for
 ^___ Could the commiter remove this? Thanks.
> +the GNU Mailman 3 REST API.")
> +(license lgpl3+)))
> +
> +(define-public python2-mailmanclient
> +  (let ((base (package-with-python2
> +   (strip-python2-variant python-mailmanclient
> +(package (inherit base)
> +  (native-inputs
> +   `(("python2-setuptools" ,python2-setuptools))
> -- 
> 2.10.0
>
> -- 
>   ng0

-- 
  ng0



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread Leo Famulari
On Wed, Sep 28, 2016 at 12:42:47PM +, ng0 wrote:
> What I mean is, I expect this feature (tcp connections in/out to/from
> "the internet" to vm) to work in guix system vm, as it is a normal
> expectation coming from NixOS and Gentoo that it just works without any
> added specialities.

Ping does not use TCP/IP. It uses ICMP, which is a different protocol.
QEMU has a variety of types of virtualized networking. The basic type
does not support ICMP.

You should use some other command to test the network. You could use
`guix download https://gnu.org/index.html`. It has the advantage of not
requiring any packages to be installed.



[PATCH] mailmanclient

2016-09-28 Thread ng0
A start for someone who wants to work on packaging mailman3, you need
this and afterwards django-mailman3, then comes hyperkitty, and
afterwards mailman3 itself I think.
Added python2 variant because mailman3 has some mixture in the
dependency chain going on.

From bdcb5e7e77bd3e215016b3d9fde5094d618e64b9 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Wed, 28 Sep 2016 16:58:29 +
Subject: [PATCH] gnu: Add python-mailmanclient.

* gnu/packages/mail.scm (python-mailmanclient): New variable.
---
 gnu/packages/mail.scm | 32 +++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 09c15e2..41e564a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2016 Lukas Gradl 
 ;;; Copyright © 2016 Alex Kost 
 ;;; Copyright © 2016 Troy Sankey 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016 ng0 
 ;;; Copyright © 2016 Clément Lassieur 
 ;;; Copyright © 2016 Arun Isaac 
 ;;; Copyright © 2016 John Darrington 
@@ -1493,3 +1493,33 @@ transfer protocols.")
 (license (non-copyleft "file://LICENSE"
"See LICENSE in the distribution."
 
+(define-public python-mailmanclient
+  (package
+(name "python-mailmanclient")
+(version "1.0.1")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "mailmanclient" version))
+   (sha256
+(base32
+ "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"
+(build-system python-build-system)
+(arguments
+ `(#:tests? #f)) ; Requires mailman running
+(inputs
+ `(("python-six" ,python-six)
+   ("python-httplib2" ,python-httplib2)))
+(home-page "http://launchpad.net/mailman.client;)
+(synopsis "Python bindings for the Mailman 3 REST API")
+(description
+ "The mailmanclient library provides official Python bindings for
+the GNU Mailman 3 REST API.")
+(license lgpl3+)))
+
+(define-public python2-mailmanclient
+  (let ((base (package-with-python2
+   (strip-python2-variant python-mailmanclient
+(package (inherit base)
+  (native-inputs
+   `(("python2-setuptools" ,python2-setuptools))
-- 
2.10.0

-- 
  ng0


signature.asc
Description: PGP signature


[PATCH] doc: Add information related to network connectivity with qemu.

2016-09-28 Thread David Craven
* doc/guix.text: Add it.
---
 doc/guix.texi | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 785d6fb..5173ca7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11030,6 +11030,45 @@ which may be insufficient for some operations.
 The file name of the qcow2 image.
 @end table
 
+The default @command{run-vm.sh} script that is returned by an invokation of
+@command{guix system vm} does not add a @command{-net user} flag by default.
+To get network access from within the vm add the @code{(dhcp-client-service)}
+to your system definition and start the vm using
+@command{$(guix system vm config.scm) -net user}.  An important caveat of using
+@command{-net user} for networking is that @command{ping} will not work, 
because
+it uses the ICMP protocol.  You'll have to use a different command to check for
+network connectivity, I'll leave this as an exercise for the reader.
+
+@subsubsection Connecting through ssh
+
+To enable ssh inside a vm you need to add a ssh server like 
@code{(dropbear-service)}
+or @code{(lsh-service)} to your vm. The @code{(lsh-service}) doesn't currently
+boot unsupervised. It requires you to type some characters to initialize the
+randomness generator. In addition you need to forward the ssh port, 22 by
+default, to the host. You can do this with
+@command{$(guix system vm config.scm) -net user,hostfwd=tcp::10022-:22}. To 
connect
+to the vm you can run
+@command{ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 
10022}.
+The @command{-p} tells @command{ssh} the port you want to connect to.
+@command{-o UserKnownHostsFile=/dev/null} prevents @command{ssh} from 
complaining
+every time you modify your @command{config.scm} file and the
+@command{-o StrictHostKeyChecking=no} prevents you from having to allow a
+connection to an unknown host every time you connect.
+
+@subsubsection Using virt-viewer with spice
+
+The default qemu graphical client isn't very nice.  As an alternative you can
+use the @command{remote-viewer} from the @command{virt-viewer} package. To
+connect pass the @command{-spice port=5930,disable-ticketing} flag to
+@command{qemu}. See previous section for further information on how to do this.
+
+Spice also allows you to do some nice stuff like share your clipboard with your
+vm.  To enable that you'll have to in addition pass the following flags to
+@command{qemu}: @command{-device 
virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5}
+@command{-chardev spicevmc,name=vdagent,id=vdagent}
+@command{-device 
virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0}.
+You'll also need to add the @code{(spice-vdagent-service)}.
+
 @node Defining Services
 @subsection Defining Services
 
-- 
2.9.0



Re: [PATCH 00/14] Change python-build-system (fixes bug 20765)

2016-09-28 Thread Marius Bakke
Hartmut Goebel  writes:

> Hi, minor correction:
>
> Am 28.09.2016 um 15:58 schrieb Hartmut Goebel:
>> This series implements what I proposed in
>>   .
>>
>> A) For python2 include python2-setuptools as a native-input by default.
> I implemented :
> *
> A1) Change the Python 2 build to bootstrap pip*

Wow, amazing work! I am unable to apply these patches with "git am".
Any chance you can resend after "git format-patch"? For long patch
series, I tend to "git format-patch -n master --stdout > series.patch".

Or push a branch somewhere? It would probably be sensible to run this
through Hydra, but I'll try building (@ (gnu packages python)) on my
server.

Thanks!




Re: [PATCH] Add psyc* suite

2016-09-28 Thread ng0
Hi,

so next try. The First 3 patches intended for review and possible merge,
for patch 4 (psyced) I want some input, this needs hopefully only a
simply guix service.

From 5bfb62bbce996f718bf184a07f163a932975a730 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Wed, 28 Sep 2016 13:48:22 +
Subject: [PATCH 1/4] gnu: Add perl-net-psyc.

* gnu/packages/psyc.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk  |   1 +
 gnu/packages/psyc.scm | 105 ++
 2 files changed, 106 insertions(+)
 create mode 100644 gnu/packages/psyc.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index b864ea9..d49d458 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -296,6 +296,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/pumpio.scm			\
   %D%/packages/pretty-print.scm			\
   %D%/packages/protobuf.scm			\
+  %D%/packages/psyc.scm \
   %D%/packages/pv.scm\
   %D%/packages/python.scm			\
   %D%/packages/qemu.scm\
diff --git a/gnu/packages/psyc.scm b/gnu/packages/psyc.scm
new file mode 100644
index 000..4d53dfd
--- /dev/null
+++ b/gnu/packages/psyc.scm
@@ -0,0 +1,105 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 ng0 
+;;;
+;;; 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 .
+
+(define-module (gnu packages psyc)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages web))
+
+(define-public perl-net-psyc
+  (package
+(name "perl-net-psyc")
+(version "1.1")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "http://perl.psyc.eu/;
+   "perlpsyc-" version ".zip"))
+   (file-name (string-append name "-" version ".zip"))
+   (sha256
+(base32
+ "1lw6807qrbmvzbrjn1rna1dhir2k70xpcjvyjn45y35hav333a42"))
+   ;; psycmp3 currently depends on MP3::List and rxaudio (shareware),
+   ;; we can add it back when this is no longer the case.
+   (snippet '(delete-file "contrib/psycmp3"
+(build-system perl-build-system)
+(inputs
+ `(("perl-curses" ,perl-curses)
+   ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (delete 'configure) ; No configure script
+ ;; There is a Makefile, but it does not install everything
+ ;; (leaves out psycion) and says
+ ;; "# Just to give you a rough idea". XXX: Fix it upstream.
+ (replace 'build
+   (lambda _
+ (zero? (system* "make" "manuals"
+ (replace 'install
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(doc (string-append out "/share/doc/perl-net-psyc"))
+(man1 (string-append out "/share/man/man1"))
+(man3 (string-append out "/share/man/man3"))
+(bin (string-append out "/bin"))
+(libpsyc (string-append out "/lib/psyc/ion"))
+(libperl (string-append out "/lib/perl5/site_perl/"
+,(package-version perl
+
+   (copy-recursively "lib/perl5" libperl)
+   (copy-recursively "lib/psycion" libpsyc)
+   (copy-recursively "bin" bin)
+   (install-file "cgi/psycpager" (string-append doc "/cgi"))
+   (copy-recursively "contrib" (string-append doc "/contrib"))
+   (copy-recursively "hooks" (string-append doc "/hooks"))
+   (copy-recursively "sdj" (string-append doc "/sdj"))
+   (install-file "README.txt" doc)
+   (install-file "TODO.txt" doc)
+   (copy-recursively "share/man/man1" man1)
+   (copy-recursively "share/man/man3" man3)
+   #t)))
+ (add-after 'install 'wrap-programs
+   (lambda* (#:key outputs #:allow-other-keys)
+ ;; Make sure all executables in "bin" find the Perl modules
+ ;; provided by this package at 

[PATCH 5/7] gnu: Add rustc-bootstrap.

2016-09-28 Thread David Craven
* gnu/packages/rust.scm (rustc-bootstrap, rust-bootstrap-x86_64-1.12.0):
  New variables.
---
 gnu/packages/rust.scm | 99 +++
 1 file changed, 99 insertions(+)
 create mode 100644 gnu/packages/rust.scm

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
new file mode 100644
index 000..2726348
--- /dev/null
+++ b/gnu/packages/rust.scm
@@ -0,0 +1,99 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 .
+
+(define-module (gnu packages rust)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bootstrap)
+  #:use-module (gnu packages commencement)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages gcc)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define rust-bootstrap-x86_64-1.12.0
+  (origin
+(method url-fetch)
+(uri (string-append
+  "https://static.rust-lang.org/dist/;
+  "rust-beta-x86_64-unknown-linux-gnu.tar.gz"))
+(sha256
+ (base32
+  "1is1k93zarvxx0h7b57ga8vr9gj34b36l9la6zkph41x33gfgpvl"
+
+(define-public rustc-bootstrap
+  (package
+(name "rustc-bootstrap")
+(version "1.12.0")
+(source rust-bootstrap-x86_64-1.12.0)
+(build-system gnu-build-system)
+(native-inputs
+ `(("patchelf" ,patchelf)))
+(inputs
+ `(("gcc-lib" ,gcc "lib")
+   ("gcc-toolchain-6" ,gcc-toolchain-6)
+   ("zlib" ,zlib)))
+(arguments
+ `(#:tests? #f
+   #:strip-binaries? #f
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+   (gcc-lib (assoc-ref inputs "gcc-lib"))
+   (toolchain (assoc-ref inputs "gcc-toolchain-6"))
+   (zlib (assoc-ref inputs "zlib"))
+   (platform ,(system->rust-platform (%current-system)))
+   (ld-so (string-append (assoc-ref inputs "libc")
+ ,(glibc-dynamic-linker
+   (system* "bash" "install.sh"
+(string-append "--prefix=" out)
+(string-append "--components=rustc,"
+   "rust-std-" platform))
+   (for-each
+(lambda (file)
+  (system* "patchelf"
+   "--set-rpath"
+   (string-append out "/lib:" zlib "/lib:"
+  gcc-lib "/lib:" toolchain "/lib")
+   file))
+(cons* (string-append out "/bin/rustc")
+   (string-append out "/bin/rustdoc")
+   (find-files out "\\.so$")))
+   (for-each
+(lambda (file)
+  (system* "patchelf"
+   "--set-interpreter" ld-so
+   file))
+(list (string-append out "/bin/rustc")
+  (string-append out "/bin/rustdoc")))
+   ;; Rust requires a gcc toolchain for linking. It
+   ;; looks for a compiler named cc in it's path. This
+   ;; can probably be configured during the build.
+   (symlink (string-append toolchain "/bin/gcc")
+(string-append out "/bin/cc"
+(home-page "https://www.rust-lang.org;)
+(synopsis "Rustc bootstrap")
+(description "This package prepares the rustc binary for bootstrapping
+the rustc package.")
+(license license:asl2.0)))
-- 
2.9.0



[PATCH 3/7] import: crate: Add crate updater.

2016-09-28 Thread David Craven
* guix/import/crate.scm (crate-package?, latest-release,
  %crate-updater): New variables.
* guix/scripts/refresh.scm (%updaters): Add %crate-updater to list of
  updaters.
---
 guix/import/crate.scm| 36 +++-
 guix/scripts/refresh.scm |  4 +++-
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index db7f119..8fab200 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -31,7 +31,8 @@
   #:use-module (json)
   #:use-module (srfi srfi-1)
   #:export (crate->guix-package
-guix-package->crate-name))
+guix-package->crate-name
+%crate-updater))
 
 (define (crate-fetch name)
   "Return an alist representation of the crates.io metadata for the package 
NAME,
@@ -91,3 +92,36 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and 
LICENSE."
 
 (define (crate-name->package-name name)
   (string-append "rust-" name))
+
+(define (crate-package? package)
+  "Return true if PACKAGE is a Rust crate from crates.io."
+
+  (define (crate-url? url)
+(string-prefix? "https://crates.io/; url))
+
+  (let ((source-url (and=> (package-source package) origin-uri))
+(fetch-method (and=> (package-source package) origin-method)))
+(and (eq? fetch-method download:url-fetch)
+ (match source-url
+   ((? string?)
+(crate-url? source-url))
+   ((source-url ...)
+(any crate-url? source-url))
+
+(define (latest-release package)
+  "Return an  for the latest release of PACKAGE."
+  (let* ((crate-name (guix-package->crate-name package))
+ (metadata (crate-fetch crate-name))
+ (version (assoc-ref* metadata "crate" "max_version"))
+ (url (crate-uri crate-name version)))
+(upstream-source
+ (package (package-name package))
+ (version version)
+ (urls (list url)
+
+(define %crate-updater
+  (upstream-updater
+   (name 'crates)
+   (description "Updater for crates.io packages")
+   (pred crate-package?)
+   (latest latest-release)))
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 84e2a8f..eda10df 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -38,6 +38,7 @@
   %xorg-updater))
   #:use-module (guix import elpa)
   #:use-module (guix import cran)
+  #:use-module (guix import crate)
   #:use-module (guix import hackage)
   #:use-module (guix gnupg)
   #:use-module (gnu packages)
@@ -206,7 +207,8 @@ unavailable optional dependencies such as Guile-JSON."
  %hackage-updater
  ((guix import pypi) => %pypi-updater)
  ((guix import gem) => %gem-updater)
- ((guix import github) => %github-updater)))
+ ((guix import github) => %github-updater)
+ ((guix import crate) => %crate-updater)))
 
 (define (lookup-updater name)
   "Return the updater called NAME."
-- 
2.9.0



Re: [PATCH 5/7] gnu: Add rustc-bootstrap.

2016-09-28 Thread David Craven
gcc-toolchain is a function. We could use gcc-toolchain-4.9 if you prefer?



[PATCH 7/7] gnu: Add rust-libc.

2016-09-28 Thread David Craven
* gnu/packages/rust.scm (rust-libc): New variable.
---
 gnu/packages/rust.scm | 20 
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 5b369fc..0ac09b3 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -23,6 +23,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gcc)
+  #:use-module (guix build-system cargo)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix packages)
@@ -140,3 +141,22 @@ the cargo package and it's dependencies.  When rustc is 
build using the new
 rustbuild build system it also requires cargo.  The gnu build system is going
 to be deprecated.")
 (license license:asl2.0)))
+
+(define-public rust-libc
+  (package
+(name "rust-libc")
+(version "0.2.16")
+(source (origin
+  (method url-fetch)
+  (uri (crate-uri "libc" version))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"139fl308mb5wxap5fyd5c7n779a60sc1fi8wgdv0zvihrv519020"
+(build-system cargo-build-system)
+(home-page "https://github.com/rust-lang/libc;)
+(synopsis
+ "Types and bindings to native C functions")
+(description "This package provides a library for types and bindings to
+native C functions often found in libc or other common platform libraries.")
+(license (list license:expat license:asl2.0
-- 
2.9.0



Re: [PATCH 4/7] upstream: Use a the first url from urls when find2 returns #f.

2016-09-28 Thread David Craven
There is an example now. You can change the version of the rust-libc
package and then run guix refresh -u rust-libc on it.



[PATCH 4/7] upstream: Use a the first url from urls when find2 returns #f.

2016-09-28 Thread David Craven
* guix/upstream.scm (package-update): Use a url from the list when the
  find2 procedure doesn't find a url sig-url pair.
---
 guix/upstream.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/upstream.scm b/guix/upstream.scm
index 1815737..ac3f72f 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -194,7 +194,7 @@ and 'interactive' (default)."
  (string-suffix? archive-type url))
urls
(or signature-urls (circular-list #f)
-   (let ((tarball (download-tarball store url signature-url
+   (let ((tarball (download-tarball store (if url url (car urls)) 
signature-url
 #:key-download key-download)))
  (values version tarball
 (#f
-- 
2.9.0



[PATCH 2/7] import: Add importer for rust crates.

2016-09-28 Thread David Craven
* guix/import/crate.scm (crate-fetch, make-crate-sexp,
  crate->guix-package, guix-package->crate-name, string->license,
  crate-name->package-name): New variables.
* guix/scripts/import/crate.scm (%default-options, show-help, %options,
  guix-import-crate): New variables.
* guix/scripts/import.scm (importers): Add crate to list of importers.
* tests/crate.scm (test-json, test-source-hash,
  guix-package->crate-name, crate->guix-package): New variables.
---
 doc/guix.texi |  5 +++
 guix/import/crate.scm | 93 ++
 guix/scripts/import.scm   |  2 +-
 guix/scripts/import/crate.scm | 94 +++
 tests/crate.scm   | 83 ++
 5 files changed, 276 insertions(+), 1 deletion(-)
 create mode 100644 guix/import/crate.scm
 create mode 100644 guix/scripts/import/crate.scm
 create mode 100644 tests/crate.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index c159e12..785d6fb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4986,6 +4986,11 @@ identifier.  This is the default.
 identifier.
 @end itemize
 @end table
+
+@item crate
+@cindex crate
+Import metadata from the crates.io rust package repository
+@uref{https://crates.io, crates.io}.
 @end table
 
 The structure of the @command{guix import} code is modular.  It would be
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
new file mode 100644
index 000..db7f119
--- /dev/null
+++ b/guix/import/crate.scm
@@ -0,0 +1,93 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 .
+
+(define-module (guix import crate)
+  #:use-module (guix base32)
+  #:use-module (guix build-system cargo)
+  #:use-module ((guix download) #:prefix download:)
+  #:use-module (guix hash)
+  #:use-module (guix http-client)
+  #:use-module (guix import utils)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix upstream)
+  #:use-module (guix utils)
+  #:use-module (ice-9 match)
+  #:use-module (json)
+  #:use-module (srfi srfi-1)
+  #:export (crate->guix-package
+guix-package->crate-name))
+
+(define (crate-fetch name)
+  "Return an alist representation of the crates.io metadata for the package 
NAME,
+or #f on failure."
+  (let* ((url (string-append "https://crates.io/api/v1/crates/; name))
+ (port (http-fetch url))
+ (result (json->scm port)))
+(close-port port)
+(hash-table->alist result)))
+
+;; TODO: Import inputs and native-inputs
+(define (make-crate-sexp name version home-page synopsis description license)
+  "Return the `package' s-expression for a rust package with the given NAME,
+VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
+  (let* ((port (http-fetch (crate-uri name version)))
+ (pkg `(package
+ (name ,(crate-name->package-name name))
+ (version ,version)
+ (source (origin
+   (method url-fetch)
+   (uri (crate-uri ,name version))
+   (file-name (string-append name "-" version 
".tar.gz"))
+   (sha256
+(base32
+ ,(bytevector->nix-base32-string (port-sha256 
port))
+ (build-system cargo-build-system)
+ (home-page ,home-page)
+ (synopsis ,synopsis)
+ (description ,(beautify-description description))
+ (license ,(match license
+ (() #f)
+ ((license) license)
+ (_ `(list ,@license)))
+(close-port port)
+pkg))
+
+(define (crate->guix-package crate-name)
+  "Fetch the metadata for CRATE-NAME from crates.io, and return the
+`package' s-expression corresponding to that package, or #f on failure."
+  (let ((crate (crate-fetch crate-name)))
+(let ((name (assoc-ref* crate "crate" "name"))
+  (version (assoc-ref* crate "crate" "max_version"))
+  (home-page (assoc-ref* crate "crate" "homepage"))
+  (synopsis (assoc-ref* crate "crate" "description"))
+  (description 

[PATCH 6/7] gnu: Add cargo-bootstrap.

2016-09-28 Thread David Craven
* gnu/packages/rust.scm (cargo-bootstrap): New variable.
---
 gnu/packages/rust.scm | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 2726348..5b369fc 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -97,3 +97,46 @@
 (description "This package prepares the rustc binary for bootstrapping
 the rustc package.")
 (license license:asl2.0)))
+
+(define-public cargo-bootstrap
+  (package
+(name "cargo-bootstrap")
+(version "1.12.0")
+(source rust-bootstrap-x86_64-1.12.0)
+(build-system gnu-build-system)
+(native-inputs
+ `(("patchelf" ,patchelf)))
+(inputs
+ `(("gcc-lib" ,gcc "lib")
+   ("gcc-toolchain-6" ,gcc-toolchain-6)))
+(arguments
+ `(#:tests? #f
+   #:strip-binaries? #f
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+   (platform ,(system->rust-platform (%current-system)))
+   (ld-so (string-append (assoc-ref inputs "libc")
+ ,(glibc-dynamic-linker
+   (system* "bash" "install.sh"
+(string-append "--prefix=" out)
+"--components=cargo")
+   (zero? (system* "patchelf"
+   "--set-interpreter" ld-so
+   "--set-rpath"
+   (string-append
+out "/lib:"
+(assoc-ref inputs "gcc-lib") "/lib:"
+(assoc-ref inputs "gcc-toolchain-6") "/lib")
+  (string-append out "/bin/cargo")
+(home-page "https://www.rust-lang.org;)
+(synopsis "Cargo bootstrap")
+(description "This package prepares the cargo binary for bootstrapping
+the cargo package and it's dependencies.  When rustc is build using the new
+rustbuild build system it also requires cargo.  The gnu build system is going
+to be deprecated.")
+(license license:asl2.0)))
-- 
2.9.0



[PATCH 1/7] build-system: Add cargo build system.

2016-09-28 Thread David Craven
* guix/build-system/cargo.scm (default-cargo, default-rustc,
  %cargo-build-system-modules, cargo-build, lower, cargo-build-system):
  New variables.
* guix/build/cargo-build-system.scm (configure, build, check, install,
  %standard-phases, cargo-build): New variables.
---
 guix/build-system/cargo.scm   | 149 ++
 guix/build/cargo-build-system.scm |  81 +
 2 files changed, 230 insertions(+)
 create mode 100644 guix/build-system/cargo.scm
 create mode 100644 guix/build/cargo-build-system.scm

diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
new file mode 100644
index 000..84cb644
--- /dev/null
+++ b/guix/build-system/cargo.scm
@@ -0,0 +1,149 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès 
+;;; Copyright © 2013 Andreas Enge 
+;;; Copyright © 2013 Nikita Karetnikov 
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 .
+
+(define-module (guix build-system cargo)
+  #:use-module (guix search-paths)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix derivations)
+  #:use-module (guix packages)
+  #:use-module (guix build-system)
+  #:use-module (guix build-system gnu)
+  #:use-module (ice-9 match)
+  #:export (cargo-build-system
+crate-uri
+system->rust-platform))
+
+(define (crate-uri name version)
+  "Return a URI string for the crate package hosted at crates.io corresponding
+to NAME and VERSION."
+  (string-append "https://crates.io/api/v1/crates/; name "/" version 
"/download"))
+
+(define (system->rust-platform system)
+  (cond
+   ((string-prefix? "x86_64" system) "x86_64-unknown-linux-gnu")
+   ((string-prefix? "i686" system) "i686-unknown-linux-gnu")))
+
+(define (default-cargo)
+  "Return the default Cargo package."
+  ;; Lazily resolve the binding to avoid a circular dependency.
+  (let ((rust (resolve-interface '(gnu packages rust
+(module-ref rust 'cargo-bootstrap)))
+
+(define (default-rustc)
+  "Return the default Rustc package."
+  ;; Lazily resolve the binding to avoid a circular dependency.
+  (let ((rust (resolve-interface '(gnu packages rust
+(module-ref rust 'rustc-bootstrap)))
+
+(define %cargo-build-system-modules
+  ;; Build-side modules imported by default.
+  `((guix build cargo-build-system)
+,@%gnu-build-system-modules))
+
+(define* (cargo-build store name inputs
+  #:key
+  (tests? #t)
+  (test-target #f)
+  (configure-flags #f)
+  (phases '(@ (guix build cargo-build-system)
+  %standard-phases))
+  (outputs '("out"))
+  (search-paths '())
+  (system (%current-system))
+  (guile #f)
+  (imported-modules %cargo-build-system-modules)
+  (modules '((guix build cargo-build-system)
+ (guix build utils
+  "Build SOURCE using CARGO, and with INPUTS."
+
+  (define builder
+`(begin
+   (use-modules ,@modules)
+   (cargo-build #:name ,name
+#:source ,(match (assoc-ref inputs "source")
+(((? derivation? source))
+ (derivation->output-path source))
+((source)
+ source)
+(source
+ source))
+#:system ,system
+#:test-target ,test-target
+#:tests? ,tests?
+#:phases ,phases
+#:outputs %outputs
+#:search-paths ',(map search-path-specification->sexp
+  search-paths)
+#:inputs %build-inputs)))
+
+  (define guile-for-build
+(match guile
+  ((? package?)
+   (package-derivation store guile system #:graft? #f))
+  (#f ; the default
+   (let* ((distro (resolve-interface '(gnu packages commencement)))
+   

Re: Colors and progress indicators on buildprocesses

2016-09-28 Thread Troy Sankey
Quoting John Darrington (2016-09-28 10:05:52)
> On Wed, Sep 28, 2016 at 09:57:16AM +, ng0 wrote:
>  
>  The problem with colors is that the use of colors in build logs creates
>  very difficult to read logs if you don't filter them. 
> 
> This is true. But the build logs already dump some VT100 escape sequences,
> (for vertical  cursor movement).  And they also have to be filtered, so 
> if we say that colours are not permitted then we are not applying these
> rules consistently.

This is our chance make things right!  Determine if the terminal is
interactive [0] and filter escape codes if yes.

I've used Arch, and the coloring was pleasant, but primarily I enjoyed
the clear (and less buggy) progress bars.  For example:

$ guix pull

Starting download of /tmp/guix-file.O3WsYp
From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
 ….tar.gz   1.7MiB/s 00:06 | 10.5MiB 
transferred


The "From" line shows what is about to be downloaded, but the progress
par suggests that "….tar.gz" is being downloaded.  There is a lot of
whitespace after that, which is weird.

Also, here's a bug:

copying and compiling to 
'/gnu/store/himp5ds1b9m0932dfzxp3gg3vvs7lxd4-guix-latest'...
loading...   23.1% of 528 filesrandom seed for tests: 1475073161
loading...   99.8% of 528 files

Something happens during the loading phase, and the string "random seed
for tests: 1475073161" gets printed (also inserting a newline).  The
progress indicator cannot cope, so it starts on a new line.  Also, it
stops at 99.8% which is confusing.

These non-color issues are more important to resolve, IMO.

Troy

[0] http://www.tldp.org/LDP/abs/html/intandnonint.html


signature.asc
Description: signature


Go not setting $GOPATH by default

2016-09-28 Thread swedebugia

Hi

I have just installed go and it seems that it does not set a gopath by 
default.


This leads to errors when trying to use go get, e.g.:

sdb@unknown ~$ go get github.com/syncthing/syncthing
package github.com/syncthing/syncthing: cannot download, $GOPATH not 
set. For more details see: go help gopath


I propose that we set the gopath by default to "~/go" and create that 
directory by default, what do you think?


cheers
sdb



Re: gnu: Add xonsh

2016-09-28 Thread Stefan Reichör
Danny Milosavljevic  writes:

> On Tue, 27 Sep 2016 12:59:08 -0400
> Leo Famulari  wrote:
>
>> Should it block the package? Or perhaps we can push the patch as-is and
>> you can submit a follow-up to add the features you want?
>
> It's fine to use as-is, it just looks like a shell from 1973 :)
>
> LGTM.
>
> Also, I've tested Stefan's package and it works.

I think it should work in that configuration. I am just starting to use
it. For me it has the potential to be the shell for 2023 ;-)

Stefan.




Re: Colors and progress indicators on buildprocesses

2016-09-28 Thread John Darrington
On Wed, Sep 28, 2016 at 09:57:16AM +, ng0 wrote:
 
 The problem with colors is that the use of colors in build logs creates
 very difficult to read logs if you don't filter them. 

This is true. But the build logs already dump some VT100 escape sequences,
(for vertical  cursor movement).  And they also have to be filtered, so 
if we say that colours are not permitted then we are not applying these
rules consistently.


J'


-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


[PATCH 03/14] guix: Add lint-checker for packages which should be no inputs at all.

2016-09-28 Thread Hartmut Goebel
Also refactor the common code into a new function.

* guix/scripts/lint.scm (warn-if-package-has-input): New procedure.
  (check-inputs-should-be-native package): Use it; rename and clean-up
  variables. (check-inputs-should-not-be-an-input-at-all): New procedure.
  (%checkers) Add it.
* tests/lint.scm: ("inputs: python-setuptools should not be an input at all
  (input)", "inputs: python-setuptools should not be an input at all
  (native-input)" "inputs: python-setuptools should not be an input at all
  (propagated-input)"): Add tests.
---
 guix/scripts/lint.scm | 61 ---
 tests/lint.scm| 34 
 2 files changed, 77 insertions(+), 18 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index eac3214..ce9fee7 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès 
 ;;; Copyright © 2015, 2016 Mathieu Lirzin 
 ;;; Copyright © 2016 Danny Milosavljevic 
+;;; Copyright © 2016 Hartmut Goebel 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +60,7 @@
   #:export (guix-lint
 check-description-style
 check-inputs-should-be-native
+check-inputs-should-not-be-an-input-at-all
 check-patch-file-names
 check-synopsis-style
 check-derivation
@@ -213,34 +215,53 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
   (format #f (_ "invalid description: ~s") description)
   'description
 
+(define (warn-if-package-has-input linted inputs-to-check input-names message)
+  ;; Emit a warning MESSAGE if some of the inputs named in INPUT-NAMES are
+  ;; contained in INPUTS-TO-CHECK, which are assumed to be inputs of package
+  ;; LINTED.
+  (match inputs-to-check
+(((labels packages . outputs) ...)
+ (for-each (lambda (package output)
+ (when (package? package)
+   (let ((input (string-append
+ (package-name package)
+ (if (> (length output) 0)
+ (string-append ":" (car output))
+ ""
+ (when (member input input-names)
+   (emit-warning linted
+ (format #f (_ message) input)
+ 'inputs-to-check)
+   packages outputs
+
 (define (check-inputs-should-be-native package)
   ;; Emit a warning if some inputs of PACKAGE are likely to belong to its
   ;; native inputs.
-  (let ((linted package)
+  (let ((message "'~a' should probably be a native input")
 (inputs (package-inputs package))
-(native-inputs
+(input-names
   '("pkg-config"
 "extra-cmake-modules"
 "glib:bin"
 "intltool"
 "itstool"
 "qttools")))
-(match inputs
-  (((labels packages . outputs) ...)
-   (for-each (lambda (package output)
-   (when (package? package)
- (let ((input (string-append
-   (package-name package)
-   (if (> (length output) 0)
-   (string-append ":" (car output))
-   ""
-   (when (member input native-inputs)
- (emit-warning linted
-   (format #f (_ "'~a' should probably \
-be a native input")
-   input)
-   'inputs)
- packages outputs)
+(warn-if-package-has-input package inputs input-names message)))
+
+(define (check-inputs-should-not-be-an-input-at-all package)
+  ;; Emit a warning if some inputs of PACKAGE are likely to should not be
+  ;; an input at all.
+  (let ((message "'~a' should probably not be an input at all")
+(inputs (package-inputs package))
+(input-names
+  '("python-setuptools"
+"python2-setuptools")))
+(warn-if-package-has-input package (package-inputs package)
+   input-names message)
+(warn-if-package-has-input package (package-native-inputs package)
+   input-names message)
+(warn-if-package-has-input package (package-propagated-inputs package)
+   input-names message)))
 
 (define (package-name-regexp package)
   "Return a regexp that matches PACKAGE's name as a word at the beginning of a
@@ -810,6 +831,10 @@ them for PACKAGE."
  (description "Identify inputs that should be native inputs")
  (check   check-inputs-should-be-native))

[PATCH 01/14] gnu: ensure pip and setuptools are installed even for Python 2

2016-09-28 Thread Hartmut Goebel
* gnu/packages/python.scm (python-2.7): Add "--with-ensurepip=install"
  to configure-flags.
---
 gnu/packages/python.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 688a5d4..b13e41f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -156,6 +156,7 @@
#:configure-flags
(list "--enable-shared";allow embedding
  "--with-system-ffi"  ;build ctypes
+ "--with-ensurepip=install"   ;install pip and setuptools
  (string-append "LDFLAGS=-Wl,-rpath="
 (assoc-ref %outputs "out") "/lib"))
 
-- 
2.7.4




Re: [PATCH 00/14] Change python-build-system (fixes bug 20765)

2016-09-28 Thread Hartmut Goebel
Hi, minor correction:

Am 28.09.2016 um 15:58 schrieb Hartmut Goebel:
> This series implements what I proposed in
>   .
>
> A) For python2 include python2-setuptools as a native-input by default.
I implemented :
*
A1) Change the Python 2 build to bootstrap pip*

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/get-current-locale-with-ansible
Kolumne: http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [PATCH 1/2] gnu: Add perl-net-psyc.

2016-09-28 Thread ng0
Leo Famulari  writes:

> [ Unknown signature status ]
> On Wed, Sep 21, 2016 at 06:46:31PM +, ng0 wrote:
>> From 74a6c1e552a6ae8f438e91cbe318882401b440f8 Mon Sep 17 00:00:00 2001
>> From: ng0 
>> Date: Wed, 21 Sep 2016 18:08:42 +
>> Subject: [PATCH 1/2] gnu: Add psyclpc.
>> 
>> * gnu/packages/psyc.scm (psyclpc): New variable.
  
^--|
>> +(source (origin 
>>  |
>> +  (method url-fetch)
>>  |
>> +  (uri (list (string-append "http://www.psyced.org/files/;  
>>  |
>> +name "-" version ".tar.xz") 
>>  |
>> + (string-append 
>> "http://krosos.sdf.org/static/unix/; |
>> +"perlpsyc-" version ".zip")))   
>>  |
>> +  (sha256   
>> ^
>> +   (base32
>> +"0c2afcj8b2yr2vmy9sy0528iqs9sw01j6q35lvxicm42gs7vnik2"
>
> Do both of those URLs provide a file with the same hash?

So there was a classic copy and commit too early mistake Sorry
for the mix up. Mirror will be added back when we still haven't solved
the attacks now. Looks very stable now. I'm preparing new patches.

>> +(arguments
>> + `(#:tests? #f ; There are no tests/checks.
>> +   #:configure-flags (list
>> +  "--enable-use-tls=yes"
>> +  "--enable-use-mccp"
>
> The "Mud Client Compression Protocol"?
>
>> +  (string-append "--with-openssl="
>> + (assoc-ref %build-inputs 
>> "openssl"))
>> +  (string-append "--prefix="
>> + (assoc-ref %outputs "out"))
>> +  (string-append "--libdir=" ; "-DMUD_LIB="
>
> What does this commented text mean?
>
>> + (assoc-ref %outputs "out")
>> + "/opt/psyced/world")
>> +  (string-append "--bindir="
>> + (assoc-ref %outputs "out")
>> + "/opt/psyced/bin")
>> +  (string-append "--libexecdir=" ; "-DERQ_DIR="
>
> Same question here.
>
>> +(inputs
>> + `(("zlib" ,zlib)
>> +   ("openssl" ,openssl)))
>> +;; pcre is bundled to ensure the version is compatible. XXX: look into
>> +;; unbundling it. Upstream should update from pcre 4.5 to 8.38. For
>> +;; functionality reasons we can not unbundle it now.
>> +;; ("pcre" ,pcre)))
>
> That version of PCRE was released in 2003. We might want to add a
> warning to the package description...
>
> https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=pcre

-- 
  ng0



Re: Colors and progress indicators on buildprocesses

2016-09-28 Thread swedebugia

On 2016-09-28 11:57, ng0 wrote:

swedebu...@riseup.net writes:


Hi

I recently installed Parabola and have played around a bit with
compiling AUR-packages to be able to run the programs I want - 
packaged

or not.

Having build a lot on guixsd a while ago I noticed some differences in
the cli-overview that I would like to present.

Colorfication and arrows (=>) are used to clearly distinguish
pacaur/pacman-commands from the buildprocess output.

A nice thing I saw on some builds (build of qt during build of
telegram-desktop) was a per build process percentage indicator located
in the beginning of each line of build output like this:
[ 0% ] lorem ipsum
[ 10% ] lorem ipsum

In addition to these two above I have an idea as well:
Use the terminal-title wisely to show the progress of the whole
transaction and the current running build (e.g.: "Download complete.
Buildprogress 4/5: building qt"

What do you think?




The problem with colors is that the use of colors in build logs creates
very difficult to read logs if you don't filter them. I think this is
one of the reasons why we don't have colors.
I am not against it, I just think it will make helping people a little
harder when they provide such logs. On the other hand, if we manage to
filter the colors out in the build logs somehow, this is of no concern
to us.


I understand.

What I proposed was not to color the logs but the output of guix (to 
distinguish it from the rest) telling the user what it is going to 
do/doing.

The proposal for percentage did not include coloring.



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread David Craven
ng0: I'm having trouble following what you mean, I'm available on IRC
if you want to talk about this further :)



[PATCH 13/14] gnu: python-h5py: Remove needless "python2-variant" property.

2016-09-28 Thread Hartmut Goebel
* gnu/packages/python.scm (python-h5py): Remove "python2-variant"
  property. (python2-h5py): Don't call "strip-python2-variant".
---
 gnu/packages/python.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b30840a..b9fe1fc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -726,11 +726,10 @@ HDF5 library from Python.  The low-level interface is 
intended to be a
 complete wrapping of the HDF5 API, while the high-level component supports
 access to HDF5 files, datasets and groups using established Python and NumPy
 concepts.")
-(license license:bsd-3)
-(properties `((python2-variant . ,(delay python2-h5py))
+(license license:bsd-3)))
 
 (define-public python2-h5py
-  (package-with-python2 (strip-python2-variant python-h5py)))
+  (package-with-python2 python-h5py))
 
 (define-public python-lockfile
   (package
-- 
2.7.4




[PATCH 10/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 5b)

2016-09-28 Thread Hartmut Goebel
This are the cases where setuptools are used in an inherited package and
removing this input also removes the need for inheriting the package. This is
the case if adding setuptools in the inherited packge was the only change.

Change this to not inherit and remove the new needless call to
"strip-python2-variant (if applicable).

This patch contains the changes for python.scm.

* gnu/packages/python.scm: (python-lockfile, python-keyring,
  python-dateutil-2, python-parsedatetime, python-pandas,
  python-pyicu, python-pytest-cov, python-pytest-runner,
  python-pytest-xdist, python-cov-core, python-itsdangerous,
  python-numexpr, python-sqlalchemy-utils, python-alembic,
  python-beautifulsoup4, python-msgpack, python-ipaddress,
  python-atomicwrites, python-apipkg, python-execnet,
  python-pytest-cache, python-wtforms, python-mako, python-waitress,
  python-wsgiproxy2, python-pyquery, python-webtest,
  python-translitcodec, python-editor,
  python-sphinxcontrib-programoutput, python-psycopg2, python-vobject,
  python-flask, python-cookies, python-responses, python-future,
  python-ply, python-wcwidth, python-prompt-toolkit, python-jedi,
  python-requests-oauthlib, python-pyserial, python-nltk,
  python-pymongo, python-sh, python-schematics, python-publicsuffix,
  python-publicsuffix2, python-url, python-freezegun,
  python-cachecontrol, python-lit, python-pytest-pep8,
  python-pytest-flakes, python-glances, python-graphql-core,
  python-graphql-relay): Remove neesless input "python2-setuptools")
  don't inherit, don't call strip-python2-variant.
  (python-lockfile, python-keyring, python-dateutil-2,
  python-parsedatetime, python-pandas, python-pyicu,
  python-pytest-cov, python-pytest-runner, python-pytest-xdist,
  python-cov-core, python-itsdangerous, python-numexpr,
  python-sqlalchemy-utils, python-alembic, python-beautifulsoup4,
  python-msgpack, python-ipaddress, python-atomicwrites,
  python-apipkg, python-execnet, python-pytest-cache, python-wtforms,
  python-mako, python-waitress, python-wsgiproxy2, python-pyquery,
  python-webtest, python-translitcodec, python-editor,
  python-sphinxcontrib-programoutput, python-psycopg2, python-vobject,
  python-flask, python-cookies, python-responses, python-future,
  python-ply, python-wcwidth, python-prompt-toolkit, python-jedi,
  python-requests-oauthlib, python-pyserial, python-nltk,
  python-pymongo, python-sh, python-schematics, python-nltk,
  python-publicsuffix2, python-cachecontrol, python-lit,
  python-pytest-pep8, python-pytest-flakes, python-glances,
  python-graphql-core, python-graphql-relay): Remove "python2-variant"
  property.
---
 gnu/packages/python.scm | 508 +++-
 1 file changed, 111 insertions(+), 397 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f61b1b9..899573e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -753,15 +753,10 @@ concepts.")
 (description
  "The lockfile package exports a LockFile class which provides a simple
 API for locking files.")
-(license license:expat)
-(properties `((python2-variant . ,(delay python2-lockfile))
+(license license:expat)))
 
 (define-public python2-lockfile
-  (let ((base (package-with-python2 (strip-python2-variant python-lockfile
-(package
-  (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+  (package-with-python2 python-lockfile))
 
 (define-public python-mock
   (package
@@ -895,15 +890,10 @@ etc.).  The package is structured to make adding new 
modules easy.")
 service from python.  It can be used in any application that needs safe
 password storage.")
 ;; "MIT" and PSF dual license
-(license license:x11)
-(properties `((python2-variant . ,(delay python2-keyring))
+(license license:x11)))
 
 (define-public python2-keyring
-  (let ((base (package-with-python2 (strip-python2-variant python-keyring
-(package
-  (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+  (package-with-python2 python-keyring))
 
 (define-public python-six
   (package
@@ -949,15 +939,10 @@ Python file, so it can be easily copied into your 
project.")
 (description
  "The dateutil module provides powerful extensions to the standard
 datetime module, available in Python 2.3+.")
-(license license:bsd-3)
-(properties `((python2-variant . ,(delay python2-dateutil-2))
+(license license:bsd-3)))
 
 (define-public python2-dateutil-2
-  (let ((base (package-with-python2 (strip-python2-variant 
python-dateutil-2
-(package
-  (inherit base)
-  (inputs `(("python2-setuptools" ,python2-setuptools)
-,@(package-inputs base))
+  (package-with-python2 python-dateutil-2))
 
 (define-public python-dateutil
   (package
@@ -1002,15 +987,10 

[PATCH 11/14] gnu: Remove needless inputs python-pip and python2-pip.

2016-09-28 Thread Hartmut Goebel
This is installed together with Python 3 anyway and for our build
of Python 2.

* gnu/packages/python.scm (python-fixtures): remove input "python-pip".
* gnu/packages/pdf.scm (python2-reportlab): remove native-input
  "python2-pip". (python-reportlab): remove now needless property
  "python2-variant".
---
 gnu/packages/pdf.scm| 8 ++--
 gnu/packages/python.scm | 3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 61fe84e..614816f 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -634,14 +634,10 @@ using a stylus.")
 (description "This is the ReportLab PDF Toolkit.  It allows rapid creation
 of rich PDF documents, and also creation of charts in a variety of bitmap and
 vector formats.")
-(license license:bsd-3)
-(properties `((python2-variant . ,(delay python2-reportlab))
+(license license:bsd-3)))
 
 (define-public python2-reportlab
-  (package
-(inherit (package-with-python2
-  (strip-python2-variant python-reportlab)))
-(native-inputs `(("python2-pip" ,python2-pip)
+  (package-with-python2 python-reportlab))
 
 (define-public impressive
   (package
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 899573e..b30840a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1970,8 +1970,7 @@ and sensible default behaviors into your setuptools run.")
  `(("python-six" ,python-six)
("python-pbr-0.11" ,python-pbr-0.11)))
 (inputs
- `(("python-pip" ,python-pip)
-   ;; Tests
+ `(;; Tests
("python-testtools" ,python-testtools)))
 (arguments
  '(#:tests? #f)) ; no setup.py test command
-- 
2.7.4




[PATCH 14/14] gnu: Remove work-arounds for bug 20765 (ensure uncompressed eggs)

2016-09-28 Thread Hartmut Goebel
Bug 20765 is solved since we build all Python packages using
option "--single-version-externally-managed".

* gnu/packages/bioinformatics.scm (pbtranscript-tofu): Remove
  configure-flags. (pepr): remove phase "disable-egg-generation".
* gnu/packages/pdf.scm (reportlab): Remove configure-flags.
* gnu/packages/python.scm (python-sphinx-rtd-theme, python2-elib.intl,
  python-pkgconfig, python-pytest-pep8, python-pytest-flakes): Remove
  configure-flags. (python-pillow) remove phase
  "disable-egg-generation". (python-libarchive-c) Remove patching
  setup.cfg.
* gnu/packages/statistics.scm (python-patsy): remove phase
  "prevent-generation-of-egg-archive".
* gnu/packages/tls.scm (python-acme): remove phase
  "disable-egg-compression".
* gnu/packages/tor.scm (onionshare): Remove configure-flags.
---
 gnu/packages/bioinformatics.scm | 19 +
 gnu/packages/pdf.scm|  5 -
 gnu/packages/python.scm | 47 -
 gnu/packages/statistics.scm |  8 +--
 gnu/packages/tls.scm|  9 
 gnu/packages/tor.scm|  6 +-
 6 files changed, 7 insertions(+), 87 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f4ac802..fce6a07 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3429,11 +3429,6 @@ the phenotype as it models the data.")
   (build-system python-build-system)
   (arguments
`(#:python ,python-2
- ;; With standard flags, the install phase attempts to create a zip'd
- ;; egg file, and fails with an error: 'ZIP does not support timestamps
- ;; before 1980'
- #:configure-flags '("--single-version-externally-managed"
- "--record=pbtranscript-tofu.txt")
  #:phases
  (modify-phases %standard-phases
(add-after 'unpack 'enter-directory
@@ -7114,19 +7109,7 @@ may optionally be provided to further inform the 
peak-calling process.")
 (build-system python-build-system)
 (arguments
  `(#:python ,python-2 ; python2 only
-   #:tests? #f ; no tests included
-   #:phases
-   (modify-phases %standard-phases
- ;; When setuptools is used a ".egg" archive is generated and
- ;; installed.  This makes it hard to actually run PePr.  This issue
- ;; has been reported upstream:
- ;; https://github.com/shawnzhangyx/PePr/issues/9
- (add-after 'unpack 'disable-egg-generation
-   (lambda _
- (substitute* "setup.py"
-   (("from setuptools import setup")
-"from distutils.core import setup"))
- #t)
+   #:tests? #f)) ; no tests included
 (propagated-inputs
  `(("python2-numpy" ,python2-numpy)
("python2-scipy" ,python2-scipy)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 614816f..c8a6e05 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -622,11 +622,6 @@ using a stylus.")
(base32
 "0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"
 (build-system python-build-system)
-(arguments
- ;; Prevent creation of the egg. Without this flag, various artifacts
- ;; from the build inputs end up in the final python3 output. It also
- ;; works around https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
- `(#:configure-flags '("--single-version-externally-managed" "--root=/")))
 (propagated-inputs
  `(("python-pillow" ,python-pillow)))
 (home-page "http://www.reportlab.com;)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b9fe1fc..2540acb 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2697,12 +2697,6 @@ sources.")
 (base32
  "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"
 (build-system python-build-system)
-(arguments
- `(;; With standard flags, the install phase attempts to create a zip'd
-   ;; egg file, and fails with an error: 'ZIP does not support timestamps
-   ;; before 1980'
-   #:configure-flags '("--single-version-externally-managed"
-   "--record=sphinx-rtd-theme.txt")))
 (inputs
  `(("python-docutils" ,python-docutils)
("python-sphinx" ,python-sphinx)))
@@ -3709,12 +3703,7 @@ Python's distutils.")
 (arguments
  ;; incompatible with Python 3 (exception syntax)
  `(#:python ,python-2
-   #:tests? #f
-   ;; With standard flags, the install phase attempts to create a zip'd
-   ;; egg file, and fails with an error: 'ZIP does not support timestamps
-   ;; before 1980'
-   #:configure-flags '("--single-version-externally-managed"
-   "--record=elib.txt")))
+   #:tests? #f))
 (home-page "https://github.com/dieterv/elib.intl;)
 (synopsis "Enhanced internationalization for Python")
 (description
@@ -3747,17 +3736,6 @@ 

[PATCH 09/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 5a)

2016-09-28 Thread Hartmut Goebel
This are the cases where setuptools are used in an inherited package and
removing this input also removes the need for inheriting the package. This is
the case if adding setuptools in the inherited packge was the only change.

Change this to not inherit and remove the new needless call to
"strip-python2-variant (if applicable).

This patch contains the changes for all modules beside python.scm.
---
 gnu/packages/bioinformatics.scm | 44 -
 gnu/packages/django.scm | 16 ++-
 gnu/packages/gnupg.scm  |  7 +--
 gnu/packages/mpd.scm|  9 ++---
 gnu/packages/music.scm  | 17 
 gnu/packages/openstack.scm  | 16 +++
 gnu/packages/password-utils.scm |  6 +-
 gnu/packages/protobuf.scm   |  7 ++-
 gnu/packages/statistics.scm |  9 ++---
 9 files changed, 25 insertions(+), 106 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 2526ccc..f4ac802 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -616,15 +616,10 @@ bioinformatics programs; a standard sequence class and 
tools for performing
 common operations on them; code to perform data classification; code for
 dealing with alignments; code making it easy to split up parallelizable tasks
 into separate processes; and more.")
-(license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE;))
-(properties `((python2-variant . ,(delay python2-biopython))
+(license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE;
 
 (define-public python2-biopython
-  (let ((base (package-with-python2 (strip-python2-variant python-biopython
-(package
-  (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+  (package-with-python2 python-biopython))
 
 ;; An outdated version of biopython is required for seqmagick, see
 ;; https://github.com/fhcrc/seqmagick/issues/59
@@ -1328,7 +1323,6 @@ also includes an interface for tabix.")
   (sha256
(base32
 "0y408fp6psqzwxpcpqn0wp7fr41dwz8d54wpj6j261fj5q8vs169"
-(properties `((python2-variant . ,(delay python2-twobitreader
 (build-system python-build-system)
 (native-inputs
  `(("python-sphinx" ,python-sphinx)))
@@ -1340,11 +1334,7 @@ UCSC genome browser.")
 (license license:artistic2.0)))
 
 (define-public python2-twobitreader
-  (let ((base (package-with-python2 (strip-python2-variant 
python-twobitreader
-(package
-  (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+  (package-with-python2 python-twobitreader))
 
 (define-public python-plastid
   (package
@@ -1356,7 +1346,6 @@ UCSC genome browser.")
   (sha256
(base32
 "1nhxw8a5gn9as58i2ih52c5cjwj48ik418pzsjwph3s66mmy9yvq"
-(properties `((python2-variant . ,(delay python2-plastid
 (build-system python-build-system)
 (arguments
  ;; Some test files are not included.
@@ -1380,12 +1369,7 @@ high-throughput sequencing data – with an emphasis on 
simplicity.")
 (license license:bsd-3)))
 
 (define-public python2-plastid
-  (let ((base (package-with-python2 (strip-python2-variant python-plastid
-(package
-  (inherit base)
-  ;; setuptools is required at runtime
-  (propagated-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-propagated-inputs base))
+  (package-with-python2 python-plastid))
 
 (define-public cd-hit
   (package
@@ -1834,10 +1818,7 @@ accessing bigWig files.")
 (license license:expat)))
 
 (define-public python2-pybigwig
-  (let ((pybigwig (package-with-python2 python-pybigwig)))
-(package (inherit pybigwig)
-  (native-inputs
-   `(("python-setuptools" ,python2-setuptools))
+  (package-with-python2 python-pybigwig))
 
 (define-public python-dendropy
   (package
@@ -1862,15 +1843,10 @@ accessing bigWig files.")
  "DendroPy is a library for phylogenetics and phylogenetic computing: 
reading,
 writing, simulation, processing and manipulation of phylogenetic
 trees (phylogenies) and characters.")
-(license license:bsd-3)
-(properties `((python2-variant . ,(delay python2-dendropy))
+(license license:bsd-3)))
 
 (define-public python2-dendropy
-  (let ((base (package-with-python2 (strip-python2-variant python-dendropy
-(package
-  (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+  (package-with-python2 python-dendropy))
 
 
 (define-public deeptools
@@ -4439,11 +4415,7 @@ sequence itself can be retrieved from these databases.")
 (license license:bsd-3)))
 
 (define-public 

[PATCH 08/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 4)

2016-09-28 Thread Hartmut Goebel
This are the cases where setuptools are used in an inherited package and
removing this input keeps the need for inheriting the package.

* gnu/packages/bioinformatics.scm
* gnu/packages/python.scm
* gnu/packages/statistics.scm
---
 gnu/packages/bioinformatics.scm |  4 +---
 gnu/packages/python.scm | 51 +++--
 gnu/packages/statistics.scm |  5 +---
 3 files changed, 15 insertions(+), 45 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 611cbb6..2526ccc 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -524,9 +524,7 @@ e.g. microbiome samples, genomes, metagenomes.")
(substitute* "setup.py"
  (("install_requires.append\\(\"pyqi\"\\)") "pass"))
#t)))
- ,@(package-arguments base)))
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+ ,@(package-arguments base))
 
 (define-public bioperl-minimal
   (let* ((inputs `(("perl-module-build" ,perl-module-build)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a1cb188..f61b1b9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1716,9 +1716,6 @@ same arguments.")
   (let ((base (package-with-python2
 (strip-python2-variant python-pytest-mock
 (package (inherit base)
-  (native-inputs
-   `(("python2-setuptools" ,python2-setuptools)
- ,@(package-native-inputs base)))
   (inputs
`(("python2-mock" ,python2-mock)
  ,@(package-inputs base))
@@ -2476,8 +2473,7 @@ OAuth request-signing logic.")
   (let ((base (package-with-python2 (strip-python2-variant python-oauthlib
 (package
   (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ("python2-unittest2" ,python2-unittest2)
+  (native-inputs `(("python2-unittest2" ,python2-unittest2)
,@(package-native-inputs base))
 
 (define-public python-itsdangerous
@@ -4843,9 +4839,7 @@ and statistical routines from scipy and statsmodels.")
 (package
   (inherit base)
   (propagated-inputs `(("python2-pytz" ,python2-pytz)
-   ,@(package-propagated-inputs base)))
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs base))
+   ,@(package-propagated-inputs base))
 
 (define-public python-sympy
   (package
@@ -4987,10 +4981,7 @@ connection to each user.")
`(("python2-backport-ssl-match-hostname"
   ,python2-backport-ssl-match-hostname)
  ("python2-singledispatch" ,python2-singledispatch)
-  ,@(package-inputs tornado)))
-  (native-inputs
-   `(("python2-setuptools" ,python2-setuptools)
- ,@(package-native-inputs tornado))
+  ,@(package-inputs tornado))
 
 ;; the python- version can be removed with python-3.5
 (define-public python-backports-abc
@@ -5381,10 +5372,7 @@ term.js Javascript terminal emulator library.")
   (propagated-inputs
`(("python2-backport-ssl-match-hostname"
   ,python2-backport-ssl-match-hostname)
-  ,@(package-propagated-inputs terminado)))
-  (native-inputs
-   `(("python2-setuptools" ,python2-setuptools)
- ,@(package-native-inputs terminado))
+  ,@(package-propagated-inputs terminado))
 
 (define-public python-fonttools
   (package
@@ -7325,8 +7313,7 @@ authenticated session objects providing things like 
keep-alive.")
   (let ((base (package-with-python2 (strip-python2-variant python-rauth
 (package
   (inherit base)
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ("python2-unittest2" ,python2-unittest2)
+  (native-inputs `(("python2-unittest2" ,python2-unittest2)
,@(package-native-inputs base))
 
 (define-public python2-functools32
@@ -8057,8 +8044,7 @@ and provides a uniform API regardless of which JSON 
implementation is used.")
   (arguments `(;; Unlike the python 3 variant, we do run tests.  See above!
#:tests? #t
,@(package-arguments anyjson)))
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ("python2-nose" ,python2-nose))
+  (native-inputs `(("python2-nose" ,python2-nose))
 
 (define-public python-amqp
   (package
@@ -8094,9 +8080,7 @@ alternative when librabbitmq is not available.")
;; unmaintained.  Weirdly, does not do this on the python 3
;; version?
#:tests? #f
-   ,@(package-arguments amqp)))
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)
-   ,@(package-native-inputs amqp))
+   

[PATCH 06/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 2)

2016-09-28 Thread Hartmut Goebel
This are the simple changes (only lines removed) in all modules beside
python.scm.

* gnu/packages/admin.scm
* gnu/packages/backup.scm
* gnu/packages/bioinformatics.scm
* gnu/packages/django.scm
* gnu/packages/docker.scm
* gnu/packages/game-development.scm
* gnu/packages/key-mon.scm
* gnu/packages/mail.scm
* gnu/packages/music.scm
* gnu/packages/openstack.scm
* gnu/packages/tls.scm
---
 gnu/packages/admin.scm|  4 
 gnu/packages/backup.scm   |  2 --
 gnu/packages/bioinformatics.scm   |  8 
 gnu/packages/django.scm   |  6 --
 gnu/packages/docker.scm   |  2 --
 gnu/packages/game-development.scm |  2 --
 gnu/packages/key-mon.scm  |  2 --
 gnu/packages/mail.scm |  2 --
 gnu/packages/music.scm|  1 -
 gnu/packages/openstack.scm| 12 
 gnu/packages/tls.scm  |  1 -
 11 files changed, 42 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index c0eed7b..443f895 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1323,8 +1323,6 @@ specified directories.")
 (("/usr") out)
 (("distro_ver = .*") "distro_ver = ''"))
   #t))
-   (inputs
-`(("python-setuptools" ,python2-setuptools)))
(home-page "https://github.com/shawn-sterling/graphios;)
(synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
(description
@@ -1684,8 +1682,6 @@ throughput (in the same interval).")
(base32
 "04q2cn8c83f6z6wn1scla1ilrpi5ssjc64987hvmwfvwvb82bvkp"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (inputs
  `(("python-colorama" ,python-colorama)
("python-decorator" ,python-decorator)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index e77c4f2..ac341d3 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -334,8 +334,6 @@ errors.")
 (base32
  "1nwmmh816f96h0ff1jxk95ad38ilbhbdl5dgibx1d4cl81dsi48d"
 (build-system python-build-system)
-(native-inputs
- `(("python2-setuptools" ,python2-setuptools)))
 (inputs
  `(("python" ,python-2)
("librsync" ,librsync)))
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1f11052..445c161 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2691,8 +2691,6 @@ HMMs).")
  `(("python-numpy" ,python2-numpy)))
 (inputs
  `(("python-pysam" ,python2-pysam)))
-(native-inputs
- `(("python-setuptools" ,python2-setuptools)))
 (home-page "http://www-huber.embl.de/users/anders/HTSeq/;)
 (synopsis "Analysing high-throughput sequencing data with Python")
 (description
@@ -2971,8 +2969,6 @@ data.")
#:tests? #f)) ; no test target
 (inputs
  `(("python-numpy" ,python2-numpy)))
-(native-inputs
- `(("python-setuptools" ,python2-setuptools)))
 (home-page "http://github.com/taoliu/MACS/;)
 (synopsis "Model based analysis for ChIP-Seq data")
 (description
@@ -3393,7 +3389,6 @@ interrupted by stop codons.  OrfM finds and prints these 
ORFs.")
 (native-inputs
  `(("python-docutils" ,python2-docutils)
("python-nose" ,python2-nose)
-   ("python-setuptools" ,python2-setuptools)
("python-sphinx" ,python2-sphinx)))
 (home-page "http://pacificbiosciences.github.io/pbcore/;)
 (synopsis "Library for reading and writing PacBio data files")
@@ -3898,7 +3893,6 @@ BAM and Wiggle files in both transcript-coordinate and 
genomic-coordinate.")
  `(("python-cython" ,python2-cython)
("python-pysam" ,python2-pysam)
("python-numpy" ,python2-numpy)
-   ("python-setuptools" ,python2-setuptools)
("zlib" ,zlib)))
 (native-inputs
  `(("python-nose" ,python2-nose)))
@@ -7238,8 +7232,6 @@ replacement for strverscmp.")
("python-click" ,python-click)
("python-matplotlib" ,python-matplotlib)
("python-numpy" ,python-numpy)))
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (home-page "http://multiqc.info;)
 (synopsis "Aggregate bioinformatics analysis reports")
 (description
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 8d4a7e4..90baccd 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -55,10 +55,6 @@
  (string-append ".:" (getenv "PYTHONPATH")))
  (zero? (system* "python" "tests/runtests.py")))
 ;; TODO: Install extras/django_bash_completion.
-(propagated-inputs
- ;; Django uses 'pkg_resources' (part of setuptools) to locate templates
- ;; at run-time.
- `(("python-setuptools" ,python-setuptools)))
 (native-inputs
  `(("tzdata", tzdata)
;; bcrypt and argon2-cffi are extra requirements not yet in guix
@@ -113,8 +109,6 @@ to the @dfn{don't repeat yourself} (DRY) 

[PATCH 12/14] lint: 'check-inputs-should-not-be-an-input-at-all' checks for python-pip

2016-09-28 Thread Hartmut Goebel
... and python2-pip.

* guix/scripts/lint.scm (check-inputs-should-not-be-an-input-at-all):
  Add python-pip and python2-pip to the list of packages to be warned
  about.
---
 guix/scripts/lint.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index ce9fee7..af38a3e 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -255,7 +255,9 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
 (inputs (package-inputs package))
 (input-names
   '("python-setuptools"
-"python2-setuptools")))
+"python2-setuptools"
+"python-pip"
+"python2-pip")))
 (warn-if-package-has-input package (package-inputs package)
input-names message)
 (warn-if-package-has-input package (package-native-inputs package)
-- 
2.7.4




[PATCH 07/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 3)

2016-09-28 Thread Hartmut Goebel
These are the easy changes, where python-setuptools resp. python2-setuptools
is removed, and some code-lines beside have been affected.

* gnu/packages/admin.scm
* gnu/packages/backup.scm
* gnu/packages/bioinformatics.scm
* gnu/packages/docbook.scm
* gnu/packages/freedesktop.scm
* gnu/packages/lirc.scm
* gnu/packages/mp3.scm
* gnu/packages/nutrition.scm
* gnu/packages/openstack.scm
* gnu/packages/password-utils.scm
* gnu/packages/python.scm
* gnu/packages/rdf.scm
* gnu/packages/terminals.scm
* gnu/packages/version-control.scm
* gnu/packages/xdisorg.scm
---
 gnu/packages/admin.scm   |   3 +-
 gnu/packages/backup.scm  |   3 +-
 gnu/packages/bioinformatics.scm  |  48 +++--
 gnu/packages/docbook.scm |   3 +-
 gnu/packages/freedesktop.scm |   3 +-
 gnu/packages/lirc.scm|   3 +-
 gnu/packages/mp3.scm |   3 +-
 gnu/packages/nutrition.scm   |   6 +-
 gnu/packages/openstack.scm   |  18 ++--
 gnu/packages/password-utils.scm  |   3 +-
 gnu/packages/python.scm  | 227 +--
 gnu/packages/rdf.scm |   3 +-
 gnu/packages/terminals.scm   |   3 +-
 gnu/packages/version-control.scm |   3 +-
 gnu/packages/xdisorg.scm |   3 +-
 15 files changed, 111 insertions(+), 221 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 443f895..1a50036 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1345,8 +1345,7 @@ of supported upstream metrics systems simultaneously.")
  "1bfc2xiplpad6f2nwi48y0kps7xqnsll85dlz63cy8k5bysl6d20"
 (build-system python-build-system)
 (native-inputs
- `(("python2-setuptools" ,python2-setuptools)
-   ("python2-pycrypto" ,python2-pycrypto)
+ `(("python2-pycrypto" ,python2-pycrypto)
("python2-httplib2" ,python2-httplib2)
("python2-passlib" ,python2-passlib)
("python2-nose" ,python2-nose)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index ac341d3..7c7273e 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -66,8 +66,7 @@
"duplicity-test_selection-tmp.patch"
 (build-system python-build-system)
 (native-inputs
- `(("python2-setuptools" ,python2-setuptools)
-   ("util-linux" ,util-linux))) ;setsid command, for the tests
+ `(("util-linux" ,util-linux))) ;setsid command, for the tests
 (inputs
  `(("python" ,python-2)
("librsync" ,librsync)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 445c161..611cbb6 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -213,8 +213,7 @@ structure of the predicted RNA.")
("libtool" ,libtool)
("zlib" ,zlib)
("python-nose" ,python2-nose)
-   ("python-pysam" ,python2-pysam)
-   ("python-setuptools" ,python2-setuptools)))
+   ("python-pysam" ,python2-pysam)))
 (inputs
  `(("htslib" ,htslib)
("samtools" ,samtools)
@@ -470,8 +469,7 @@ intended to behave exactly the same as the original BWK 
awk.")
("samtools" ,samtools)))
 (native-inputs
  `(("python-pyyaml" ,python2-pyyaml)
-   ("python-nose" ,python2-nose)
-   ("python-setuptools" ,python2-setuptools)))
+   ("python-nose" ,python2-nose)))
 (home-page "https://pythonhosted.org/pybedtools/;)
 (synopsis "Python wrapper for BEDtools programs")
 (description
@@ -1278,8 +1276,7 @@ well as many of the command line options.")
  `(("python-numpy" ,python2-numpy)
("zlib" ,zlib)))
 (native-inputs
- `(("python-nose" ,python2-nose)
-   ("python-setuptools" ,python2-setuptools)))
+ `(("python-nose" ,python2-nose)))
 (home-page "http://bitbucket.org/james_taylor/bx-python/;)
 (synopsis "Tools for manipulating biological data")
 (description
@@ -1311,8 +1308,7 @@ multiple sequence alignments.")
  `(("ncurses"   ,ncurses)
("zlib"  ,zlib)))
 (native-inputs
- `(("python-cython" ,python-cython)
-   ("python-setuptools" ,python-setuptools)))
+ `(("python-cython" ,python-cython)))
 (home-page "https://github.com/pysam-developers/pysam;)
 (synopsis "Python bindings to the SAMtools C API")
 (description
@@ -1478,9 +1474,8 @@ databases.")
("python-numpy" ,python2-numpy)
("python-scipy" ,python2-scipy)))
 (native-inputs
- `(("python-mock" ,python2-mock) ; for tests
-   ("python-pytz" ,python2-pytz) ; for tests
-   ("python-setuptools" ,python2-setuptools)))
+ `(("python-mock" ,python2-mock)   ; for tests
+   ("python-pytz" ,python2-pytz))) ; for tests
 (home-page "https://github.com/YeoLab/clipper;)
 (synopsis "CLIP peak enrichment recognition")
 (description
@@ -1653,8 +1648,7 @@ time.")
("zlib" ,zlib)))
 (native-inputs
  `(("python-cython" ,python2-cython)
-   ("python-nose" 

[PATCH 00/14] Change python-build-system (fixes bug 20765)

2016-09-28 Thread Hartmut Goebel
Hi,

this is a patch-series fixing bug 20765.

Bug 20765 is about problems caused by python packages being installed as
"zipped eggs" (basically these are zip-files).

This series implements what I proposed in
  .

A) For python2 include python2-setuptools as a native-input by default.

B) Install Python packages using --single-version-externally-managed

C) Strip python-setuptools and python2-setuptools from all native-inputs
   defined in packages.

Since the first of these changes already make *all* Python packages to be
rebuild, i took the chance to complete points B) and C), too. Step C) is split
into several patches to ease review. I'll happily merge them if requested.
Furhter I did not complete the commit message for these patches. Please
instruct me how these should be written. IMHO there is less use for listing
every singel change liek I did in part 5b.

TODO: by somebody more skilled than me: Take the change and

 * integrate strip-python2-variant into package-with-python2.

 * update Python to 2.7.12 and 3.4.5.


Hartmut Goebel (14):
  gnu: ensure pip and setuptools are installed even for Python 2
  guix: build all Python packages with
--single-version-externally-managed.
  guix: Add lint-checker for packages which should be no inputs at all.
  gnu: python-setuptools: remove pre-built binaries.
  gnu: Remove python-setuptools and python2-setuptools from inputs (part
1)
  gnu: Remove python-setuptools and python2-setuptools from inputs (part
2)
  gnu: Remove python-setuptools and python2-setuptools from inputs (part
3)
  gnu: Remove python-setuptools and python2-setuptools from inputs (part
4)
  gnu: Remove python-setuptools and python2-setuptools from inputs (part
5a)
  gnu: Remove python-setuptools and python2-setuptools from inputs (part
5b)
  gnu: Remove needless inputs python-pip and python2-pip.
  lint: 'check-inputs-should-not-be-an-input-at-all' checks for
python-pip
  gnu: python-h5py: Remove needless "python2-variant" property.
  gnu: Remove work-arounds for bug 20765 (ensure uncompressed eggs)

 gnu/packages/admin.scm |7 +-
 gnu/packages/backup.scm|5 +-
 gnu/packages/bioinformatics.scm|  123 +
 gnu/packages/django.scm|   22 +-
 gnu/packages/docbook.scm   |3 +-
 gnu/packages/docker.scm|2 -
 gnu/packages/freedesktop.scm   |3 +-
 gnu/packages/game-development.scm  |2 -
 gnu/packages/gnupg.scm |7 +-
 gnu/packages/key-mon.scm   |2 -
 gnu/packages/lirc.scm  |3 +-
 gnu/packages/mail.scm  |2 -
 gnu/packages/mp3.scm   |3 +-
 gnu/packages/mpd.scm   |9 +-
 gnu/packages/music.scm |   18 +-
 gnu/packages/nutrition.scm |6 +-
 gnu/packages/openstack.scm |   46 +-
 gnu/packages/password-utils.scm|9 +-
 gnu/packages/pdf.scm   |   13 +-
 gnu/packages/protobuf.scm  |7 +-
 gnu/packages/python.scm| 1072 
 gnu/packages/rdf.scm   |3 +-
 gnu/packages/statistics.scm|   22 +-
 gnu/packages/terminals.scm |3 +-
 gnu/packages/tls.scm   |   10 -
 gnu/packages/tor.scm   |6 +-
 gnu/packages/version-control.scm   |3 +-
 gnu/packages/xdisorg.scm   |3 +-
 guix/build/python-build-system.scm |   17 +-
 guix/scripts/lint.scm  |   63 ++-
 tests/lint.scm |   34 ++
 31 files changed, 366 insertions(+), 1162 deletions(-)

-- 
2.7.4




[PATCH 05/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 1)

2016-09-28 Thread Hartmut Goebel
* gnu/packages/pythin.scm
---
 gnu/packages/python.scm | 223 +---
 1 file changed, 2 insertions(+), 221 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d72bb70..242036f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -408,8 +408,6 @@ instead of @command{python3}.")))
 (base32
  "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (home-page "https://www.github.com/giampaolo/psutil;)
 (synopsis "Library for retrieving information on running processes")
 (description
@@ -478,8 +476,6 @@ to providing full-strength password hashing for multi-user 
application.")
 (base32
  "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (home-page "https://code.google.com/p/py-bcrypt;)
 (synopsis
  "Bcrypt password hashing and key derivation")
@@ -513,8 +509,6 @@ John the Ripper).")
 (base32
  "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (propagated-inputs
  `(("python-pycrypto" ,python-pycrypto)))
 (inputs
@@ -543,8 +537,6 @@ Python interface around SSH networking concepts.")
 (base32
  "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (home-page "https://github.com/jcgregorio/httplib2;)
 (synopsis "Comprehensive HTTP client library")
 (description
@@ -570,8 +562,6 @@ other HTTP libraries.")
 (base32
  "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (inputs
  `(("openssl" ,openssl)))
 (home-page
@@ -601,8 +591,6 @@ making them easy to handle and incorporate into other 
protocols.")
 (base32
  "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (inputs
  `(("python-pyyaml" ,python-pyyaml)
("python-six" ,python-six)))
@@ -687,8 +675,6 @@ etc. ")
 (arguments
  `(#:python ,python-2
#:tests? #f)) ; no test target
-(inputs
- `(("python2-setuptools" ,python2-setuptools)))
 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname;)
 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
 (description
@@ -858,8 +844,6 @@ Python 3 support.")
(base32
 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"
 (build-system python-build-system)
-(native-inputs
- `(("python-setuptools" ,python-setuptools)))
 (inputs
  `(("python" ,python)
("gmp" ,gmp)))
@@ -935,8 +919,6 @@ password storage.")
(base32
 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"
 (build-system python-build-system)
-(inputs
- `(("python-setuptools" ,python-setuptools)))
 (home-page "http://pypi.python.org/pypi/six/;)
 (synopsis "Python 2 and 3 compatibility utilities")
 (description
@@ -992,8 +974,6 @@ datetime module, available in Python 2.3+.")
(base32
 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"
 (build-system python-build-system)
-(inputs
- `(("python-setuptools" ,python-setuptools)))
 (home-page "http://labix.org/python-dateutil;)
 (synopsis "Extensions to the standard datetime module")
 (description
@@ -1134,8 +1114,6 @@ Database API 2.0T.")
(base32
 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"
 (build-system python-build-system)
-(inputs
- `(("python2-setuptools" ,python2-setuptools)))
 (arguments
  `(#:python ,python-2 ; apparently incompatible with Python 3
#:tests? #f))
@@ -1447,8 +1425,6 @@ software.")
 (base32
  "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"
 (build-system python-build-system)
-(inputs
- `(("python-setuptools" ,python-setuptools)))
 (arguments
  ;; error in setup.cfg: command 'test' has no such option 'buffer'
  '(#:tests? #f))
@@ -1475,8 +1451,6 @@ software.")
 (base32
  "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"
 (build-system python-build-system)
-(inputs
- `(("python-setuptools" ,python-setuptools)))
 (arguments
  '(#:tests? #f)) ; no setup.py test command
 (home-page
@@ -1502,8 +1476,6 @@ matching them against a list of media-ranges.")
   (base32
 

[PATCH 02/14] guix: build all Python packages with --single-version-externally-managed.

2016-09-28 Thread Hartmut Goebel
This requires setuptools to be installed together with python, which is
the case for Python 3 anyway and which we do for our build of Python 2
(see last commit).

* guix/build/python-build-system.scm (install): Add
  "--single-version-externally-managed" and "--root=/" to params to be
  passed to call-setuppy. Remove thus needless manipulation of
  PYTHONPATH.
---
 guix/build/python-build-system.scm | 17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/guix/build/python-build-system.scm 
b/guix/build/python-build-system.scm
index 9109fb4..8d4d6d3 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Andreas Enge 
 ;;; Copyright © 2013 Nikita Karetnikov 
 ;;; Copyright © 2015 Mark H Weaver 
+;;; Copyright © 2016 Hartmut Goebel 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,19 +66,9 @@
   "Install a given Python package."
   (let* ((out (assoc-ref outputs "out"))
  (params (append (list (string-append "--prefix=" out))
- configure-flags))
- (python-version (get-python-version (assoc-ref inputs "python")))
- (old-path (getenv "PYTHONPATH"))
- (add-path (string-append out "/lib/python" python-version
-  "/site-packages/")))
-;; create the module installation directory and add it to PYTHONPATH
-;; to make setuptools happy
-(mkdir-p add-path)
-(setenv "PYTHONPATH"
-(string-append (if old-path
-   (string-append old-path ":")
-   "")
-   add-path))
+ "--single-version-externally-managed"
+ "--root=/"
+ configure-flags)))
 (call-setuppy "install" params)))
 
 (define* (wrap #:key inputs outputs #:allow-other-keys)
-- 
2.7.4




Re: The question of warning about antifeatures

2016-09-28 Thread John Darrington
On Wed, Sep 28, 2016 at 11:17:26AM +0200, swedebu...@riseup.net wrote:
 Hi!
 
 I see that F-Droid warns clearly about packages with certain antifeatures
 (https://f-droid.org/wiki/page/Antifeatures).
 
 One example is: https://f-droid.org/wiki/page/Antifeature:NonFreeNet
 
 One example of a very popular package (>100x10^6 users) is: telegram
 messenger (https://f-droid.org/wiki/page/org.telegram.messenger)
 
 I was wondering if it would be fruitful to include something similar in
 guix?
 
 What do you think?
 
 Cheers
 swedebugia

None of the packages that come with guix have any antifeatures (or else somebody
has made a serious mistake).

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


Re: fgrep fails to find grep during bootstrap

2016-09-28 Thread Carlos Sánchez de La Lama
>> It specifies "fgrep" as program to test, but fgrep is a shell script,
>> and altought the shebang is correctly patched, it needs "grep" binary
>> in the path (which is not at this stage).
>
> have you tried it with reverting commit
> 84cbe39c5a21495647ab6528715c42e4c5b94e83 ?

Kind of; I changed program to test to "true" (like it was before the
commit) but I did not remove the shebang patching, which was being
correctly done and did not harm. That allowed me to go on (and hit the
next problem some minutes later ;) )

Anyways, Mark has fixed it already.

BR

Carlos



Re: [PATCH] gnu: git: Add input for 'git-svn'.

2016-09-28 Thread 宋文武
Thomas Danckaert  writes:

> Hi Guix-devel,
>
> this adds a perl dependency for git-svn.
>
> git-svn uses Term::ReadKey to read a user's password during http
> authentication with an svn server (and perhaps for other
> authentication methods as well).
>

Applied, thanks!



Re: guix environment guix doesn't provide guix dependencies?

2016-09-28 Thread Eric Bavier
On Tue, 27 Sep 2016 22:10:31 -0700
Chris Marusich  wrote:

> John Darrington  writes:
> 
> > On Tue, Sep 27, 2016 at 09:18:30PM -0700, Chris Marusich wrote:
> >  Hi,
> >  
> >  The manual says ((guix) Building from Git):
> >  
> >  --8<---cut here---start->8---
> > The easiest way to set up a development environment for Guix is, of
> >  course, by using Guix!  The following command starts a new shell where
> >  all the dependencies and appropriate environment variables are set up 
> > to
> >  hack on Guix:
> >  
> >   guix environment guix
> >  --8<---cut here---end--->8---
> >  
> >  After running this command successfully, I get the following error 
> > while
> >  running ./bootstrap:
> >  
> >  --8<---cut here---start->8---
> >  + exec autoreconf -vfi
> >  ./bootstrap: line 5: exec: autoreconf: not found
> >  --8<---cut here---end--->8---
> >  
> >  This makes me wonder: has something changed, and the manual is now
> >  incorrect?
> >  
> >
> > I don't think so.   Running ./bootstrap is not part of the normal process 
> > for *building*
> > guix - only for bootstrapping.  But you are right - it is common to want to 
> > do that.
> > For this reason I often run:
> >
> >  guix environment guix --ad-hoc automake autoconf texinfo help2man
> >
> >
> > But perhaps you are right - the manual might want to mention this.
> >
> > J'  
> 
> That makes sense.  I feel like it used to provide all the dependencies,
> including autoconf etc., but that was months ago, and I might be
> mis-remembering.  It works fine when I add the needed bootstrap
> dependencies with --ad-hoc.

You can also do 

  guix environment -e "(@ (gnu packages package-management) guix)"

which points to 'guix-devel' and includes everything needed to build
from a git clone.

`~Eric




Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread ng0
David Craven  writes:

>> It should be enough to add “-net user” on the run-vm.sh command line
>> (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
>> run inside the VM, such as ‘dhcp-client-service’.
>
> Ah, yes this probably needs some documentation. Also should include an
> explanation why the flag isn't added by default and how to connect to
> a ssh server running in the vm.
>
>> Currently I can't ping
>
> You can't ping a vm anyway since it emulates the TCP/UDP layers I
> think and no ICMP. [0]
>
> [0] 
> http://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network

The solutions they describe in the stackexchange answers are some of
those "simple" solutions which look even more "simple" to apply on
GuixSD than on other systems, like every "simple" solution you find
somewhere.

What I mean is, I expect this feature (tcp connections in/out to/from
"the internet" to vm) to work in guix system vm, as it is a normal
expectation coming from NixOS and Gentoo that it just works without any
added specialities.

As I don't want to spend another week experimenting with this, I will
just reconfigure my build server to run from a guix git checkout and
test the services directly there. I am working on a system which wraps
itself around GuixSD, sort of like an live-system but specific to some
preconfigured applications, and I've set phases for myself. I'm stuck on
phase I for too long now. Most if not all of what this is will be
upstreamed, so at some point you'll see where this getting.
-- 
  ng0



Re: using Cuirass to track a guix packages' git

2016-09-28 Thread Mathieu Lirzin
Jan Nieuwenhuizen  writes:

> Mathieu Lirzin writes:
>
>> David Craven  writes:
>>
>>> I think the web interface and the json API are two different
>>> "projects".
>>
>> Agreed.
>
> Oh!  Then why choose json (poor-man's-sexps?) over sexps?  I'm mostly
> just using sexps with read and write, and pipe through json translators
> when crossing the border to the javascript realm.

AIUI JSON usage is not limited to JavaScript since almost every
programming language has a parser for it.  IMO, this is its main
advantage which overcomes its technical limitations.

However if using both S-EXP and JSON is possible without adding
complexity we could provide them both throught HTTP.

-- 
Mathieu Lirzin



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread David Craven
All I'm saying is that you can't use ping. That's all...



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread ng0
David Craven  writes:

>> I still can't ping
>
> You can't ping as I have already mentioned. You need to use TAP/TUN
> instead of -net user if you want to be able to ping. Setting up
> TAP/TUN for vms doesn't work out of the box yet. Does anyone read the
> references I post? =P
>

Not if the text above them reads like my question was
misunderstood (I've read it like you thought I wanted to ping the VM
itself, which is something I absolutely don't want to).
With this additional information, I will look into the reference later.

So you're telling me that the Guix system created VMs are too simplistic
to be easily handled such simple tasks/testings and I'd be better off
running my system from a git checkout at this moment in time, so I can
apply new services and rebuild the running system with them?
-- 
  ng0



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread David Craven
> I still can't ping

You can't ping as I have already mentioned. You need to use TAP/TUN
instead of -net user if you want to be able to ping. Setting up
TAP/TUN for vms doesn't work out of the box yet. Does anyone read the
references I post? =P



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread ng0
ng0  writes:

> ng0  writes:
>
>>  > Hi,
>>
>>  > It should be enough to add “-net user” on the run-vm.sh command line
>>  > (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
>>  > run inside the VM, such as ‘dhcp-client-service’.
>>
>>  > Does that help?
>>
>>  > Ludo’.
>>
>> I will double check on dhcp-client-service, but afaik I already tried
>> all variations of dhcp we can have in guix.
>> I will try passing just this again.
>>
>>  >  > It should be enough to add “-net user” on the run-vm.sh command line
>>  >  > (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
>>  >  > run inside the VM, such as ‘dhcp-client-service’.
>>
>>  >  Ah, yes this probably needs some documentation. Also should include an
>>  >  explanation why the flag isn't added by default and how to connect to
>>  >  a ssh server running in the vm.
>>
>>  >  > Currently I can't ping
>>
>>  >  You can't ping a vm anyway since it emulates the TCP/UDP layers I
>>  >  think and no ICMP. [0]
>>
>> Thanks for the answer, but as I've written in my initial question I
>> don't want to ping the VM.
>> I am creating a VM from a guix branch with ./pre-inst-env guix system
>> and a config.scm of a specific system. I've read my initial post again
>> and I can understand how you could draw this conclusion.
>> So, I am not trying to ping the VM. I am inside the VM and my service
>> needs an outbound connection to get an initial file into its home. To
>> debug my service I need to test if I can ping gnu.org because connection
>> fails in every configuration I have. With the normal qemu VMs running
>> Gentoo in NixOS I have, I can use ping which is normal expected behavior.
>
> Adding: this is about gnunet-service, previously not published. I can't
> continue with git service due to the reasons you will see in the
> reminder I've sent about it in the thread.
>
> Do I have to add a networking bridge in GuixSD for the VM to work?
> Currently nscd in the VM is discovered at 10.0.2.2 and the VM gets
> 10.0.2.15. If so, can you either point me to documentation or what I
> have to search for or provide some quick instructions how I set this up
> on GuixSD?
>
>>  >  [0] 
>> http://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network
>
> Thanks
> -- 
>   ng0
>
>

So obviously you need to add ntp-service if you just use %base-services
+ some minor additions I thought it was part of base. This fixes the
resolution of names, but introduces problems with ntpd (unexpected
origin timestamps).
I still can't ping, but I will let the VM run for a while now to see if
something needs to get in sync.
-- 
  ng0



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread ng0
ng0  writes:

>  > Hi,
>
>  > It should be enough to add “-net user” on the run-vm.sh command line
>  > (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
>  > run inside the VM, such as ‘dhcp-client-service’.
>
>  > Does that help?
>
>  > Ludo’.
>
> I will double check on dhcp-client-service, but afaik I already tried
> all variations of dhcp we can have in guix.
> I will try passing just this again.
>
>  >  > It should be enough to add “-net user” on the run-vm.sh command line
>  >  > (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
>  >  > run inside the VM, such as ‘dhcp-client-service’.
>
>  >  Ah, yes this probably needs some documentation. Also should include an
>  >  explanation why the flag isn't added by default and how to connect to
>  >  a ssh server running in the vm.
>
>  >  > Currently I can't ping
>
>  >  You can't ping a vm anyway since it emulates the TCP/UDP layers I
>  >  think and no ICMP. [0]
>
> Thanks for the answer, but as I've written in my initial question I
> don't want to ping the VM.
> I am creating a VM from a guix branch with ./pre-inst-env guix system
> and a config.scm of a specific system. I've read my initial post again
> and I can understand how you could draw this conclusion.
> So, I am not trying to ping the VM. I am inside the VM and my service
> needs an outbound connection to get an initial file into its home. To
> debug my service I need to test if I can ping gnu.org because connection
> fails in every configuration I have. With the normal qemu VMs running
> Gentoo in NixOS I have, I can use ping which is normal expected behavior.

Adding: this is about gnunet-service, previously not published. I can't
continue with git service due to the reasons you will see in the
reminder I've sent about it in the thread.

Do I have to add a networking bridge in GuixSD for the VM to work?
Currently nscd in the VM is discovered at 10.0.2.2 and the VM gets
10.0.2.15. If so, can you either point me to documentation or what I
have to search for or provide some quick instructions how I set this up
on GuixSD?

>  >  [0] 
> http://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network

Thanks
-- 
  ng0



Re: Colors and progress indicators on buildprocesses

2016-09-28 Thread ng0
swedebu...@riseup.net writes:

> Hi
>
> I recently installed Parabola and have played around a bit with 
> compiling AUR-packages to be able to run the programs I want - packaged 
> or not.
>
> Having build a lot on guixsd a while ago I noticed some differences in 
> the cli-overview that I would like to present.
>
> Colorfication and arrows (=>) are used to clearly distinguish 
> pacaur/pacman-commands from the buildprocess output.
>
> A nice thing I saw on some builds (build of qt during build of 
> telegram-desktop) was a per build process percentage indicator located 
> in the beginning of each line of build output like this:
> [ 0% ] lorem ipsum
> [ 10% ] lorem ipsum
>
> In addition to these two above I have an idea as well:
> Use the terminal-title wisely to show the progress of the whole 
> transaction and the current running build (e.g.: "Download complete. 
> Buildprogress 4/5: building qt"
>
> What do you think?
>
>

The problem with colors is that the use of colors in build logs creates
very difficult to read logs if you don't filter them. I think this is
one of the reasons why we don't have colors.
I am not against it, I just think it will make helping people a little
harder when they provide such logs. On the other hand, if we manage to
filter the colors out in the build logs somehow, this is of no concern
to us.
-- 
  ng0



Re: [Patch 7/10] opendht: Propagate msgpack.

2016-09-28 Thread Ludovic Courtès
Lukas Gradl  skribis:

> From b611f29c422cfa69c90f437c40fcbee47a77f839 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl 
> Date: Sun, 11 Sep 2016 22:32:50 -0500
> Subject: [PATCH 07/10] gnu: opendht: Propagate msgpack.
>
> * gnu/packages/crypto.scm (opendht)[inputs]: Remove msgpack.
> [propagated-inputs]: Add it.

Applied, thanks!

Ludo'.



Colors and progress indicators on buildprocesses

2016-09-28 Thread swedebugia

Hi

I recently installed Parabola and have played around a bit with 
compiling AUR-packages to be able to run the programs I want - packaged 
or not.


Having build a lot on guixsd a while ago I noticed some differences in 
the cli-overview that I would like to present.


Colorfication and arrows (=>) are used to clearly distinguish 
pacaur/pacman-commands from the buildprocess output.


A nice thing I saw on some builds (build of qt during build of 
telegram-desktop) was a per build process percentage indicator located 
in the beginning of each line of build output like this:

[ 0% ] lorem ipsum
[ 10% ] lorem ipsum

In addition to these two above I have an idea as well:
Use the terminal-title wisely to show the progress of the whole 
transaction and the current running build (e.g.: "Download complete. 
Buildprogress 4/5: building qt"


What do you think?



Re: [Patch 6/10] telephony: Add license prefix.

2016-09-28 Thread Ludovic Courtès
Lukas Gradl  skribis:

> From 630ad1d1d15131bb62eafe4afb842e5fa2fc5675 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl 
> Date: Sun, 28 Aug 2016 12:40:21 -0500
> Subject: [PATCH 06/10] gnu: telephony: Add 'license:' prefix.
>
> * gnu/packages/telephony.scm (commoncpp) [license]: Add prefix.
> (ucommon) [license]: Add prefix.
> (ccrtp) [license]: Add prefix.
> (osip) [license]: Add prefix.
> (exosip) [license]: Add prefix.
> (sipwitch) [license]: Add prefix.
> (libsrtp) [license]: Add prefix.
> (libiax2) [license]: Add prefix.
> (seren) [license]: Add prefix.
> (pjproject-sfl) [license]: Add prefix.

Applied, thanks!

Ludo'.



Re: [Patch 3/10] Add gsm.

2016-09-28 Thread Ludovic Courtès
Lukas Gradl  skribis:

> From ecafdf21a654c97fa9adb2c382c431c297a3fee0 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl 
> Date: Tue, 9 Aug 2016 16:43:36 -0500
> Subject: [PATCH 03/10] gnu: Add gsm.
>
> * gnu/packages/audio.scm (gsm): New variable.

Applied with small changes:

> + (let ((out (assoc-ref %outputs "out")))
> +   (begin
> +(system* "mv" (string-append out "/inc")
> + (string-append out "/include"))

I removed ‘begin’ and used ‘rename-file’ here.

> +(mkdir-p (string-append out "/include/gsm"))
> +(copy-recursively
> + "inc" (string-append out "/include/gsm"))

I noticed that this leads to a situation where we have both
include/gsm.h and include/gsm/gsm.h as identical file.  I suppose the
former is unnecessary?

Thanks!

Ludo’.



The question of warning about antifeatures

2016-09-28 Thread swedebugia

Hi!

I see that F-Droid warns clearly about packages with certain 
antifeatures (https://f-droid.org/wiki/page/Antifeatures).


One example is: https://f-droid.org/wiki/page/Antifeature:NonFreeNet

One example of a very popular package (>100x10^6 users) is: telegram 
messenger (https://f-droid.org/wiki/page/org.telegram.messenger)


I was wondering if it would be fruitful to include something similar in 
guix?


What do you think?

Cheers
swedebugia



Re: [Patch 4/10] argon2: Install pkg-config file.

2016-09-28 Thread Ludovic Courtès
Hello,

Lukas Gradl  skribis:

> From 5fb85fef7b1475baca6c29beb26799ca8f3d814a Mon Sep 17 00:00:00 2001
> From: Lukas Gradl 
> Date: Tue, 9 Aug 2016 16:49:19 -0500
> Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.
>
> * gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
> [arguments]: Install it.
> ---
>  gnu/packages/password-utils.scm | 26 +-
>  1 file changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
> index 7288da6..f62d041 100644
> --- a/gnu/packages/password-utils.scm
> +++ b/gnu/packages/password-utils.scm
> @@ -311,6 +311,21 @@ through the pass command.")
>   "https://codeload.github.com/P-H-C/phc-winner-;
>   name "/tar.gz/" version))
> (file-name (string-append name "-" version ".tar.gz"))
> +   (snippet
> +'(let ((p (open-file "argon2.pc" "w")))
> +   (begin
> + (display
> +  (string-append "prefix=/usr/local\n"
> + "exec_prefix=${prefix}\n"
> + "includedir=${prefix}/include\n"
> + "libdir=${prefix}/lib\n\n"
> + "Name: Argon2\n"
> + "Description: "
> + "The Argon2 password hashing algorithm\n"
> + "Version: 1.0.0\n"
> + "Cflags: -I${includedir}/\n"
> + "Libs: -L${libdir} -largon2\n") p)
> + (close-output-port p

As Danny suggested, this should be discussed upstream.  What’s the
status of this .pc file upstream?  I’m reluctant to start relying on it
if there’s no sign that it will eventually be provided by upstream.

Thanks,
Ludo’.



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread ng0

 > Hi,

 > It should be enough to add “-net user” on the run-vm.sh command line
 > (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
 > run inside the VM, such as ‘dhcp-client-service’.

 > Does that help?

 > Ludo’.

I will double check on dhcp-client-service, but afaik I already tried
all variations of dhcp we can have in guix.
I will try passing just this again.

 >  > It should be enough to add “-net user” on the run-vm.sh command line
 >  > (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
 >  > run inside the VM, such as ‘dhcp-client-service’.

 >  Ah, yes this probably needs some documentation. Also should include an
 >  explanation why the flag isn't added by default and how to connect to
 >  a ssh server running in the vm.

 >  > Currently I can't ping

 >  You can't ping a vm anyway since it emulates the TCP/UDP layers I
 >  think and no ICMP. [0]

Thanks for the answer, but as I've written in my initial question I
don't want to ping the VM.
I am creating a VM from a guix branch with ./pre-inst-env guix system
and a config.scm of a specific system. I've read my initial post again
and I can understand how you could draw this conclusion.
So, I am not trying to ping the VM. I am inside the VM and my service
needs an outbound connection to get an initial file into its home. To
debug my service I need to test if I can ping gnu.org because connection
fails in every configuration I have. With the normal qemu VMs running
Gentoo in NixOS I have, I can use ping which is normal expected behavior.

 >  [0] 
 > http://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network


-- 
  ng0



Re: [Patch 2/10] Add dbus-c++.

2016-09-28 Thread Ludovic Courtès
Lukas Gradl  skribis:

> From 828174a6663363c26362637f23569e4f23698786 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl 
> Date: Thu, 21 Jul 2016 08:39:54 -0500
> Subject: [PATCH 02/10] gnu: Add dbus-c++.
>
> * gnu/packages/glib.scm (dbus-c++): New variable.

I changed the URL to use mirror://sourceforge, made a couple of cosmetic
changes and committed.  Thanks!

Ludo’.



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread David Craven
> It should be enough to add “-net user” on the run-vm.sh command line
> (info "(guix) Running GuixSD in a VM"), and then having a DHCP client
> run inside the VM, such as ‘dhcp-client-service’.

Ah, yes this probably needs some documentation. Also should include an
explanation why the flag isn't added by default and how to connect to
a ssh server running in the vm.

> Currently I can't ping

You can't ping a vm anyway since it emulates the TCP/UDP layers I
think and no ICMP. [0]

[0] http://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network



Re: Cosmetical change: remove inconsistent "$file ends here"?

2016-09-28 Thread Ludovic Courtès
Alex Kost  skribis:

> ng0 (2016-09-24 20:00 +) wrote:
>
>> We should either be consistent with this in all files or remove this
>> altogether in my opinion.
>>
>>> ng0@shadowwalker ~/src/guix/guix-no-changes$ egrep -nr "ends here"
>>> gnu/build/vm.scm:323:;;; vm.scm ends here
> ...
>> What do you think?
>
> I don't know what the original purpose of this convention is, it was
> probably invented in those ancient times when dinosaurs walked by
> streets, but I kinda like these "ends here" things :-)

Yeah, I add them occasionally out of habit, but it’s not useful.

> Anyway, I vote for leaving them and adding the missing ones.

I vote for the status quo.  :-)  There’s not much value in spending time
either way IMO.

Ludo’.



Re: Superseded packages

2016-09-28 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Sat, Sep 24, 2016 at 11:14:41AM +0900, Ludovic Courtès wrote:
>> Leo Famulari  skribis:
>> > +(define-public attic
>> > +  (package (inherit borg)
>> > +(name "attic")
>> > +(properties `((superseded . ,borg)
>> 
>> I was thinking that we could keep the ‘attic’ recipe as-is, only with
>> this extra ‘properties’ field.
>> 
>> That way, “guix package -u” and “guix package -i attic” would install
>> Borg, but people who insist could still run:
>> 
>>   guix package -e '(@ (gnu packages backup) attic)'
>> 
>> Thoughts?
>
> That's a much better idea than what I had proposed.
>
> I found that I had to move the attic package definition below borg's, or
> else the borg variable was unbound when building (gnu packages backup):

[...]

> So the attached patch moves attic after borg and supersedes it. Is it
> expected that we have to shuffle the package definition around like
> this?

Yes, because ‘properties’ are evaluated eagerly.

We could change the ‘superseded’ property to always be a promise, as
Efraim suggests; we’ll see later if that’s really necessary.

The patch LGTM.

Thank you!

Ludo’.



Re: Network with QEMU generated image (guix system vm)?

2016-09-28 Thread Ludovic Courtès
Hi,

It should be enough to add “-net user” on the run-vm.sh command line
(info "(guix) Running GuixSD in a VM"), and then having a DHCP client
run inside the VM, such as ‘dhcp-client-service’.

Does that help?

Ludo’.



Re: [PATCH 0/2] Add quickswitch for i3 (third try)

2016-09-28 Thread Ivan Vilata i Balaguer
Ivan Vilata i Balaguer (2016-09-21 11:18:47 +0200) wrote:

> Hi, this is my third try at packaging [quickswitch][] for the i3
> window manager.  The main difference from the second iteration is in
> the changes suggested by Alex Kost to update the Scheme code (I had
> copied and pasted some outdated code from other Python packages).  I
> also used a different patch for the ``dmenu`` program check.
> 
> I stuck to ``quickswitch-i3`` instead of ``quickswitch-for-i3`` since
> it's the name used in PyPi and inside of the readme.
> 
> [quickswitch]: https://github.com/proxypoke/quickswitch-for-i3/
> 
> Thanks to Brendan Tildesley, Leo Famulari, Hartmut Goebel and Alex
> Kost for testing, advice and patience!

Hi, a week has passed without any input about these.  Do you think the
patches are ok now?  (The ones from Sep 21st, sorry but signing the
first message with Mutt broke the mail thread).

Thanks!

> Ivan Vilata-i-Balaguer (2):
>   gnu: wm: Add python-i3-py.
>   gnu: wm: Add quickswitch-i3.
> 
>  .../patches/quickswitch-fix-dmenu-check.patch  | 32 
>  gnu/packages/wm.scm| 88 
> ++
>  2 files changed, 120 insertions(+)
>  create mode 100644 gnu/packages/patches/quickswitch-fix-dmenu-check.patch
> 
> -- 
> 2.10.0

-- 
Ivan Vilata i Balaguer -- https://elvil.net/



Re: [PATCH 4/6] gnu: linux-libre-beagle-bone-black: Remove kernel variant.

2016-09-28 Thread John Darrington
On Tue, Sep 27, 2016 at 08:14:38PM -0400, Mark H Weaver wrote:
 
 Our conventions for commit logs, which follow the GNU Coding Standards
 for Change Logs (see section 6.8 of the GNU Coding Standards), is that
 explanations belong in the comments of the code itself, not in the
 commit log.  If that had been done in the example you give above, you
 would have known why the line was needed in a small fraction of the time
 that it must have taken you to perform all the steps above.

That can work in simple instances - where the change is a one liner or at least
where the change is confined to a few consecutive lines in one file.  But not
all changes are that simple.  Sometimes it is necessary to make a change which 
involves lots of small changes in lots of different places in lots of different
files.   In such cases it would be rediculous to append a comment to each line
changed.  In fact I have seen such code from the 1980s where almost every 4th 
line
has a comment like: 
  mode++; /* JMD 09/2/1981: Increment the mode count otherwise the crud wangler 
overflows 
in the case where grunger regurtitates */

The occasional such comment is ok, but when it's every third line it does 
nothing
for readability nor comprehensibility.
 
 However, I agree that commits that _remove_ code should include the
 rationale in the commit log, if the reason is not obvious and if there's
 no sensible place to put the explanation in the code.
 
 What do you think?

Well I certainly agree that adding a reason for a change is a good idea.  Even 
if
we do also have text in the message which is superfluous.

J'

Note to self:  Must write an improved version of gnulib's git-log-to-changelog 
script
which will satisfy the die-harders.


-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature