updating many haskell packages

2017-02-05 Thread Troy Sankey
I have a WIP branch which contains many haskell package updates and
additions, and makes haskell-build-system use the latest ghc (8.0.2).

https://github.com/pwnage101/guix/tree/add-gitit

It started as a small project to create a Gitit package (hence the name
of the branch), but blew up into something larger.  It's hard work, so I
just wanted to check in with you all to see if this seems like the right
direction.

As of this writing, I have over 66 packages updated, 16 added, and
various fixes on existing packages to get everything buildable against
ghc@8.0.2.  I'm debating whether I should systematically update all the
haskell packages while I'm at it, or just make sure everything is
buildable under 8.0.2.  There are over 277 haskell packages in all.

I wonder how I should send these patches after I'm all done.  git
send-email?  That seems crazy.

Troy


signature.asc
Description: signature


Re: Porting with Guix

2017-02-05 Thread rennes

Hello,

Regarding this topic, performing more tests:
* Running with the sudo command 'Screen' works.

I think that a user must be set for 'Screen' to run correctly as the 
Debian project does.



buzz@Hurd:~$ sudo /home/buzz/.guix-profile/bin/screen 
~/Guix-on-Hurd/pre-inst-env guix-daemon --build-users-group=guixbuild -c 
1 --substitute-urls=http://homenetwork.servebeer.com:8080/

[sudo] password for buzz:
[detached from 1007.ttyp0.Hurd]

buzz@Hurd:~$ ps -ef | grep guix
root  1007 1   -  0:00.01 /home/buzz/.guix-profile/bin/SCREEN 
/home/buz
root  1009  1007  p1  0:00.01 guix-daemon 
--build-users-group=guixbuild -c

buzz  1046   987  p0  0:00.00 grep guix


regards



I have the following error when running the Screen application, and
tried to debug as follows:

$ screen /home/buzz/.guix-profile/bin/bash
[screen is terminating]

$ gdb screen /home/buzz/.guix-profile/bin/bash
"/home/buzz/.guix-profile/bin/bash" is not a core dump: File format
not recognized
(gdb) r
Starting program: 
/gnu/store/b8189hzmvmzmz9rwsqff48sa2klqyw8q-profile/bin/screen

[New Thread 6488.5]
[screen is terminating]
[New Thread 6488.6]

Program received signal SIGHUP, Hangup.
0x01102f4c in mach_msg_trap () from
/gnu/store/lj4hj6xz0i1lr0kzia3dxmgggl53ngq7-glibc-2.19/lib/libc.so.0.3
(gdb) bt
#0  0x01102f4c in mach_msg_trap () from
/gnu/store/lj4hj6xz0i1lr0kzia3dxmgggl53ngq7-glibc-2.19/lib/libc.so.0.3
#1  0x0110364a in mach_msg () from
/gnu/store/lj4hj6xz0i1lr0kzia3dxmgggl53ngq7-glibc-2.19/lib/libc.so.0.3
#2  0x01140873 in sigsuspend_not_cancel ()
   from 
/gnu/store/lj4hj6xz0i1lr0kzia3dxmgggl53ngq7-glibc-2.19/lib/libc.so.0.3

#3  0x011b30fe in pause () from
/gnu/store/lj4hj6xz0i1lr0kzia3dxmgggl53ngq7-glibc-2.19/lib/libc.so.0.3
#4  0x0806e6b2 in Attacher ()
#5  0x0804c1d8 in main ()




Re: [PATCH -v2] Fix gtk-im-modules for Gtk+3

2017-02-05 Thread Ricardo Wurmus

huang_ying_cari...@163.com writes:

> From: Huang Ying 
>
> Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be find
> in bin output.

Ah, I was wondering why this broke!  Thanks for investigating it.

> The fix works, but appears hacky, because I haven't read much guix source
> code, so I don't know the best solution.

It’s only hacky because I tried to reuse the code for both versions of
Gtk.  Maybe “gtk+-2” should also get a “bin” output…?

This is acceptable with the changes Danny suggested.  Maybe we can find
a way to make this prettier in the future.

Thanks again for taking the time to investigate and fix it, and to
submit a patch!  I’m very grateful for this contribution.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




Re: hackage importer broken

2017-02-05 Thread Ricardo Wurmus

Federico Beffa  writes:

> Hi,
>
> I notice that with a recent Guix checkout (commit
> d8e85b20325073d90cfaf3060889d59d91362deb) the hackage importer doesn't
> work and the problem seems to be with Guile itself or the lalr parser
> coming with it:
>
> ---
> GNU Guile 2.0.13
> Copyright (C) 1995-2016 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> ,m (guix import hackage)
> scheme@(guix import hackage)> (canonical-newline-port (http-fetch
> "https://hackage.haskell.org/package/hmatrix/hmatrix.cabal;
> #:verify-certificate? #f))
> $2 = #
> scheme@(guix import hackage)> (read-cabal $2)
> system/base/lalr.upstream.scm:1851:2: In procedure ___push:
> system/base/lalr.upstream.scm:1851:2: Wrong number of arguments to
> #

This error looks familiar.  I think I’ve seen it when I played with
Guile 2.2 and the load path included modules from both versions of
Guile.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




[PATCH] gnu: Add tftp-hpa.

2017-02-05 Thread Boskovits , Gábor
From: Boskovits,Gábor 

---
 gnu/packages/tftp-hpa.scm | 27 +++
 1 file changed, 27 insertions(+)
 create mode 100644 gnu/packages/tftp-hpa.scm

diff --git a/gnu/packages/tftp-hpa.scm b/gnu/packages/tftp-hpa.scm
new file mode 100644
index 0..469123b67
--- /dev/null
+++ b/gnu/packages/tftp-hpa.scm
@@ -0,0 +1,27 @@
+(define-module (gnu packages tftp-hpa)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses))
+
+(define-public tftp-hpa
+  (package
+(name "tftp-hpa")
+(version "5.2")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://www.kernel.org/pub/software/;
+  "network/tftp/tftp-hpa/tftp-hpa-" version
+  ".tar.xz"))
+  (sha256
+   (base32
+"12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"
+(build-system gnu-build-system)
+(arguments `(#:tests? #f)) ; no test target
+(synopsis "HPA's tftp client")
+(description
+ "This is a tftp client derived from OpenBSD tftp with some extra options
+added and bugs fixed.  The source includes readline support but it is not
+enabled due to licence conflicts between the BSD advertising clause and the 
GPL.")
+(home-page "http://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/;)
+(license bsd-4)))
-- 
2.11.0




Re: [PATCH] gnu: new re2c package, version 0.16

2017-02-05 Thread Maxim Cournoyer
Hi Sergei,

Sergei Trofimovich  writes:

> Tested on x86_64-linux and i686-linux.
>
> * gnu/local.mk: add re2c.scm to dist
> * gnu/packages/re2c.scm: new file
>
> Signed-off-by: Sergei Trofimovich 
> ---
>  gnu/local.mk  |  1 +
>  gnu/packages/re2c.scm | 47 +++
>  2 files changed, 48 insertions(+)
>  create mode 100644 gnu/packages/re2c.scm
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 0948321c9..5c1634e02 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =  \
>%D%/packages/ratpoison.scm \
>%D%/packages/rdesktop.scm  \
>%D%/packages/rdf.scm   \
> +  %D%/packages/re2c.scm  \
>%D%/packages/readline.scm  \
>%D%/packages/regex.scm \
>%D%/packages/rrdtool.scm   \
> diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm
> new file mode 100644
> index 0..7c5698a82
> --- /dev/null
> +++ b/gnu/packages/re2c.scm
> @@ -0,0 +1,47 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2017 Sergei Trofimovich 
> +;;;
> +;;; 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 re2c)
> +  #:use-module (guix licenses)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system gnu))
> +
> +(define-public re2c
> +  (package
> +(name "re2c")
> +(version "0.16")
> +(source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/skvadrik/; name
> + "/releases/download/" version "/"
> + name "-" version ".tar.gz"))
> + (sha256
> +  (base32
> +   "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8"
> +(build-system gnu-build-system)
> +(home-page "http://re2c.org/;)
> +(synopsis "Lexer generator for C/C++")
> +(description
> + "re2c generates minimalistic hard-coded state machine (as opposed to
> +full-featured table-based lexers).  Flexible API allows generated code to
> +be wired into virtually any environment.  Instead of exposing traditional
> +yylex() style API, re2c exposes its internals.  Be sure to take a look at
> +examples, they cover a lot of real-world cases and shed some light on dark
> +corners of re2c API.")
> +(license public-domain)))

This looks good to me!

As an unrelated note, it seems that your patches are coming as duplicated
messages on this list (I received 3 messages for this very patch). Maybe
some configuration issue in your mail/smtp client?

Thanks,

Maxim


signature.asc
Description: PGP signature


Re: [PATCH 6/9] gnu: Add python-pytest-httpbin-0.0.7.

2017-02-05 Thread Maxim Cournoyer
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/python.scm (python-pytest-httpbin-0.0.7): New variable.
> ---
>  gnu/packages/python.scm | 23 +++
>  1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 9c3a031e1..7bdd371b5 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -1975,6 +1975,29 @@ thread running httpbin and provides your test with the 
> URL in the fixture.")
>  (define-public python2-pytest-httpbin
>(package-with-python2 python-pytest-httpbin))
>  
> +;; Some packages like "searx" need this old version.
> +(define-public python-pytest-httpbin-0.0.7
> +  (package
> +(inherit python-pytest-httpbin)
> +(version "0.0.7")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "pytest-httpbin" version))
> +   (sha256
> +(base32
> + "08ghq923dn33rllip3vap2p9fb680g0i96jdn5lcpfy8amq8mbq3"))
> +
> +(define-public python2-pytest-httpbin-0.0.7
> +  (package
> +(inherit (package-with-python2
> +  (strip-python2-variant python-pytest-httpbin-0.0.7)))
> +(inputs
> + `(("python2-flask" ,python2-flask)
> +   ("python2-decorator" ,python2-decorator)
> +   ("python2-httpbin" ,python2-httpbin)
> +   ("python2-six" ,python2-six)
> +

Again, shouldn't those be propagated-inputs? Unless I missed something
this was the recommendation going forward for Python runtime dependencies.

>  (define-public python-scripttest
>(package
>  (name "python-scripttest")


signature.asc
Description: PGP signature


Re: [PATCH 2/9] gnu: Add python-gunicorn.

2017-02-05 Thread Maxim Cournoyer
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/web.scm (python-gunicorn): New variable.
> ---
>  gnu/packages/web.scm | 28 +++-
>  1 file changed, 27 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 8cc80a2c4..1803f58e9 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -13,7 +13,7 @@
>  ;;; Copyright © 2016 Rene Saavedra 
>  ;;; Copyright © 2016 Ben Woodcroft 
>  ;;; Copyright © 2016 Clément Lassieur 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016, 2017 ng0 
>  ;;; Copyright © 2016 Arun Isaac 
>  ;;; Copyright © 2016 Tobias Geerinckx-Rice 
>  ;;; Copyright © 2016 Bake Timmons 
> @@ -4018,3 +4018,29 @@ service for that request.  Requests are made using 
> port numbers as identifiers
>  and xinetd usually launches another daemon to handle the request.  It can be
>  used to start services with both privileged and non-privileged port 
> numbers.")
>  (license (l:fsf-free "file://COPYRIGHT"
> +
> +(define-public python-gunicorn
> +  (package
> +(name "python-gunicorn")
> +(version "19.6.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "gunicorn" version))
> +   (sha256
> +(base32
> + "065n5z91607q4l8wncqkz297cdcb60cz8wnyxy88wk4as4b6jgw1"
> +(build-system python-build-system)
> +(arguments
> + ;; XXX: Tests require older versions of pytest-cov and other packages.
> + `(#:tests? #f))
> +(inputs
> + `(("python-sphinx" ,python-sphinx)))

This should probably be a native-input (used at build-time to build the
documentation, I guess?).

> +(home-page "http://gunicorn.org;)
> +(synopsis "WSGI HTTP Server")
> +(description
> + "Gunicorn ('Green Unicorn') is a WSGI HTTP Server.")
> +(license l:expat)))
> +
> +(define-public python2-gunicorn
> +  (package-with-python2 python-gunicorn))


signature.asc
Description: PGP signature


Re: [PATCH 3/9] gnu: Add python-httpbin.

2017-02-05 Thread Maxim Cournoyer
Hi ng0,

contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/web.scm (python-httpbin): New variable.
> ---
>  gnu/packages/web.scm | 34 ++
>  1 file changed, 34 insertions(+)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 1803f58e9..244672c9d 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -4044,3 +4044,37 @@ used to start services with both privileged and 
> non-privileged port numbers.")
>  
>  (define-public python2-gunicorn
>(package-with-python2 python-gunicorn))
> +
> +(define-public python-httpbin
> +  (package
> +(name "python-httpbin")
> +(version "0.5.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "httpbin" version))
> +   (sha256
> +(base32
> + "1dc92lnk846hpilslrqnr63x55cxll4qx88gif8fm521gv9cbyvr"
> +(build-system python-build-system)
> +(inputs
> + `(("python-decorator" ,python-decorator)
> +   ("python-flask" ,python-flask)
> +   ("python-gevent" ,python-gevent)
> +   ("python-greenlet" ,python-greenlet)
> +   ("python-gunicorn" ,python-gunicorn)
> +   ("python-itsdangerous" ,python-itsdangerous)
> +   ("python-jinja2" ,python-jinja2)
> +   ("python-markupsafe" ,python-markupsafe)
> +   ("python-six" ,python-six)
> +   ("python-werkzeug" ,python-werkzeug)))

Shouldn't those be propagated-inputs, as recommended in the guix texinfo
manual for the new python-build-system?

> +(home-page "https://httpbin.org/;)
> +(synopsis "HTTP Request and Response Service")
> +(description
> + "@code{httpbin} covers all kinds of HTTP scenarios for testing
> +HTTP libraries.  Additional endpoints are being considered.
> +All endpoint responses are JSON-encoded, it can be run as a WSGI App.")
> +(license l:expat)))
> +
> +(define-public python2-httpbin
> +  (package-with-python2 python-httpbin))

Regards,

Maxim


signature.asc
Description: PGP signature


Re: [PATCH 7/9] gnu: python-pytest: Update to 3.0.5.

2017-02-05 Thread Maxim Cournoyer
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/python.scm (python-pytest): Update to 3.0.5.
> [source]: Use "pypi-uri".
> ---
>  gnu/packages/python.scm | 9 -
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 7bdd371b5..a4179a67a 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -1738,16 +1738,14 @@ code introspection, and logging.")
>  (define-public python-pytest
>(package
>  (name "python-pytest")
> -(version "2.7.3")
> +(version "3.0.5")
>  (source
>   (origin
> (method url-fetch)
> -   (uri (string-append
> - "https://pypi.python.org/packages/source/p/pytest/pytest-;
> - version ".tar.gz"))
> +   (uri (pypi-uri "pytest" version))
> (sha256
>  (base32
> - "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
> + "1z9pj39w0r2gw5hsqndlmsqa80kgbrann5kfma8ww8zhaslkl02a"))
> (modules '((guix build utils)))
> (snippet
>  ;; One of the tests involves the /usr directory, so it fails.
> @@ -1758,6 +1756,7 @@ code introspection, and logging.")
>  (propagated-inputs
>   `(("python-py" ,python-py)))
>  (native-inputs
> + ;; If we add python-hypothesis here, it creates an circular
> depedency.

s/depedency/dependency/

>   `(("python-nose" ,python-nose)
> ("python-mock" ,python-mock)))
>  (home-page "http://pytest.org;)


signature.asc
Description: PGP signature


Re: [GNU-linux-libre] Free firmware - A redefinition of the term and a new metric for it's measurement.

2017-02-05 Thread Maxim Cournoyer
Hi,

Christopher Howard  writes:

> Hi David, I don't agree that just being given a redistributable blob is
> any wonderful thing. What you end up with down the road (and this is
> where we are now) is systems that need several (or many) blobs that only
> the providing company understands and controls. Usually these blobs are
> in control of critical or highly desirable functionality. You don't know
> for sure what the blobs do or whether or not they have security
> vulnerabilities. And sometimes the blobs come with restrict licensing
> allowing distribution but not allowing you to reverse engineer.
>

+1. I don't see how having blobs helps security at all. David, you
mentioned that having blobs could help manufacturers fix security issues
(human errors) in their products; while true, this is a double-edged
sword; it could also be used to insert spyware or whatnot, and very
easily (simply release a new version of the blob for distribution,
advertising it as bringing "fixes").

I think the FSF's position, as expressed in their "Respects Your
Freedom" certification guidelines [0], is reasonable given the current
state of things. Basically it says that "All the product software must
be free software.", but grants some exceptions for software equivalent
to hardware (e.g., fixed in ROM and non-upgradable) [1] and which runs
on "secondary embedded processors" (which can include firmware built
into I/O devices).

For the time being, the hardware we use is closed. Just as we
reluctantly accept to use non-free hardware for the time being, we can
reluctantly accept to use non-free software which is equivalent to
hardware. Whether the non-free firmware is stored as a loadable blob or
in the ROM of a device doesn't change the fact that it's non-free. The
subtlety is whether this firmware is used as hardware (upgradable) or
software (easily replaced or extended). The later puts more control in
the hands of the manufacturer, which is why the former is preferred.

The RYF criteria page also states that they "want users to be able to
upgrade and control the software on as many levels as possible.". In
other words, a device with completely free firmware is more valued than a
device with a closed firmware used as hardware, as it should be.

Finally, preferring built-in, closed firmware to loadable blobs (closed
firmware) could be seen as an incentive for manufacturers to release
their firmware as free software (user-upgradable): releasing it as free
software enables them to fix things (in a transparent manner) after the
product is launched, which reduces risk (if the firmware is
non-upgradable, the product could have to be recalled in case a serious
problem is later found with it).

> For firmware development to be practical, you want more than
> documentation. You want source code. Also (for embedded development) you
> want a tool chain. You might have the source code but find it near
> impossible to build because you don't have a good tool chain.
>

The RYF criteria includes a "Compilation" (all the software must be
buildable using free tools) and "Documentation", so this is at least
summarily covered.

> Yeah, with documentation, you might be able to engineer the source code
> and tool chain... but it might take you 3+ years, and then only if
> enough people are interested. And by that time no one will want the
> hardware anymore. This isn't a moderately annoying problem for x86, but
> it is a major problem for tablets, cell phones, and other embedded
> development.
>
> The companies that should be the rewarded are the ones that release
> firmware, source code, and tool chain. E.g., Thinkpenguin and the TPE-R1100.
>

Indeed, we ought to put our money where our mouth is, i.e. back the
companies which are helping the cause of free software/hardware.

My two cents,

Maxim


[0] http://www.fsf.org/resources/hw/endorsement/criteria

[1] The "fixed" part is not worded directly in the RYF criteria, but
from the anti-tivoization clause found in the GPLv3, I would expect that
this is how they would consider the matter.


signature.asc
Description: PGP signature


Re: Add /usr/bin/env by default in guixsd?

2017-02-05 Thread Alex Kost
Ludovic Courtès (2017-02-05 13:09 +0100) wrote:

> Hi!
>
> Sorry for the delay.  I secretly hope somebody would answer, but this is
> such a hot topic that nobody dared.  ;-)
>
> "Huang, Ying"  skribis:
>
>> It is a common practice to use /usr/bin/env in script shabang to use the
>> interpreter find in PATH.  For example, something as follow,
>>
>> #!/usr/bin/env python
>>
>> Although it is not necessary for scripts packaged in guix, if the
>> scripts are written by a user for his own usage and he don't want to
>> package it, it is good to have /usr/bin/env available.  In this way, the
>> interpreters in ~/.guix-profile/bin will be used.
>>
>> So how about add /usr/bin/env by default in guixsd?
>
> For the record this has been discussed in the past:
>
>   https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00414.html
>
> There was no clear consensus.
>
> Of course there are simple ways to add it, several of which were given
> in the thread.
>
> The subject does come up every once in a while though, so we really need
> to address it one way or another.  :-)
>
> First we need a simple ‘special-files’ service or something (for /bin/sh
> and /usr/bin/env).
>
> Then the whole battle will be about what the default should be.  I used
> to be affiliated with the “no way!” party on this topic, but I
> considering changing my mind.  :-)  Especially that it does not matter
> that much, after all.
>
> Ricardo, anyone, thoughts?

I personally made "/usr/bin/env" (a symlink to
"/run/current-system/profile/bin/env"), so I think it would be good to
have it on GuixSD by default.

-- 
Alex



Re: guix can't find (gnutls)

2017-02-05 Thread Alex Kost
Federico Beffa (2017-02-05 11:48 +0100) wrote:

> On Sat, Feb 4, 2017 at 8:02 PM, Alex Kost  wrote:
>> Federico Beffa (2017-02-04 15:50 +0100) wrote:
>>
>>> Hi,
>>>
>>> for some reason Guix can't find (gnutls) despite the module being
>>> installed and usable in Guile:
>> [...]
>>> Any suggestion?
>>
>> Check that guix-daemon is also started with GUILE_LOAD_[COMPILED_]PATH
>> environment containing gnutls modules.
>
>
> That's it!
>
> I was test starting the daemon with "sudo guix-daemon
> --build-users-group=guixbuild" from a shell with the GUILE_*
> environment variables set correctly and things didn't work. Now I
> defined those variables in the guix-daemon.system systemd unit and
> things do work (I'm on Debian testing). I'm not sure of why the formed
> didn't work, but the latter did it.

I think that's because when you run "sudo guix-daemon" your environment
was not preserved; if you run "sudo -E guix-daemon", it would work.

-- 
Alex



[PATCH 2/2] tests: Add 'prosody-service-type' test.

2017-02-05 Thread Clément Lassieur
* gnu/tests/messaging.scm: New file.
* gnu/services/messaging.scm: New exported procedure.
  ()[provision]: Add 'xmpp-daemon'.
---
 gnu/services/messaging.scm |   5 +-
 gnu/tests/messaging.scm| 175 +
 2 files changed, 178 insertions(+), 2 deletions(-)
 create mode 100644 gnu/tests/messaging.scm

diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index aa398970b..9f59d6eac 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -40,7 +40,8 @@
 mod-muc-configuration
 ssl-configuration
 
-%default-modules-enabled))
+%default-modules-enabled
+prosody-configuration-pidfile))
 
 ;;; Commentary:
 ;;;
@@ -592,7 +593,7 @@ See also @url{http://prosody.im/doc/modules/mod_muc}.;
   (zero? (system* #$prosodyctl-bin 
#$@args))
 (list (shepherd-service
(documentation "Run the Prosody XMPP server")
-   (provision '(prosody))
+   (provision '(prosody xmpp-daemon))
(requirement '(networking syslogd user-processes))
(start (prosodyctl-action "start"))
(stop (prosodyctl-action "stop"))
diff --git a/gnu/tests/messaging.scm b/gnu/tests/messaging.scm
new file mode 100644
index 0..b7f97ab98
--- /dev/null
+++ b/gnu/tests/messaging.scm
@@ -0,0 +1,175 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Clément Lassieur 
+;;;
+;;; 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 tests messaging)
+  #:use-module (gnu tests)
+  #:use-module (gnu system)
+  #:use-module (gnu system grub)
+  #:use-module (gnu system file-systems)
+  #:use-module (gnu system shadow)
+  #:use-module (gnu system vm)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services messaging)
+  #:use-module (gnu services networking)
+  #:use-module (gnu packages messaging)
+  #:use-module (guix gexp)
+  #:use-module (guix store)
+  #:use-module (guix monads)
+  #:export (%test-prosody))
+
+(define %base-os
+  (operating-system
+(host-name "komputilo")
+(timezone "Europe/Berlin")
+(locale "en_US.UTF-8")
+
+(bootloader (grub-configuration (device "/dev/sdX")))
+(file-systems %base-file-systems)
+(firmware '())
+(users %base-user-accounts)
+(services (cons (dhcp-client-service)
+%base-services
+
+(define (os-with-service service)
+  "Return a test operating system that runs SERVICE."
+  (operating-system
+(inherit %base-os)
+(services (cons service
+(operating-system-user-services %base-os)
+
+(define (run-xmpp-test name xmpp-service pid-file create-account)
+  "Run a test of an OS running XMPP-SERVICE, which writes its PID to PID-FILE."
+  (mlet* %store-monad ((os -> (marionette-operating-system
+   (os-with-service xmpp-service)
+   #:imported-modules '((gnu services herd
+   (command (system-qemu-image/shared-store-script
+ os #:graphic? #f))
+   (username -> "alice")
+   (server -> "localhost")
+   (jid -> (string-append username "@" server))
+   (password -> "correct horse battery staple")
+   (port -> 15222)
+   (message -> "hello world"))
+
+(define script.ft
+  (scheme-file
+   "script.ft"
+   #~(begin
+   (define (handle-received-message time from nickname message)
+ (if (equal? message #$message)
+ (ft-quit 0)
+ (ft-quit 1)))
+   (add-hook! ft-message-receive-hook handle-received-message)
+
+   (ft-set-jid! #$jid)
+   (ft-set-password! #$password)
+   (ft-set-server! #$server)
+   (ft-set-port! #$port)
+   (ft-set-sslconn! #f)
+   (ft-connect-blocking)
+   (ft-send-message #$jid #$message)
+   (ft-main-loop
+
+(define test
+  (with-imported-modules '((gnu build marionette))
+#~(begin
+(use-modules (gnu build marionette)
+ (srfi srfi-64))
+
+   

[PATCH 0/2] Add a test for the Prosody service.

2017-02-05 Thread Clément Lassieur
These patches add a test for the Prosody service.  I chose to use GNU Freetalk
as the XMPP client because it is scriptable through a Guile interface.

Thanks for your feedback!

Clément Lassieur (2):
  service: shepherd: Replace spaces with hyphens in file names.
  tests: Add 'prosody-service-type' test.

 gnu/services/messaging.scm |   5 +-
 gnu/services/shepherd.scm  |   2 +
 gnu/tests/messaging.scm| 175 +
 3 files changed, 180 insertions(+), 2 deletions(-)
 create mode 100644 gnu/tests/messaging.scm

-- 
2.11.0




[PATCH 1/2] service: shepherd: Replace spaces with hyphens in file names.

2017-02-05 Thread Clément Lassieur
* gnu/services/shepherd.scm (shepherd-service-file-name): Update
  'match-lambda' accordingly.

This fixes a bug whereby names of files defining services would be invalid if
'provisions' contained more than one element.
---
 gnu/services/shepherd.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index d8d5006ab..583122054 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès 
+;;; Copyright © 2017 Clément Lassieur 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -195,6 +196,7 @@ stored."
 (string-append "shepherd-"
(string-map (match-lambda
  (#\/ #\-)
+ (#\  #\-)
  (chr chr))
provisions)
".scm")))
-- 
2.11.0




Re: [Install guix packages to non-default]: Unable to build derivation hello

2017-02-05 Thread rohit yadav
​Hi,

Thanks for the reply. I am running guix-daemon with --non-substitute
option. And the error posted actually complains about Error 404. I am not
sure, if it is happening because of firewall. Although, I tried the
suggested method also but result is still the same. I cleaned up the store
with "guix gc" and restarted for scratch. Additionally, I am unable to
understand why "linux-libre" is required to install a hello program?

Thanks,
Rohit



On Sun, Feb 5, 2017 at 5:29 AM, ng0  wrote:

> guix package --fallback --install hello


Re: Add /usr/bin/env by default in guixsd?

2017-02-05 Thread huang_ying_caritas
Hi, Ludo,

l...@gnu.org (Ludovic Courtès) writes:

> Hi!
>
> Sorry for the delay.  I secretly hope somebody would answer, but this is
> such a hot topic that nobody dared.  ;-)
>
> "Huang, Ying"  skribis:
>
>> It is a common practice to use /usr/bin/env in script shabang to use the
>> interpreter find in PATH.  For example, something as follow,
>>
>> #!/usr/bin/env python
>>
>> Although it is not necessary for scripts packaged in guix, if the
>> scripts are written by a user for his own usage and he don't want to
>> package it, it is good to have /usr/bin/env available.  In this way, the
>> interpreters in ~/.guix-profile/bin will be used.
>>
>> So how about add /usr/bin/env by default in guixsd?
>
> For the record this has been discussed in the past:
>
>   https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00414.html

Thanks a lot for being patient.

> There was no clear consensus.
>
> Of course there are simple ways to add it, several of which were given
> in the thread.
>
> The subject does come up every once in a while though, so we really need
> to address it one way or another.  :-)
>
> First we need a simple ‘special-files’ service or something (for /bin/sh
> and /usr/bin/env).
>
> Then the whole battle will be about what the default should be.  I used
> to be affiliated with the “no way!” party on this topic, but I
> considering changing my mind.  :-)  Especially that it does not matter
> that much, after all.

That sounds great for me!  Thanks!

> Ricardo, anyone, thoughts?
>
> Ludo’.

Best Regards,
Huang, Ying




Re: hackage importer broken

2017-02-05 Thread Federico Beffa
On Fri, Feb 3, 2017 at 2:53 PM, Federico Beffa  wrote:
> Hi,
>
> I notice that with a recent Guix checkout (commit
> d8e85b20325073d90cfaf3060889d59d91362deb) the hackage importer doesn't
> work and the problem seems to be with Guile itself or the lalr parser
> coming with it:
>
> ---
> GNU Guile 2.0.13
> Copyright (C) 1995-2016 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> ,m (guix import hackage)
> scheme@(guix import hackage)> (canonical-newline-port (http-fetch
> "https://hackage.haskell.org/package/hmatrix/hmatrix.cabal;
> #:verify-certificate? #f))
> $2 = #
> scheme@(guix import hackage)> (read-cabal $2)
> system/base/lalr.upstream.scm:1851:2: In procedure ___push:
> system/base/lalr.upstream.scm:1851:2: Wrong number of arguments to
> #
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guix import hackage) [1]> ,locals
>   Local variables:
>   $3 = delta = 1
>   $4 = new-category = 6
>   $5 = lvalue = (# #)
> While executing meta-command:
> ERROR: In procedure frame-local-ref: Argument 2 out of range: 3
> scheme@(guix import hackage) [1]>
> ---
>
> Notice that inspecting the stack of the backtrace results in an error!
>
> The importer does work as expected with Guile 2.0.11:
>
> ---
> GNU Guile 2.0.11
> Copyright (C) 1995-2014 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> ,m (guix import hackage)
> scheme@(guix import hackage)> (canonical-newline-port (http-fetch
> "https://hackage.haskell.org/package/hmatrix/hmatrix.cabal;
> #:verify-certificate? #f))
> $1 = #
> scheme@(guix import hackage)> (read-cabal $1)
> $2 = (("name" ("hmatrix")) ("version" ("0.18.0.0")) ("license"
> ("BSD3")) ("license-file" ("LICENSE")) ("author" ("Alberto Ruiz"))
> ("maintainer" ("Alberto Ruiz")) ("stability" ("provisional"))
> ("homepage" ("https://github.com/albertoruiz/hmatrix;)) ("synopsis"
> ("Numeric Linear Algebra")) ("description" ("Linear systems, matrix
> decompositions, and other numerical computations based on BLAS and
> LAPACK. . Standard interface: \"Numeric.LinearAlgebra\". . Safer
> interface with statically checked dimensions:
> \"Numeric.LinearAlgebra.Static\". . Code examples:
> ")) ("category"
> ("Math")) ("tested-with" ("GHC==8.0")) ("cabal-version" (">=1.8"))
> ("build-type" ("Simple")) ("extra-source-files" ("THANKS.md
> CHANGELOG")) ("extra-source-files" ("src/Internal/C/lapack-aux.h"))
> (section flag "openblas" (("description" ("Link with OpenBLAS
> (https://github.com/xianyi/OpenBLAS) optimized libraries."))
> ("default" ("False")) ("manual" ("True" (section library
> (("build-depends" ("base >= 4.8 && < 5, binary, array, deepseq,
> random, split, bytestring, storable-complex, vector >= 0.8"))
> ("hs-source-dirs" ("src")) ("exposed-modules" ("Numeric.LinearAlgebra
> Numeric.LinearAlgebra.Devel Numeric.LinearAlgebra.Data
> Numeric.LinearAlgebra.HMatrix Numeric.LinearAlgebra.Static"))
> ("other-modules" ("Internal.Vector Internal.Devel Internal.Vectorized
> Internal.Matrix Internal.ST Internal.IO Internal.Element
> Internal.Conversion Internal.LAPACK Internal.Numeric
> Internal.Algorithms Internal.Random Internal.Container Internal.Sparse
> Internal.Convolution Internal.Chain Numeric.Vector Internal.CG
> Numeric.Matrix Internal.Util Internal.Modular Internal.Static"))
> ("c-sources" ("src/Internal/C/lapack-aux.c
> src/Internal/C/vector-aux.c")) ("extensions"
> ("ForeignFunctionInterface")) ("ghc-options" ("-Wall
> -fno-warn-missing-signatures -fno-warn-orphans -fprof-auto"))
> ("cc-options" ("-O4 -Wall")) (if (arch "x86_64") (("cc-options"
> ("-msse2"))) ()) (if (arch "i386") (("cc-options" ("-msse2"))) ()) (if
> (os "OSX") ((if (flag "openblas") (("extra-lib-dirs"
> ("/opt/local/lib/openblas/lib")) ("extra-libraries" ("openblas")))
> (("extra-libraries" ("blas lapack" ("extra-lib-dirs"
> ("/opt/local/lib/")) ("include-dirs" ("/opt/local/include/"))
> ("extra-lib-dirs" ("/usr/local/lib/")) ("include-dirs"
> ("/usr/local/include/")) (if (arch "i386") (("cc-options" ("-arch
> i386"))) ()) ("frameworks" ("Accelerate"))) ()) (if (os "freebsd")
> ((if (flag "openblas") (("extra-lib-dirs"
> ("/usr/local/lib/openblas/lib")) 

font-build-system

2017-02-05 Thread ng0
Hi,

we have 20 - 25 fonts (I didn't really count), and only 2 are using a

system* make args

in their build phase, every other font just extracts, creates folders
and copies the fonts to the folders.
This is much repetition which could be avoided by just calling a build
system, rather than applying changes to fonts over and over again.

It looks like this can be achieved by something as small as the emacs
build-system. Would anyone give it a try?
-- 
ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [PATCH] gnu: font-gnu-unifont: Call mkfontdir for pcf output

2017-02-05 Thread Huang, Ying
"Huang, Ying"  writes:

> Hi, Wenwu,
>
> Thanks for comments!
>
> iyzs...@member.fsf.org (宋文武) writes:
>
>> huang_ying_cari...@163.com writes:
>>
>>> * gnu/packages/fonts.scm (font-gnu-unifont): call mkfontdir for pcf output.
>>>
>>> Signed-off-by: "Huang, Ying" 
>>> ---
>>>  gnu/packages/fonts.scm | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
>>> index 1f6d1d0c3..088a6bec9 100644
>>> --- a/gnu/packages/fonts.scm
>>> +++ b/gnu/packages/fonts.scm
>>> @@ -671,13 +671,15 @@ languages, plus Greek and Cyrillic.")
>>> (string-append "PCFDEST=" pcf)
>>> (string-append "CONSOLEDEST=" psf)
>>> "install")
>>> +  (system* "mkfontdir" pcf)
>>
>> This will create 'share/fonts/misc/fonts.dir' in the 'pcf' output of
>> font-gnu-unifont package.  When multiple packages have this file,
>> collisions occour and then I guess it won't work as expected.
>
> I think so too.
>
>> The right
>> place to create this file is the 'fonts-dir-file' hook in profiles.scm,
>> currently it does 'mkfontscale' and 'mkfontdir' only for truetype fonts
>> under 'share/fonts/truetype', which can be extended for each directory
>> under 'share/fonts'.  What do you think?
>
> I think that is better.  I have thought about that before.  But I didn't
> know whether that is necessary in general at that time.

One problem of this solution is that some font packages (for example,
fonts-misc-misc) already have fonts.dir, to avoid conflict, it is better
to remove fonts.dir in all font packages and generate fonts.dir in
fonts-dir-file,  I think that is good.  But I don't know whether others
think that is a good idea.

Best Regards,
Huang, Ying





Re: Add /usr/bin/env by default in guixsd?

2017-02-05 Thread Ludovic Courtès
Hi!

Sorry for the delay.  I secretly hope somebody would answer, but this is
such a hot topic that nobody dared.  ;-)

"Huang, Ying"  skribis:

> It is a common practice to use /usr/bin/env in script shabang to use the
> interpreter find in PATH.  For example, something as follow,
>
> #!/usr/bin/env python
>
> Although it is not necessary for scripts packaged in guix, if the
> scripts are written by a user for his own usage and he don't want to
> package it, it is good to have /usr/bin/env available.  In this way, the
> interpreters in ~/.guix-profile/bin will be used.
>
> So how about add /usr/bin/env by default in guixsd?

For the record this has been discussed in the past:

  https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00414.html

There was no clear consensus.

Of course there are simple ways to add it, several of which were given
in the thread.

The subject does come up every once in a while though, so we really need
to address it one way or another.  :-)

First we need a simple ‘special-files’ service or something (for /bin/sh
and /usr/bin/env).

Then the whole battle will be about what the default should be.  I used
to be affiliated with the “no way!” party on this topic, but I
considering changing my mind.  :-)  Especially that it does not matter
that much, after all.

Ricardo, anyone, thoughts?

Ludo’.



Re: [PATCH v2] gnu: new re2c package, version 0.16

2017-02-05 Thread ng0
Hi,

I've applied and build this, and I have other remarks:

The commit message should look like this:

gnu: Add re2c.

* gnu/packages/re2c.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add re2c.scm.



The "tested on(...)" is more of a personal note and not needed in the
commit message.

I get no difference to the re2c package I have (identical build) so when
those changes will be applied it's good to go from my side.

On 17-02-05 10:34:47, Sergei Trofimovich wrote:
> Tested on x86_64-linux and i686-linux.
> 
> * gnu/local.mk: add re2c.scm to dist
> * gnu/packages/re2c.scm: new file
> 
> CC: ng0 
> Signed-off-by: Sergei Trofimovich 
> ---
> Change since v1: texinfo-ified descriotion as suggested by ng0
> 
>  gnu/local.mk  |  1 +
>  gnu/packages/re2c.scm | 47 +++
>  2 files changed, 48 insertions(+)
>  create mode 100644 gnu/packages/re2c.scm
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 0948321c9..5c1634e02 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =  \
>%D%/packages/ratpoison.scm \
>%D%/packages/rdesktop.scm  \
>%D%/packages/rdf.scm   \
> +  %D%/packages/re2c.scm  \
>%D%/packages/readline.scm  \
>%D%/packages/regex.scm \
>%D%/packages/rrdtool.scm   \
> diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm
> new file mode 100644
> index 0..c7f296638
> --- /dev/null
> +++ b/gnu/packages/re2c.scm
> @@ -0,0 +1,47 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2017 Sergei Trofimovich 
> +;;;
> +;;; 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 re2c)
> +  #:use-module (guix licenses)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system gnu))
> +
> +(define-public re2c
> +  (package
> +(name "re2c")
> +(version "0.16")
> +(source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/skvadrik/; name
> + "/releases/download/" version "/"
> + name "-" version ".tar.gz"))
> + (sha256
> +  (base32
> +   "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8"
> +(build-system gnu-build-system)
> +(home-page "http://re2c.org/;)
> +(synopsis "Lexer generator for C/C++")
> +(description
> + "@code{re2c} generates minimalistic hard-coded state machine (as opposed
> +to full-featured table-based lexers).  Flexible API allows generated code
> +to be wired into virtually any environment.  Instead of exposing traditional
> +@code{yylex()} style API, re2c exposes its internals.  Be sure to take a look
> +at examples, they cover a lot of real-world cases and shed some light on dark
> +corners of re2c API.")
> +(license public-domain)))
> -- 
> 2.11.1
> 

-- 
ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [PATCH] gnu: new re2c package, version 0.16

2017-02-05 Thread ng0
On 17-02-05 10:55:59, Sergei Trofimovich wrote:
> On Sun, 5 Feb 2017 00:47:30 +
> ng0  wrote:
> 
> > On 17-02-04 17:43:23, Sergei Trofimovich wrote:
> > > Tested on x86_64-linux and i686-linux.
> > > 
> > > * gnu/local.mk: add re2c.scm to dist
> > > * gnu/packages/re2c.scm: new file  
> > 
> > Cool! I had the same package somewhere, thanks for publishing yours :)
> > I think there's already a module this could go into. If there isn't (I
> > will check tomorrow), what about a more generic name which could hold a
> > class of applications? Just an idea.
> 
> I mimicked flex which resides in standalone flex.scm.

Oh. In this case it's okay.

> > I haven't run the code, these are just my initial remarks. Overall it
> > looks good, so the only criticism is really in the (description).
> 
> > I think the beginning should be "Re2c (...)" or "@code{re2c} (...)"
> > 
> > > +full-featured table-based lexers).  Flexible API allows generated code to
> > > +be wired into virtually any environment.  Instead of exposing traditional
> > > +yylex() style API, re2c exposes its internals.  Be sure to take a look 
> > > at  
> 
> Fixed in v2 patch.
> 
> > I'm not sure, but I think the "yylex()" will have to be written as
> > @code{yylex()} or something similar.
> > 
> > > +examples, they cover a lot of real-world cases and shed some light on 
> > > dark
> > > +corners of re2c API.")  
> 
> Fixed in v2 patch.

I want someone to double check this. This is an area I don't know much
about, I personally would avoid it and would just write

@code{yylex} style API

but I'd rather would wait for someone who knows more about this.
> > I think "corners of the re2c API." would be correct?
> 
> Author's spelling:
> https://raw.githubusercontent.com/skvadrik/re2c/gh-pages-gen/src/index.rst
> 
> I'm not sure which is right:
> 
> http://english.stackexchange.com/questions/10020/definite-article-before-schools-colleges-and-universities
> 
> -- 
> 
>   Sergei

I've read into rules for the use and omission of articles, and my gut
feeling is that you were right the first time (without "the").

-- 
ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [PATCH 2/2] gnu: Add python-lzo.

2017-02-05 Thread ng0
On 17-02-05 01:31:18, Maxim Cournoyer wrote:
> Hi ng0,
> 
> contact@cryptolab.net writes:
> 
> > From: ng0 
> >
> > * gnu/packages/compression.scm (python-lzo): New variable.
> >
> > Co-authored-by: Danny Milosavljevic 
> > ---
> >  gnu/packages/compression.scm | 36 
> >  1 file changed, 36 insertions(+)
> >
> > diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
> > index 64518fb6b..2545c4517 100644
> > --- a/gnu/packages/compression.scm
> > +++ b/gnu/packages/compression.scm
> > @@ -365,6 +365,42 @@ LZO is written in ANSI C.  Both the source code and 
> > the compressed data
> >  format are designed to be portable across platforms.")
> >  (license license:gpl2+)))
> >  
> > +(define-public python-lzo
> > +  (package
> > +(name "python-lzo")
> > +(version "1.11")
> > +(source
> > + (origin
> > +   (method url-fetch)
> > +   (uri (pypi-uri "python-lzo" version))
> > +   (sha256
> > +(base32
> > + "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q"
> > +(build-system python-build-system)
> > +(arguments
> > + `(#:test-target "check"
> > +   #:phases
> > +   (modify-phases %standard-phases
> > + (add-after 'unpack 'patch-setuppy
> > +   (lambda _
> > + (substitute* "setup.py"
> > +   (("include_dirs.append.*")
> > +(string-append "include_dirs.append(\""
> > +   (assoc-ref %build-inputs "lzo") 
> > "/include/lzo" "\")
> > +"
> 
> A bit hard to read/long line here. Maybe the various string components
> being appended could be aligned below the string-append call? Also, you
> could use single quotes for the Python code which might help to
> differentiate what is what.

It is already applied. I think "it's hard to read" is more than just a
cosmetic fix, so if you have an idea how to make this more readable,
feel free to send a patch.

> Is the guix linter happy?
> 
> > +(inputs
> > + `(("lzo" ,lzo)))
> > +(home-page "https://github.com/jd-boyd/python-lzo;)
> > +(synopsis "Python bindings for the LZO data compression library")
> > +(description
> > + "Python-LZO provides Python bindings for LZO, i.e. you can access
> > +the LZO library from your Python scripts thereby compressing ordinary
> > +Python strings.")
> > +(license license:gpl2+)))
> > +
> > +(define-public python2-lzo
> > +  (package-with-python2 python-lzo))
> > +
> >  (define-public lzop
> >(package
> >  (name "lzop")
> 
> Otherwise these 2 patches LGTM!
> 
> Maxim



-- 
ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [Install guix packages to non-default]: Unable to build derivation hello

2017-02-05 Thread ng0
Hi,

I don't reply to the entire issue, for a comment see below.
On 17-02-05 02:53:11, rohit yadav wrote:
> Hi,
> 
> I am trying to install guix packages to a non-default location to benefit
> from guix on machines with no root privileges. Following the below
> mentioned article, I am able to install guix and run guix-daemon configured
> to a non-default location. However, when I trying to install even a basic
> hello package, the guix goes on to install large number of derivations. And
> fails while trying to pull linux-libre (why is this needed for hello
> package?). I am not sure why it is unable to pull the src packages to build
> from scratch.
> 
> Hope to hear soon.
> 
> Thanks,
> Rohit
> 
> The terminal output is attached below:
> 
> 
> *ubuntu@ubuntu-xenial*:*~*$ guix package -i hello
> 
> The following package will be installed:
> 
>hello2.10
> /home/royadav/opt/guix/local/gnu/store/my4vxpk417bgq21i803fs3shbhqhz53a-hello-2.10
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> http://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
> ..
> 
> ERROR: download failed "
> http://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
> 404 "Not Found"

In this case, no binary substitute is found. You need to run
"guix package --fallback --install hello" when no substitutes
are found. 
"--fallback" falls back to building (from source) when no
substitute is found.

> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-4.4.18-gnu.tar.xz...
> 
> ERROR: Throw to key `ftp-error' with args `(#
> "RETR linux-libre-4.4.18-gnu.tar.xz" 550 "Failed to open file.\r")'.
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> http://ftpmirror.gnu.org/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
> ..
> 
> following redirection to `
> http://mirrors.kernel.org/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz'.
> ..
> 
> ERROR: download failed "
> http://mirrors.kernel.org/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
> 404 "Not Found"
> 
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> ftp://ftp.cs.tu-berlin.de/pub/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
> ..
> 
> ERROR: In procedure connect*: Connection timed out
> 
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
> ..
> 
> ERROR: Throw to key `ftp-error' with args `(# "CWD
> 4.4.18-gnu" 550 "Can't change directory to 4.4.18-gnu: No such file or
> directory\r")'.
> 
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> http://ftp.gnu.org/pub/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
> ..
> 
> ERROR: download failed "
> http://ftp.gnu.org/pub/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
> 404 "Not Found"
> 
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> http://mirror.hydra.gnu.org/file/fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps.
> ..
> 
> ERROR: download failed "
> http://mirror.hydra.gnu.org/file/fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps;
> 404 "Not Found"
> 
> 
> Starting download of
> /home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz
> 
> From
> http://tarballs.nixos.org/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps.
> ..
> 
> ERROR: download failed "
> http://tarballs.nixos.org/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps;
> 404 "Not Found"
> 
> failed to download
> "/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz"
> from ("
> http://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
> "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-4.4.18-gnu.tar.xz;
> "mirror://gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz")
> 
> builder for
> `/home/royadav/opt/guix/local/gnu/store/19qni5ycaxbpgl6na69k0fg6yf7v69l5-linux-libre-4.4.18-gnu.tar.xz.drv'
> failed to produce output path
> 

Re: guix can't find (gnutls)

2017-02-05 Thread Federico Beffa
On Sun, Feb 5, 2017 at 9:38 AM, Alex Vong  wrote:
> Federico Beffa  writes:
>
>> Hi,
>>
>> for some reason Guix can't find (gnutls) despite the module being
>> installed and usable in Guile:
>>
> Are you running guixsd or runnign guix on a foreign distro?

I'm on Debian testing.

> I personally run guix on debian and had the same problem. I solved the
> problem by building gnutls from source and installing it into
> /usr/local. The problem is debian's gnutls doesn't contain
> gnutls-guile.
>
> One might suggests to install guix's gnutls and build guix using it, but
> it doesnt't work for me, so I resort to building from source.

I had a similar experience: I installed gnutls manually in /usr/local
and successfully compiled Guix.

However, for various reasons, I then wanted to recompile Guix with
Guix (and remove the manually installed gnutls and Debian Guile) and
that's where I was struggling to make things work. I fixed things as
in my reply to Alex Kost.

Thanks for your reply.
Fede



Re: [PATCH] gnu: new re2c package, version 0.16

2017-02-05 Thread Sergei Trofimovich
On Sun, 5 Feb 2017 00:47:30 +
ng0  wrote:

> On 17-02-04 17:43:23, Sergei Trofimovich wrote:
> > Tested on x86_64-linux and i686-linux.
> > 
> > * gnu/local.mk: add re2c.scm to dist
> > * gnu/packages/re2c.scm: new file  
> 
> Cool! I had the same package somewhere, thanks for publishing yours :)
> I think there's already a module this could go into. If there isn't (I
> will check tomorrow), what about a more generic name which could hold a
> class of applications? Just an idea.

I mimicked flex which resides in standalone flex.scm.

> I haven't run the code, these are just my initial remarks. Overall it
> looks good, so the only criticism is really in the (description).

> I think the beginning should be "Re2c (...)" or "@code{re2c} (...)"
> 
> > +full-featured table-based lexers).  Flexible API allows generated code to
> > +be wired into virtually any environment.  Instead of exposing traditional
> > +yylex() style API, re2c exposes its internals.  Be sure to take a look at  

Fixed in v2 patch.

> I'm not sure, but I think the "yylex()" will have to be written as
> @code{yylex()} or something similar.
> 
> > +examples, they cover a lot of real-world cases and shed some light on dark
> > +corners of re2c API.")  

Fixed in v2 patch.

> I think "corners of the re2c API." would be correct?

Author's spelling:
https://raw.githubusercontent.com/skvadrik/re2c/gh-pages-gen/src/index.rst

I'm not sure which is right:

http://english.stackexchange.com/questions/10020/definite-article-before-schools-colleges-and-universities

-- 

  Sergei


pgpafyA0UxvaF.pgp
Description: Цифровая подпись OpenPGP


Re: guix can't find (gnutls)

2017-02-05 Thread Federico Beffa
On Sat, Feb 4, 2017 at 8:02 PM, Alex Kost  wrote:
> Federico Beffa (2017-02-04 15:50 +0100) wrote:
>
>> Hi,
>>
>> for some reason Guix can't find (gnutls) despite the module being
>> installed and usable in Guile:
> [...]
>> Any suggestion?
>
> Check that guix-daemon is also started with GUILE_LOAD_[COMPILED_]PATH
> environment containing gnutls modules.


That's it!

I was test starting the daemon with "sudo guix-daemon
--build-users-group=guixbuild" from a shell with the GUILE_*
environment variables set correctly and things didn't work. Now I
defined those variables in the guix-daemon.system systemd unit and
things do work (I'm on Debian testing). I'm not sure of why the formed
didn't work, but the latter did it.

Thanks,
Fede



[PATCH v2] gnu: new re2c package, version 0.16

2017-02-05 Thread Sergei Trofimovich
Tested on x86_64-linux and i686-linux.

* gnu/local.mk: add re2c.scm to dist
* gnu/packages/re2c.scm: new file

CC: ng0 
Signed-off-by: Sergei Trofimovich 
---
Change since v1: texinfo-ified descriotion as suggested by ng0

 gnu/local.mk  |  1 +
 gnu/packages/re2c.scm | 47 +++
 2 files changed, 48 insertions(+)
 create mode 100644 gnu/packages/re2c.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 0948321c9..5c1634e02 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/ratpoison.scm   \
   %D%/packages/rdesktop.scm\
   %D%/packages/rdf.scm \
+  %D%/packages/re2c.scm\
   %D%/packages/readline.scm\
   %D%/packages/regex.scm   \
   %D%/packages/rrdtool.scm \
diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm
new file mode 100644
index 0..c7f296638
--- /dev/null
+++ b/gnu/packages/re2c.scm
@@ -0,0 +1,47 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Sergei Trofimovich 
+;;;
+;;; 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 re2c)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public re2c
+  (package
+(name "re2c")
+(version "0.16")
+(source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/skvadrik/; name
+ "/releases/download/" version "/"
+ name "-" version ".tar.gz"))
+ (sha256
+  (base32
+   "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8"
+(build-system gnu-build-system)
+(home-page "http://re2c.org/;)
+(synopsis "Lexer generator for C/C++")
+(description
+ "@code{re2c} generates minimalistic hard-coded state machine (as opposed
+to full-featured table-based lexers).  Flexible API allows generated code
+to be wired into virtually any environment.  Instead of exposing traditional
+@code{yylex()} style API, re2c exposes its internals.  Be sure to take a look
+at examples, they cover a lot of real-world cases and shed some light on dark
+corners of re2c API.")
+(license public-domain)))
-- 
2.11.1




Re: [PATCH] gnu: font-gnu-unifont: Call mkfontdir for pcf output

2017-02-05 Thread Huang, Ying
Hi, Wenwu,

Thanks for comments!

iyzs...@member.fsf.org (宋文武) writes:

> huang_ying_cari...@163.com writes:
>
>> * gnu/packages/fonts.scm (font-gnu-unifont): call mkfontdir for pcf output.
>>
>> Signed-off-by: "Huang, Ying" 
>> ---
>>  gnu/packages/fonts.scm | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
>> index 1f6d1d0c3..088a6bec9 100644
>> --- a/gnu/packages/fonts.scm
>> +++ b/gnu/packages/fonts.scm
>> @@ -671,13 +671,15 @@ languages, plus Greek and Cyrillic.")
>> (string-append "PCFDEST=" pcf)
>> (string-append "CONSOLEDEST=" psf)
>> "install")
>> +  (system* "mkfontdir" pcf)
>
> This will create 'share/fonts/misc/fonts.dir' in the 'pcf' output of
> font-gnu-unifont package.  When multiple packages have this file,
> collisions occour and then I guess it won't work as expected.

I think so too.

> The right
> place to create this file is the 'fonts-dir-file' hook in profiles.scm,
> currently it does 'mkfontscale' and 'mkfontdir' only for truetype fonts
> under 'share/fonts/truetype', which can be extended for each directory
> under 'share/fonts'.  What do you think?

I think that is better.  I have thought about that before.  But I didn't
know whether that is necessary in general at that time.

Best Regards,
Huang, Ying




Re: [PATCH -v3] Fix gtk-im-modules for gtk+3

2017-02-05 Thread Huang, Ying
Hi, Wenwu,

Thanks for comments.

iyzs...@member.fsf.org (宋文武) writes:

> huang_ying_cari...@163.com writes:
>
>> From: "Huang, Ying" 
>>
>> Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be 
>> find
>> in output "bin" instead of "out".
>>
>> * guix/profiles.scm (manifest-lookup-package): New argument output to select
>>   package or store path.
>>   (gtk-im-modules): Use "bin" output to find gtk-query-immodules-3.0
>>
>> The fix works, but appears hacky, because I haven't read much guix source
>> code, so I don't know the best solution.
>>
>
> Thank you!  The patch looks good to me, but:
>
> I think we can split this into 2 patches, one for adding output
> selecting to 'manifest-lookup-package' and another for fixing
> 'gtk-im-modules'.

OK for me.  If no others have objection, I will split the patch.

> And to fix 'gtk-im-modules', we can pass the path of current
> 'gtk-query-modules-x.x' instead of the one in profile to the build
> procedure, so users don't need to install gtk+:bin explicitly (but it
> always pull in the dependency of latest gtk+:bin).  This may or may not
> be the desired behavior...

Yes.  It is better not to force gtk+:bin to be installed into profile.

> Here is what I mean:
>
> [attachment]
>
> 0001-profiles-gtk-im-modules-Fix-for-gtk3.patch
>
> From 54a9b4de63f87084984a1632800a039b155592f0 Mon Sep 17 00:00:00 2001
> From: "huang_ying_cari...@163.com" 
> Date: Sun, 5 Feb 2017 13:41:47 +0800
> Subject: [PATCH] profiles: gtk-im-modules: Fix for gtk3.
>
> Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be find
> in output "bin" instead of "out".
>
> * guix/profiles.scm (gtk-im-modules): Pass the path of gtk-query-immodules-x.x
> as 'query' argument to the 'build' procedure.
> ---
>  guix/profiles.scm | 20 ++--
>  1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/guix/profiles.scm b/guix/profiles.scm
> index 495a9e2e7..cb93b8b67 100644
> --- a/guix/profiles.scm
> +++ b/guix/profiles.scm
> @@ -739,7 +739,7 @@ for both major versions of GTK+."
>(mlet %store-monad ((gtk+   (manifest-lookup-package manifest "gtk+" "3"))
>(gtk+-2 (manifest-lookup-package manifest "gtk+" "2")))
>  
> -(define (build gtk gtk-version)
> +(define (build gtk gtk-version query)
>(let ((major (string-take gtk-version 1)))
>  (with-imported-modules '((guix build utils)
>   (guix build union)
> @@ -756,8 +756,6 @@ for both major versions of GTK+."
>  
>(let* ((prefix  (string-append "/lib/gtk-" #$major ".0/"
>   #$gtk-version))
> - (query   (string-append #$gtk 
> "/bin/gtk-query-immodules-"
> - #$major ".0"))
>   (destdir (string-append #$output prefix))
>   (moddirs (cons (string-append #$gtk prefix "/immodules")
>  (filter file-exists?
> @@ -768,7 +766,7 @@ for both major versions of GTK+."
>  
>  ;; Generate a new immodules cache file.
>  (mkdir-p (string-append #$output prefix))
> -(let ((pipe(apply open-pipe* OPEN_READ query modules))
> +(let ((pipe(apply open-pipe* OPEN_READ #$query modules))
>(outfile (string-append #$output prefix
>"/immodules-gtk" #$major 
> ".cache")))
>(dynamic-wind
> @@ -784,8 +782,18 @@ for both major versions of GTK+."
>  
>  ;; Don't run the hook when there's nothing to do.
>  (let ((gexp #~(begin
> -#$(if gtk+   (build gtk+   "3.0.0")  #t)
> -#$(if gtk+-2 (build gtk+-2 "2.10.0") #t
> +#$(if gtk+
> +  (build
> +   gtk+ "3.0.0"
> +   #~(string-append
> +  #$gtk+:bin "/bin/gtk-query-immodules-3.0"))

If "gtk+" is store path instead of package, this doesn't work.  In a
previous version, "gtk+" will be store path, it is package now.  If it
will always be package in the future.  We can pass the store path of
target output too.

Best Regards,
Huang, Ying

> +  #t)
> +#$(if gtk+-2
> +  (build
> +   gtk+-2 "2.10.0"
> +   #~(string-append
> +  #$gtk+-2 "/bin/gtk-query-immodules-2.0"))
> +  #t
>(if (or gtk+ gtk+-2)
>(gexp->derivation "gtk-im-modules" gexp
>  #:local-build? #t




Re: [PATCH 2/2] gnu: Add python-lzo.

2017-02-05 Thread Maxim Cournoyer
Hi ng0,

contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/compression.scm (python-lzo): New variable.
>
> Co-authored-by: Danny Milosavljevic 
> ---
>  gnu/packages/compression.scm | 36 
>  1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
> index 64518fb6b..2545c4517 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -365,6 +365,42 @@ LZO is written in ANSI C.  Both the source code and the 
> compressed data
>  format are designed to be portable across platforms.")
>  (license license:gpl2+)))
>  
> +(define-public python-lzo
> +  (package
> +(name "python-lzo")
> +(version "1.11")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "python-lzo" version))
> +   (sha256
> +(base32
> + "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q"
> +(build-system python-build-system)
> +(arguments
> + `(#:test-target "check"
> +   #:phases
> +   (modify-phases %standard-phases
> + (add-after 'unpack 'patch-setuppy
> +   (lambda _
> + (substitute* "setup.py"
> +   (("include_dirs.append.*")
> +(string-append "include_dirs.append(\""
> +   (assoc-ref %build-inputs "lzo") 
> "/include/lzo" "\")
> +"

A bit hard to read/long line here. Maybe the various string components
being appended could be aligned below the string-append call? Also, you
could use single quotes for the Python code which might help to
differentiate what is what.

Is the guix linter happy?

> +(inputs
> + `(("lzo" ,lzo)))
> +(home-page "https://github.com/jd-boyd/python-lzo;)
> +(synopsis "Python bindings for the LZO data compression library")
> +(description
> + "Python-LZO provides Python bindings for LZO, i.e. you can access
> +the LZO library from your Python scripts thereby compressing ordinary
> +Python strings.")
> +(license license:gpl2+)))
> +
> +(define-public python2-lzo
> +  (package-with-python2 python-lzo))
> +
>  (define-public lzop
>(package
>  (name "lzop")

Otherwise these 2 patches LGTM!

Maxim


signature.asc
Description: PGP signature


problem of guix refresh

2017-02-05 Thread tumashu
guix refresh's  error
--
bash-4.4$ guix refresh
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:2699:13: xf86-video-geode 
would be upgraded from 2.11.18 to 2.11.19
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:1552:13: presentproto 
would be upgraded from 1.0 to 1.1
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:4829:13: libxi would be 
upgraded from 1.7.8 to 1.7.9
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:4992:13: xorg-server would 
be upgraded from 1.18.4 to 1.19.1
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:4678:13: xproto would be 
upgraded from 7.0.29 to 7.0.31
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:2887:13: xf86-video-mga 
would be upgraded from 1.6.5 to 1.9.100
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:3758:13: xkeyboard-config 
would be upgraded from 2.18 to 2.20
/home/feng/.config/guix/latest/gnu/packages/xorg.scm:1813:13: util-macros would 
be upgraded from 1.19.0 to 1.19.1
/home/feng/.config/guix/latest/gnu/packages/xml.scm:655:13: 
perl-xml-compile-wsdl11 would be upgraded from 3.05 to 3.06
/home/feng/.config/guix/latest/gnu/packages/xml.scm:627:13: 
perl-xml-compile-soap would be upgraded from 3.20 to 3.21
/home/feng/.config/guix/latest/gnu/packages/xml.scm:744:13: pugixml would be 
upgraded from 1.7 to 1.8.1
/home/feng/.config/guix/latest/gnu/packages/xdisorg.scm:179:13: xdotool would 
be upgraded from 3.20150503.1 to 3.20160805.1
/home/feng/.config/guix/latest/gnu/packages/wget.scm:36:13: wget would be 
upgraded from 1.18 to 1.19
/home/feng/.config/guix/latest/gnu/packages/web.scm:2546:13: perl-libwww would 
be upgraded from 6.15 to 6.18
/home/feng/.config/guix/latest/gnu/packages/web.scm:3082:13: perl-uri-find 
would be upgraded from 20140709 to 20160806
/home/feng/.config/guix/latest/gnu/packages/web.scm:2652:13: perl-net-amazon-s3 
would be upgraded from 0.60 to 0.80
/home/feng/.config/guix/latest/gnu/packages/web.scm:882:6: sassc would be 
upgraded from 3.2.5 to 3.4.2
/home/feng/.config/guix/latest/gnu/packages/web.scm:446:13: rapidjson would be 
upgraded from 1.0.2 to 1.1.0
/home/feng/.config/guix/latest/gnu/packages/web.scm:2902:13: 
perl-plack-test-externalserver would be upgraded from 0.01 to 0.02
/home/feng/.config/guix/latest/gnu/packages/web.scm:2747:13: perl-net-smtp-ssl 
would be upgraded from 1.03 to 1.04
/home/feng/.config/guix/latest/gnu/packages/web.scm:2945:13: 
perl-test-www-mechanize would be upgraded from 1.44 to 1.48
/home/feng/.config/guix/latest/gnu/packages/web.scm:3414:13: r-htmltable would 
be upgraded from 1.7 to 1.9
/home/feng/.config/guix/latest/gnu/packages/web.scm:2924:13: perl-test-tcp 
would be upgraded from 2.06 to 2.17
Backtrace:
In ice-9/eval.scm:
 432: 19 [eval # #]
In ice-9/boot-9.scm:
2404: 18 [save-module-excursion #]
4056: 17 [#]
1727: 16 [%start-stack load-stack ...]
1732: 15 [#]
In unknown file:
   ?: 14 [primitive-load 
"/gnu/store/c77gfhkmnwjvgmnsafjxf1g9kkpiilbh-guix-0.12.0-4.d9da/bin/.guix-real"]
In guix/ui.scm:
1228: 13 [run-guix-command refresh]
In ice-9/boot-9.scm:
 160: 12 [catch srfi-34 # ...]
 160: 11 [catch system-error ...]
In guix/scripts/refresh.scm:
 442: 10 [#]
 462: 9 [#]
In srfi/srfi-1.scm:
 616: 8 [for-each # ...]
In guix/scripts/refresh.scm:
 288: 7 [check-for-package-update # # # ...]
In guix/import/cpan.scm:
 274: 6 [latest-release #]
In ice-9/boot-9.scm:
 160: 5 [catch srfi-34 # ...]
In guix/import/json.scm:
  32: 4 [#]
In guix/http-client.scm:
 241: 3 [loop #]
In guix/build/download.scm:
 486: 2 [open-connection-for-uri # # #f ...]
 382: 1 [tls-wrap # "api.metacpan.org" ...]
In unknown file:
   ?: 0 [handshake #]

ERROR: In procedure handshake:
ERROR: Throw to key `gnutls-error' with args `(# handshake)'.



Re: [PATCH 3/7] gnu: Add python2-ruamel.ordereddict

2017-02-05 Thread Maxim Cournoyer
Hello Tobias,

Tobias Geerinckx-Rice  writes:

> Maxim,
>
> On 02/02/17 05:53, Maxim Cournoyer wrote:
>> Also, there are 2 spaces following the period.
>> 2 spaces following the period here also. Is this intended?
>
> Worse: it's mandatory ;-)
>

Haha! I had missed that somehow. Good to know!

Thanks,

Maxim


signature.asc
Description: PGP signature


[Install guix packages to non-default]: Unable to build derivation hello

2017-02-05 Thread rohit yadav
Hi,

I am trying to install guix packages to a non-default location to benefit
from guix on machines with no root privileges. Following the below
mentioned article, I am able to install guix and run guix-daemon configured
to a non-default location. However, when I trying to install even a basic
hello package, the guix goes on to install large number of derivations. And
fails while trying to pull linux-libre (why is this needed for hello
package?). I am not sure why it is unable to pull the src packages to build
from scratch.

Hope to hear soon.

Thanks,
Rohit

The terminal output is attached below:


*ubuntu@ubuntu-xenial*:*~*$ guix package -i hello

The following package will be installed:

   hello2.10
/home/royadav/opt/guix/local/gnu/store/my4vxpk417bgq21i803fs3shbhqhz53a-hello-2.10

Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
http://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
..

ERROR: download failed "
http://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
404 "Not Found"

Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

>From ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-4.4.18-gnu.tar.xz...

ERROR: Throw to key `ftp-error' with args `(#
"RETR linux-libre-4.4.18-gnu.tar.xz" 550 "Failed to open file.\r")'.

Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
http://ftpmirror.gnu.org/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
..

following redirection to `
http://mirrors.kernel.org/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz'.
..

ERROR: download failed "
http://mirrors.kernel.org/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
404 "Not Found"


Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
ftp://ftp.cs.tu-berlin.de/pub/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
..

ERROR: In procedure connect*: Connection timed out


Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
..

ERROR: Throw to key `ftp-error' with args `(# "CWD
4.4.18-gnu" 550 "Can't change directory to 4.4.18-gnu: No such file or
directory\r")'.


Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
http://ftp.gnu.org/pub/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz.
..

ERROR: download failed "
http://ftp.gnu.org/pub/gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
404 "Not Found"


Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
http://mirror.hydra.gnu.org/file/fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps.
..

ERROR: download failed "
http://mirror.hydra.gnu.org/file/fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps;
404 "Not Found"


Starting download of
/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz

From
http://tarballs.nixos.org/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps.
..

ERROR: download failed "
http://tarballs.nixos.org/sha256/0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps;
404 "Not Found"

failed to download
"/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz"
from ("
http://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz;
"ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-4.4.18-gnu.tar.xz;
"mirror://gnu/linux-libre/4.4.18-gnu/linux-libre-4.4.18-gnu.tar.xz")

builder for
`/home/royadav/opt/guix/local/gnu/store/19qni5ycaxbpgl6na69k0fg6yf7v69l5-linux-libre-4.4.18-gnu.tar.xz.drv'
failed to produce output path
`/home/royadav/opt/guix/local/gnu/store/gc4i3fsgliw4y7j4kc6ad1574h7qhdvb-linux-libre-4.4.18-gnu.tar.xz'

cannot build derivation
`/home/royadav/opt/guix/local/gnu/store/bx3zwbw5k9vdjkwaagrdhnajbvj4bxhq-linux-libre-headers-4.4.18.drv':
1 dependencies couldn't be built

cannot build derivation
`/home/royadav/opt/guix/local/gnu/store/98rmh5pbfx33z294l0z586hzqbyjfshd-mkfontdir-1.0.7.drv':
1 dependencies couldn't be built

guix package: error: build failed: build of
`/home/royadav/opt/guix/local/gnu/store/98rmh5pbfx33z294l0z586hzqbyjfshd-mkfontdir-1.0.7.drv'
failed

===


Re: guix can't find (gnutls)

2017-02-05 Thread Alex Vong
Federico Beffa  writes:

> Hi,
>
> for some reason Guix can't find (gnutls) despite the module being
> installed and usable in Guile:
>
Are you running guixsd or runnign guix on a foreign distro?

I personally run guix on debian and had the same problem. I solved the
problem by building gnutls from source and installing it into
/usr/local. The problem is debian's gnutls doesn't contain
gnutls-guile.

One might suggests to install guix's gnutls and build guix using it, but
it doesnt't work for me, so I resort to building from source.


signature.asc
Description: PGP signature