[PATCH] guix: gnu-build-system: add new phase patch-dot-desktop-files

2016-09-24 Thread John Darrington
From: John Darrington 


New patch as requested.




* guix/build/gnu-build-system.scm (patch-dot-desktop-files): New procedure.
---
 guix/build/gnu-build-system.scm | 46 +
 1 file changed, 46 insertions(+)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 93ddc9a..e5d2abf 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -544,6 +544,51 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
 outputs)
   #t)
 
+
+(define* (patch-dot-desktop-files #:key outputs inputs #:allow-other-keys)
+  "Replace any references to executables in .desktop files with their absolute
+path names."
+(define (find-binary binary output-dir inputs)
+  "Search for BINARY first in OUTPUT-DIR, then in the directories
+of INPUTS.  INPUTS is an alist where the directories are the cdrs.  If no
+suitable BINARY cannot be found return BINARY unchanged."
+
+  ;; Search for BINARY in the output directory,
+  ;; then all the input directories.
+  (let lp ((directories (cons output-dir
+  (map (lambda (input)
+ (match input ((_ . y) y))) inputs
+(if (null? directories)
+;; Leave unchanged if we cannot find the binary.
+binary
+(let ((resolv (find-files
+   (match directories ((x . _) x))
+   (lambda (file stat)
+ ;; The candidate file must be a regular file,
+ ;; have execute permission and the correct name.
+ (and stat
+  (eq? 'regular (stat:type stat))
+  (not (zero? (logand #o001 (stat:perms 
stat
+  (string=? (basename file) binary))
+
+  (if (null? resolv)
+  (lp (match directories ((_ . y) y)))
+  (match resolv ((x . _) x)))
+
+(for-each (match-lambda
+(( _ . output-dir)
+ (for-each (lambda (f)
+ (substitute* f
+   (("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary 
rest)
+(string-append
+ "Exec=" (find-binary binary output-dir 
inputs) rest))
+
+   (("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ binary 
rest)
+(string-append
+ "TryExec=" (find-binary binary output-dir 
inputs) rest
+   (find-files output-dir "\\.desktop$"
+  outputs) #t)
+
 (define %standard-phases
   ;; Standard build phases, as a list of symbol/procedure pairs.
   (let-syntax ((phases (syntax-rules ()
@@ -556,6 +601,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
 validate-runpath
 validate-documentation-location
 delete-info-dir-file
+patch-dot-desktop-files
 compress-documentation)))
 
 
-- 
2.10.0




[PATCH] gnu: Add optipng.

2016-09-24 Thread Arun Isaac
* gnu/packages/image.scm (optipng): New variable.
---
 gnu/packages/image.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 931cad1..b998f45 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -932,3 +932,35 @@ statistical tests.")
 all included libraries only the image loading and decoding library is
 installed as @code{stb_image}.")
   (license license:public-domain
+
+(define-public optipng
+  (package
+(name "optipng")
+(version "0.7.6")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append 
"http://prdownloads.sourceforge.net/optipng/optipng-";
+   version ".tar.gz"))
+   (sha256
+(base32
+ "105yk5qykvhiahzag67gm36s2kplxf6qn5hay02md0nkrcgn6w28"
+(build-system gnu-build-system)
+(inputs
+ `(("zlib" ,zlib)))
+(arguments
+ '(#:phases
+   (modify-phases %standard-phases
+ ;; configure script does not accept arguments CONFIG_SHELL and SHELL
+ (replace 'configure
+   (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "sh" "configure"
+ (string-append "--prefix=" (assoc-ref outputs 
"out")
+(synopsis "Optimizer that recompresses PNG image files to a
+smaller size")
+(description "OptiPNG is a PNG optimizer that recompresses image
+files to a smaller size, without losing any information.  This program
+also converts external formats (BMP, GIF, PNM and TIFF) to optimized
+PNG, and performs PNG integrity checks and corrections.")
+(home-page "http://optipng.sourceforge.net/";)
+(license license:zlib)))
-- 
2.10.0




Re: [PATCH 07/11] gnu: Add python-gunicorn.

2016-09-24 Thread ng0
Hartmut Goebel  writes:

> Am 13.09.2016 um 03:38 schrieb ng0:
>> * gnu/packages/python.scm (python-gunicorn): New variable.
>
> I submitted a patch for adding this to gnu/packages/web.scm.

Okay. Is there anything more python related you are about to add, so I
can avoid further duplicate work?
Considering the last private conversation: I think we should exchange
regulary (off-list, in private) what we are working on so our work can
be more effective (less collisions etc).

What do you think?

> Additionally I questioned whether this package should be called only
> "gnunicorn" since it it not a python *package* but a program.

I would've called it gunicorn, looking at it now.

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

-- 
  ng0



Re: [PATCH 1/2] gnu: gnunet: Add inputs.

2016-09-24 Thread ng0
Ricardo Wurmus  writes:

> ng0  writes:
>
>>> GNUnet doesn’t encode/decode ogg audio files, does it?
>>
>> It has this telephony feature (gnunet-conversation, despite the README
>> it no longer is experimental) and gnunet-helper-audio-record-gst
>> references ogg.
>> src/conversation/gnunet-helper-audio-record.c:41:#include 
>>
>> configure.ac:424:# libogg
>> configure.ac:425:AC_CHECK_LIB(ogg, ogg_stream_flush_fill,
>> configure.ac:426:[AC_CHECK_HEADERS([ogg/ogg.h],
>> configure.ac:428:  ogg=1
>> configure.ac:429:  AC_DEFINE(HAVE_OGG,1,[Have ogg]),
>> configure.ac:431:  ogg=0
>> configure.ac:432:  AC_DEFINE(HAVE_OGG,0,[lacking ogg]))],
>> configure.ac:434:ogg=0)
>
> Ah, thanks.  This makes sense.  I wonder if it were possible to split
> the applications.  Not now but in the future.  Would be nice to be able
> install these things separately.
>
> ~~ Ricardo

We continued this discussion for various reasons outside of the list.

On topic, this is not possible at the moment, however you can build all
databases at once into gnunet core.

I think it would be enough to apply the changes I suggested for the
moment, as time goes by there'll be according patches by myself and
other contributors of gnunet to the gnunet related parts in guix to
address the needs of applications which require gnunet.
-- 
  ng0



Re: [PATCH v2] python-lzo + python-lz4

2016-09-24 Thread ng0
Danny Milosavljevic  writes:

>> No, it is not. lzo was number 2 in the original patch couple  and is
>> still intended to be applied as such.
>
> I see what you mean but I really doubt that patchwork can see it (also 
> because of the subject it probably will replace the entire set by just this 
> package).
>
Okay, I understand but won't send it again.
I used patchwork for a while, and looking at the past discussions about
alternatives and looking at how much functionality it lacks and almost
no one except ludovic, myself and maybe 2 more people seemed to use
it. So I don't care about patchworks as it is broken. Whoever applies my
patches uses email, no need to adjust my work to a broken tool we
started to test.

Good night
-- 
  ng0



Re: [PATCH] gnu: r-curl: Respect CURL_CA_BUNDLE variable.

2016-09-24 Thread Roel Janssen

Ricardo Wurmus writes:

> Leo Famulari  writes:
>
>> On Wed, Sep 21, 2016 at 09:24:10PM +0200, Ricardo Wurmus wrote:
>>> Leo Famulari  writes:
>>> 
>>> > On Tue, Sep 13, 2016 at 11:53:33PM +0200, Roel Janssen wrote:
>>> >> This patch was essential to me being able to interact with HTTPS urls in
>>> >> R.  As far as I understand, by default, R only looks for CURL_CA_BUNDLE
>>> >> on Windows, but with this patch it looks for CURL_CA_BUNDLE on GNU/Linux
>>> >> as well.  Is this correct?
>>> >> 
>>> >> I can confirm it works for me, so I'd like to see this patch pushed.
>>> >
>>> > It's good to hear that it works, but I still think we should run it by
>>> > the upstream maintainers. We are activating C code that they
>>> > specifically decided not to use on GNU / Linux. Why did they do that?
>>> 
>>> The comments in the code indicate that on Windows they try to load the
>>> certs bundle that comes with R for Windows, i.e. in the R HOME’s “etc”
>>> directory.  There is no such file on GNU, so no special handling is
>>> needed.
>>> 
>>> On GNU this is taken care of by libcurl.  It comes with a default path
>>> to the certs bundle, which can be overridden with configure flags
>>> (“--with-ca-bundle” or “--with-ca-path”).  In our Guix package we don’t
>>> do this (yet?), so by default SSL cert validation is broken.
>>> 
>>> libcurl does not respect CURL_CA_BUNDLE; it assumes that the application
>>> will override the CA bundle path if it needs a special path, otherwise
>>> it assumes that the default path is fine (using Guix this is not the
>>> case).
>>> 
>>> The maintainers of the R curl package made the special case for Windows
>>> because it is not needed on GNU systems following the FHS.  The best fix
>>> here would be to patch libcurl such that it checks the CURL_CA_BUNDLE
>>> environment variable invariably, just like the curl command line tool
>>> does.  Until this is done I think we should path packages such as
>>> r-curl to make them usable.  Once we have agreed on a fix to libcurl we
>>> can remove all patches to individual packages using libcurl.
>>
>> That makes sense. Thank you for taking the time to explain.
>
> Sure!  Pushed to master as 8f309571d3847d4bca331061e881fa01d9badb77.

Thanks!



Re: [PATCH v2] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
> No, it is not. lzo was number 2 in the original patch couple  and is
> still intended to be applied as such.

I see what you mean but I really doubt that patchwork can see it (also because 
of the subject it probably will replace the entire set by just this package).



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

2016-09-24 Thread ng0
Jan Nieuwenhuizen  writes:

> ng0 writes:
>
>>> /gnu/store/cgb3rvmyddy114vzp9xk2y05vwn3ka18-run-vm.sh -net nic -net 
>>> user,hostfwd=tcp::2223-:,hostfwd=tcp::3001-:3000,hostfwd=tcp::5433-:5432&
>>>
>>> together with (dhcp-client-service) you can connect in (via port
>>> forwarding) and out.
>>
>> I think there's a misunderstanding.
>
> Apparently ;-)
>
>> I don't need to do in/out from host
>> to vm, I need a simple VM -> WORLD  connection.
>
> Yes, that should work.  Possibly slower than setting up a bridge though.
> Have you tried?

For a considerable long time and countless tries, that's why I'm asking
about any way to do this as it just does not work. Just about anything
which would work on GuixSD from a git checkout of guix.git is welcome.

>> What you wrote could help with testing the git-service one last time
>> as this does require host<->vm connection, thanks.
>
> Nice.
>
> Greetings,
> Jan
>
> -- 
> Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  
>

-- 
  ng0



Re: [PATCH v2] python-lzo + python-lz4

2016-09-24 Thread ng0
Danny Milosavljevic  writes:

> On Sat, 24 Sep 2016 20:22:00 +
> ngillm...@runbox.com wrote:
>
>> Danny Milosavljevic  writes:
>> 
>> Okay, there was one character which I did miss. this fixed it. Here's
>> the updated patch including the python2 variant, which yours did not
>> have.
>
> Right.
>
> Your new patch is missing imports for the function pypi-uri. I think it's 
> (guix build-system python).
>
No, it is not. lzo was number 2 in the original patch couple  and is
still intended to be applied as such.
-- 
  ng0



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

2016-09-24 Thread Jan Nieuwenhuizen
ng0 writes:

>> /gnu/store/cgb3rvmyddy114vzp9xk2y05vwn3ka18-run-vm.sh -net nic -net 
>> user,hostfwd=tcp::2223-:,hostfwd=tcp::3001-:3000,hostfwd=tcp::5433-:5432&
>>
>> together with (dhcp-client-service) you can connect in (via port
>> forwarding) and out.
>
> I think there's a misunderstanding.

Apparently ;-)

> I don't need to do in/out from host
> to vm, I need a simple VM -> WORLD  connection.

Yes, that should work.  Possibly slower than setting up a bridge though.
Have you tried?

> What you wrote could help with testing the git-service one last time
> as this does require host<->vm connection, thanks.

Nice.

Greetings,
Jan

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  



Re: [PATCH v2] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
On Sat, 24 Sep 2016 20:22:00 +
ngillm...@runbox.com wrote:

> Danny Milosavljevic  writes:
> 
> Okay, there was one character which I did miss. this fixed it. Here's
> the updated patch including the python2 variant, which yours did not
> have.

Right.

Your new patch is missing imports for the function pypi-uri. I think it's (guix 
build-system python).



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

2016-09-24 Thread ng0
Hi,

Jan Nieuwenhuizen  writes:

> ng0 writes:
>
>> I feel like this should be documented better, because I can't figure it
>> out.
>
> I'm doing something like
>
> /gnu/store/cgb3rvmyddy114vzp9xk2y05vwn3ka18-run-vm.sh -net nic -net 
> user,hostfwd=tcp::2223-:,hostfwd=tcp::3001-:3000,hostfwd=tcp::5433-:5432&
>
> together with (dhcp-client-service) you can connect in (via port
> forwarding) and out.

I think there's a misunderstanding. I don't need to do in/out from host
to vm, I need a simple VM -> WORLD  connection. What you wrote could
help with testing the git-service one last time as this does require
host<->vm connection, thanks.

> Another trick that I use and would be nice easier accessible is to have
> the console output to your terminal (or emacs shell) like so
>
> sed -e 's,-append ",-append "console=ttyS0 ,' 
> /gnu/store/s5y87jg79gh3nw8lv3q3rrj1i8wafmaj-run-vm.sh > vm.sh
> chmod +x vm.sh
>
> instead of the graphical box popup.
>
> HTH,
> Jan
>
> -- 
> Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  
>

-- 
  ng0



Re: [PATCH v2] python-lzo + python-lz4

2016-09-24 Thread ngillmann
Danny Milosavljevic  writes:

Okay, there was one character which I did miss. this fixed it. Here's
the updated patch including the python2 variant, which yours did not
have.

From 21672f816d1d685a18f1c4bd9d4a6e0766655a66 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Thu, 22 Sep 2016 00:08:21 +
Subject: [PATCH] gnu: Add python-lzo.

* gnu/packages/compression.scm (python-lzo): New variable.

Co-authored-by: Danny Milosavljevic 
---
 gnu/packages/compression.scm | 40 
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index b1d5338..50859ff 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -364,6 +364,46 @@ 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" "\")
+"
+(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
+(inherit (package-with-python2
+  (strip-python2-variant python-lzo)))
+(native-inputs
+ `(("python2-setuptools" ,python2-setuptools)
+
 (define-public lzop
   (package
 (name "lzop")
-- 
2.10.0


-- 
  ng0


signature.asc
Description: PGP signature


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

2016-09-24 Thread Jan Nieuwenhuizen
ng0 writes:

> I feel like this should be documented better, because I can't figure it
> out.

I'm doing something like

/gnu/store/cgb3rvmyddy114vzp9xk2y05vwn3ka18-run-vm.sh -net nic -net 
user,hostfwd=tcp::2223-:,hostfwd=tcp::3001-:3000,hostfwd=tcp::5433-:5432&

together with (dhcp-client-service) you can connect in (via port
forwarding) and out.

Another trick that I use and would be nice easier accessible is to have
the console output to your terminal (or emacs shell) like so

sed -e 's,-append ",-append "console=ttyS0 ,' 
/gnu/store/s5y87jg79gh3nw8lv3q3rrj1i8wafmaj-run-vm.sh > vm.sh
chmod +x vm.sh

instead of the graphical box popup.

HTH,
Jan

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  



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

2016-09-24 Thread ng0
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
> gnu/build/file-systems.scm:490:;;; file-systems.scm ends here
> gnu/build/linux-boot.scm:430:;;; linux-initrd.scm ends here
> gnu/build/marionette.scm:206:;;; marionette.scm ends here
> gnu/build/activation.scm:413:;;; activation.scm ends here
> gnu/build/install.scm:224:;;; install.scm ends here
> gnu/build/linux-modules.scm:214:;;; linux-modules.scm ends here
> gnu/build/linux-initrd.scm:144:;;; linux-initrd.scm ends here
> gnu/tests.scm:241:;;; tests.scm ends here
> gnu/services.scm:615:;;; services.scm ends here.
> gnu/system/vm.scm:506:;;; vm.scm ends here
> gnu/system/file-systems.scm:322:;;; file-systems.scm ends here
> gnu/system/nss.scm:236:;;; nss.scm ends here
> gnu/system/pam.scm:319:;;; linux.scm ends here
> gnu/system/mapped-devices.scm:167:;;; mapped-devices.scm ends here
> gnu/system/install.scm:409:;;; install.scm ends here
> gnu/system/grub.scm:303:;;; grub.scm ends here
> gnu/system/locale.scm:222:;;; locale.scm ends here
> gnu/system/shadow.scm:339:;;; shadow.scm ends here
> gnu/system/linux-initrd.scm:257:;;; linux-initrd.scm ends here
> gnu/artwork.scm:40:;;; artwork.scm ends here
> gnu/tests/install.scm:304:;;; install.scm ends here
> gnu/packages/lynx.scm:87:;;; lynx.scm ends here
> gnu/packages/openbox.scm:70:;;; openbox.scm ends here
> gnu/packages/bootstrap.scm:516:;;; bootstrap.scm ends here
> gnu/packages/base.scm:1006:;;; base.scm ends here
> gnu/packages/messaging.scm:787:;;; messaging.scm ends here
> gnu/packages/ld-wrapper.in:240:;;; ld-wrapper.scm ends here
> gnu/packages/make-bootstrap.scm:691:;;; make-bootstrap.scm ends here
> gnu/packages/guile.scm:1268:;;; guile.scm ends here
> gnu/packages/haskell.scm:7424:;;; haskell.scm ends here
> gnu/packages/libedit.scm:52:;;; libedit.scm ends here
> gnu/packages/search.scm:239:;;; search.scm ends here
> gnu/packages/commencement.scm:895:;;; commencement.scm ends here
> gnu/packages/lxde.scm:217:;;; lxde.scm ends here
> gnu/system.scm:813:;;; system.scm ends here
> gnu/services/base.scm:1546:;;; base.scm ends here
> gnu/services/lirc.scm:102:;;; lirc.scm ends here
> gnu/services/herd.scm:228:;;; herd.scm ends here
> gnu/services/shepherd.scm:346:;;; shepherd.scm ends here
> gnu/services/networking.scm:732:;;; networking.scm ends here
> gnu/services/ssh.scm:328:;;; ssh.scm ends here
> gnu/services/avahi.scm:170:;;; avahi.scm ends here
> gnu/services/xorg.scm:462:;;; xorg.scm ends here
> gnu/services/desktop.scm:864:;;; desktop.scm ends here
> gnu/services/mcron.scm:115:;;; mcron.scm ends here
> gnu/services/dbus.scm:221:;;; dbus.scm ends here
> gnu.scm:62:;;; gnu.scm ends here
> build-aux/generate-authors.scm:120:;;; generate-authors.scm ends here
> build-aux/build-self.scm:149:;;; build-self.scm ends here
> build-aux/test-driver.scm:189: test-driver.scm ends here.
> emacs/guix-about.el:37:;;; guix-about.el ends here
> emacs/guix-read.el:147:;;; guix-read.el ends here
> emacs/guix-ui-license.el:150:;;; guix-ui-license.el ends here
> emacs/guix-command.el:830:;;; guix-command.el ends here
> emacs/guix-devel.el:382:;;; guix-devel.el ends here
> emacs/guix-messages.el:247:;;; guix-messages.el ends here
> emacs/guix-entry.el:59:;;; guix-entry.el ends here
> emacs/guix-config.el.in:44:;;; guix-config.el ends here
> emacs/guix-build-log.el:381:;;; guix-build-log.el ends here
> emacs/guix-hydra-build.el:362:;;; guix-hydra-build.el ends here
> emacs/guix-info.el:482:;;; guix-info.el ends here
> emacs/guix-ui-location.el:83:;;; guix-ui-location.el ends here
> emacs/guix-ui-generation.el:456:;;; guix-ui-generation.el ends here
> emacs/guix-license.el:65:;;; guix-license.el ends here
> emacs/guix-guile.el:98:;;; guix-guile.el ends here
> emacs/guix-hydra.el:367:;;; guix-hydra.el ends here
> emacs/guix-config.el:44:;;; guix-config.el ends here
> emacs/guix-popup.el:48:;;; guix-popup.el ends here
> emacs/guix-ui-system-generation.el:105:;;; guix-ui-system-generation.el ends 
> here
> emacs/guix-help-vars.el:108:;;; guix-help-vars.el ends here
> emacs/guix-profiles.el:77:;;; guix-profiles.el ends here
> emacs/guix-utils.el:609:;;; guix-utils.el ends here
> emacs/guix-location.el:79:;;; guix-location.el ends here
> emacs/guix-hydra-jobset.el:162:;;; guix-hydra-jobset.el ends here
> emacs/guix-pcomplete.el:370:;;; guix-pcomplete.el ends here
> emacs/guix-ui-package.el:1191:;;; guix-ui-package.el ends here
> emacs/guix-list.el:585:;;; guix-list.el ends here
> emacs/guix-geiser.el:126:;;; guix-geiser.el ends here
> emacs/guix-buffer.el:624:;;; guix-buffer.el ends here
> emacs/guix-history.el:92:;;; guix-history.el ends here
> emacs/guix-emacs.el:123:;;; guix-emacs.el ends here
> emacs/guix-prettify.el:210:;;; guix-prettify.el ends here
> emacs/guix-base.el:377:;;; guix-base.el ends here
> emacs/guix-external.el:88:;;; guix-external.el en

Re: [PATCH] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
Hi,

On Sat, 24 Sep 2016 19:16:23 +
ng0  wrote:

> Thanks for your tips.
> I tried to apply, but I might've gotten it wrong. Can you send this in
> patch form so I can be sure of what I change? Especially the linebreak
> is not good to understand just in ascii.

Sure. (It's a normal line break in a string literal)

I've posted the new patch. 



Re: Mysterious error while refactoring guix/scripts/system.scm

2016-09-24 Thread Chris Marusich
Hi Ludo’,

Thank you for getting back to me!

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

> Hi Chris, and sorry for the delay!
>
> Chris Marusich  skribis:
>
>> Backtrace:
>> In ice-9/boot-9.scm:
>>  157: 15 [catch #t # ...]
>> In unknown file:
>>?: 14 [apply-smob/1 #]
>> In ice-9/boot-9.scm:
>>   63: 13 [call-with-prompt prompt0 ...]
>> In ice-9/eval.scm:
>>  432: 12 [eval # #]
>> In ice-9/boot-9.scm:
>> 2401: 11 [save-module-excursion #> ice-9/boot-9.scm:4045:3 ()>]
>> 4050: 10 [#]
>> 1724: 9 [%start-stack load-stack ...]
>> 1729: 8 [#]
>> In unknown file:
>>?: 7 [primitive-load "/root/guix/scripts/guix"]
>> In guix/ui.scm:
>> 1209: 6 [run-guix-command system "list-generations"]
>> In ice-9/boot-9.scm:
>>  157: 5 [catch srfi-34 # ...]
>>  157: 4 [catch system-error ...]
>> In guix/scripts/system.scm:
>>  884: 3 [#]
>>  818: 2 [process-command list-generations () ...]
>> In guix/store.scm:
>> 1182: 1 [run-with-store # ...]
>> In unknown file:
>>?: 0 [# #]
>>
>> ERROR: In procedure #:
>> ERROR: Wrong type to apply: #
>
> This means that we’re trying to invoke #, but
> # is not a procedure.
>
> Note that this is from within ‘run-to-store’, which is the procedure to
> “run” a monadic value.  So in effect, what happened is equivalent to:
>
>
> scheme@(guile-user)> ,use(guix monads)
> scheme@(guile-user)> ,use(guix store)
> scheme@(guile-user)> (with-store s
>  (run-with-store s *unspecified*))
> ERROR: In procedure #:
> ERROR: Wrong type to apply: #
>
>
> The bug here is in fact a type error: ‘run-with-store’ expect a monadic
> value, but what we have here is a regular value.
>
> To “fix” it, we need:
>
>
> scheme@(guile-user)> (with-store s
>  (run-with-store s
>(with-monad %store-monad (return *unspecified*
>
>
> … where ‘return’ procedure a monadic value from a normal value.
>
> In your case, ‘list-generations’ is not a monadic procedure (a procedure
> that returns a monadic value), so in this patch:
>
>   (run-with-store store
> …
> (list-generations))
>
> … triggers this very type error.

I see.  I've read the sections in the manual about gexps, and I've
peeked at the gexp code.  I thought that basically I could use
run-with-store to run any Guile code I want, but I seem to be missing
something.  I will try experimenting with monads and the store to learn
more and hopefully avoid surprises like this going forward.

> I imagine this may be more than you wanted to learn.  ;-)
> Monads in a dynamically typed setting are kinda annoying because of
> this.

I appreciate the info.  Hopefully I will fully understand it soon.

>>  (define (process-command command args opts)
>>"Process COMMAND, one of the 'guix system' sub-commands.  ARGS is its
>>  argument list and OPTS is the option alist."
>> -  (case command
>> -((list-generations)
>> - ;; List generations.  No need to connect to the daemon, etc.
>> - (let ((pattern (match args
>> -  (() "")
>> -  ((pattern) pattern)
>> -  (x (leave (_ "wrong number of arguments~%"))
>> -   (list-generations pattern)))
>> -(else
>> - (process-action command args opts
>> +  (with-store store
>> +(set-build-options-from-command-line store opts)
>> +
>> +(run-with-store store
>> +  (mbegin %store-monad
>> +(set-guile-for-build (default-guile))
>> +(case command
>> +  ((list-generations)
>> +   (let ((pattern (match args
>> +(() "")
>> +((pattern) pattern)
>> +(x (leave (_ "wrong number of arguments~%"))
>> + (list-generations pattern)))
>> +  (else
>> +   (process-action command args opts
>> +  #:system (assoc-ref opts 'system
>
> As the comment above suggests, the idea here was to avoid connecting to
> the daemon for operations that do not need it, such as
> ‘list-generations’.  I think we should preserve this property.

The reason I wanted to perform this refactoring in the first place is
because I'd like to add a new procedure to guix/scripts/system.scm
called 'switch-to-system-generation'.  Because this new procedure calls
other procedures which seem to require access to the store, I thought I
would need to call 'switch-to-system-generation' via 'run-with-store'.
Am I just confused?

In particular, 'switch-to-system-generation' will eventually call the
existing procedure 'grub-configuration-file' (defined in
gnu/system/grub.scm).  As I understand it, 'grub-configuration-file'
returns a derivation that builds a GRUB configuration file.  This
existing 'grub-configuration-file' procedure does a lot with the store
and gexps.  I thought that if I didn't use 'run-with-store' to run
'switch-to-system-generation', it wouldn't work because
'grub-configuration-file' wouldn't work.

> Thanks for your work!  I’m sorry this is more painful th

[PATCH v2] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
python-lzo + python-lz4

* gnu/packages/compression.scm (python-lzo, python-lz4): New variables.

Co-authored-by: ng0 
---
 gnu/packages/compression.scm | 64 
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 6504641..30d05ea 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 David Craven 
 ;;; Copyright © 2016 Kei Kebreau 
 ;;; Copyright © 2016 Marius Bakke 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +39,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
@@ -45,6 +47,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages valgrind)
   #:use-module ((srfi srfi-1) #:select (last)))
 
@@ -361,6 +364,39 @@ 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" "\")
+"
+(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 lzop
   (package
 (name "lzop")
@@ -632,6 +668,34 @@ time for compression ratio.")
 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
 (license (list license:bsd-2 license:gpl2+
 
+(define-public python-lz4
+  (package
+(name "python-lz4")
+(version "0.8.2")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "lz4" version))
+   (sha256
+(base32
+ "1irad4sq4hdr30fr53smvv3zzk4rddcf9b4jx19w8s9xsxhr1x3b"
+(build-system python-build-system)
+(inputs
+ `(("python-nose" ,python-nose)))
+(home-page "https://github.com/python-lz4/python-lz4";)
+(synopsis "LZ4 Bindings for Python")
+(description
+ "This package provides python bindings for the lz4 compression library
+by Yann Collet.  The project contains bindings for the LZ4 block format and
+the LZ4 frame format.")
+(license license:bsd-3)))
+
+(define-public python2-lz4
+  (package
+(inherit (package-with-python2
+  (strip-python2-variant python-lz4)))
+(native-inputs `(("python2-setuptools" ,python2-setuptools)
+
 (define-public squashfs-tools
   (package
 (name "squashfs-tools")


Re: [PATCH] Add gctp

2016-09-24 Thread Thomas Danckaert
From: Leo Famulari 
Subject: Re: [PATCH] Add gctp
Date: Fri, 23 Sep 2016 21:08:25 -0400

>> +(version "2.0")
>> +(source
>> + (origin
>> +   (method url-fetch)
>> +   (uri "https://github.com/OkoSanto/GCTP/archive/v2.0.0.tar.gz";)
> 
> The only thing I would like to change is this mismatch between the
> version and the tarball name. Can we call it version 2.0.0?
> 
> Also, we should add a (file-name) field so that the downloaded tarball
> has "gctp" in the name.
> 
> I can make these changes locally if you think they are okay.

Of course, go ahead!

Thanks for reviewing the patch(-es).

Thomas



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

2016-09-24 Thread ng0
ng0  writes:

> I feel like this should be documented better, because I can't figure it
> out.
>
> I should not waste time on figuring out how a service I need to test in
> the VM can get internet access.
>
> Currently I can't ping, git can't clone, gnunet-service can't get its
> hosts lists, etc. I just need to test one service, I don't want to spend
> days on figuring out why I can get no in/out connection.
>
> Can someone please help me, so that we can improve configuration?
 ^ I meant documentation.
>
>
> Appended are 2 versions of the testvm.scm I used in my branch of
> gnunet-service.
>
>
> -- 
>   ng0

-- 
  ng0



Network with QEMU generated image (guix system vm)?

2016-09-24 Thread ng0
I feel like this should be documented better, because I can't figure it
out.

I should not waste time on figuring out how a service I need to test in
the VM can get internet access.

Currently I can't ping, git can't clone, gnunet-service can't get its
hosts lists, etc. I just need to test one service, I don't want to spend
days on figuring out why I can get no in/out connection.

Can someone please help me, so that we can improve configuration?


Appended are 2 versions of the testvm.scm I used in my branch of
gnunet-service.



testvm.scm
Description: Binary data


testvm-new.scm
Description: Binary data

-- 
  ng0


Re: [PATCH] python-lzo + python-lz4

2016-09-24 Thread ng0
Hi,

Danny Milosavljevic  writes:

> On Sat, 24 Sep 2016 15:27:45 +
> ng0  wrote:
>> +   (("^include_dirs.append")
>  ^ remove "^"
>
> And add .*
>
> so
>
>  ("include_dirs.append.*")
> ...
>
> Note that this also matches the newline codepoint (sigh), so you have to 
> re-add it in the substitution at the end.
>  
>  ("include_dirs.append.*") ".../include/lzo
> "
> ^newline
>
>
Thanks for your tips.
I tried to apply, but I might've gotten it wrong. Can you send this in
patch form so I can be sure of what I change? Especially the linebreak
is not good to understand just in ascii.

Thanks
-- 
  ng0



Re: stumpwm and common lisp modules

2016-09-24 Thread Andy Patterson
On Sat, 24 Sep 2016 13:13:23 -0400
James Richardson  wrote:

 
> 
> I would be very interested! I'm not really a lisp expert (yet), but I
> will help where I can.

Cheers. I'll try to have something submitted within the next couple of
days.

--
Andy



Re: [PATCH] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
On Sat, 24 Sep 2016 15:27:45 +
ng0  wrote:

Note: Also add

 #:test-target "check"



Re: [PATCH] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
On Sat, 24 Sep 2016 15:27:45 +
ng0  wrote:
> +   (("^include_dirs.append")
 ^ remove "^"

And add .*

so

 ("include_dirs.append.*")
...

Note that this also matches the newline codepoint (sigh), so you have to re-add 
it in the substitution at the end.
 
 ("include_dirs.append.*") ".../include/lzo
"
^newline




Re: [PATCH] python-lzo + python-lz4

2016-09-24 Thread Danny Milosavljevic
On Sat, 24 Sep 2016 15:27:45 +
ng0  wrote:

> lz4: builds. lzo: I don't know how to make it find lzo headers, help
> requested.

python-lzo-1.11/setup.py hard-codes /usr/include/lzo . Substitute that by 
(assoc-ref inputs "lzo") or something. Probably also set -Wl,-rpath there. When 
testing, make sure to not have lzo in your profile.



Re: [PATCH] gnu: Add sendmail

2016-09-24 Thread Alex Kost
Alex Vong (2016-09-24 16:22 +0800) wrote:

> Alex Kost  writes:
>
>> John Darrington (2016-09-17 12:11 +0200) wrote:
>>
>>> On Sat, Sep 17, 2016 at 05:38:26PM +0800, Alex Vong wrote:
>> [...]
>>>  >  > + "contrib/mmuegel" "devtools/bin/configure.sh")
>>>  >  > +   (("/bin/sh") (which "bash")))
>>>  >  > +
>>>  >  > + (substitute* "devtools/bin/Build"
>>>  >  > + (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"
>>>  >  > + #t))
>>>  >  I think the `#t' is not neccessary here, since `substitute*' 
>>> uses
>>>  >  `substitute', which will either return #t or throw an exception.
>>>  >
>>>  > WTF??  Didn't you complain earlier this week when I *didn't* put #t 
>>> in
>>>  > exactly this
>>>  > scenario??
>>>  >
>>>  Yes, I am a different Alex :)
>>>  Also, it seems we are not being consistent here, sometimes we put `#t'
>>>  after `substitute*', sometimes we don't. Anyone has an idea?
>>>
>>> I did raise some suggestions in my earlier posts.  But again I don't
>>> have any strong
>>> opinion.
>>
>> I have a strong opinion: if a docstring of a procedure says what value
>> it returns, we can rely on it, otherwise we should not guess what value
>> will be returned.  In case of 'substitute*' (and 'substitute'), the
>> returned value is not specified, so I think if a phase ends with
>> 'substitute*', we should (or even must) add #t after it.
>
> I see your point that one should not be relying on undocumented
> features, which I agree. But I also see an alternative: to make
> 'substitute*' either return true or throw an exception and document
> it. I think the heart of the problem is scheme is "untyped", so we rely
> on the documentation. What do you think?

I don't think my opinion matters, I'm not the man to decide.  As for me,
I would prefer if 'substitute*' returned #t if substitution was
successful and #f if it failed (if nothing was substituted).

OTOH 'substitute*' is only one of the several procedures that are used
often in phases; there also can be met such general guile procedures as
'setenv', 'copy-file', etc.  After them (in the end of the phases) we
have to use #t anyway.

-- 
Alex



Re: [PATCH] gnu: Add gloox.

2016-09-24 Thread ng0
Leo Famulari  writes:

> [ Unknown signature status ]
> On Thu, Sep 15, 2016 at 09:54:17PM +, ng0 wrote:
>> This patch adds gloox, a dependency for 0ad needs for their "lobby"
>> feature. Gentoo builds it with libressl without any patches applied,
>> they had a long discussion and are very strict in their testing, looking
>> at the tests comparing libressl and openssl builds I did there was no
>> failure and if it won't work I'll notice with 0ad. I'm positive that it
>> works.
>
>> Subject: [PATCH] gnu: Add gloox.
>> 
>> * gnu/packages/messaging.scm (gloox): New variable.
>
>> +(inputs
>> + `(("libidn" ,libidn)
>> +   ("gnutls" ,gnutls)
>> +   ("libressl" ,libressl)
>> +   ("zlib" ,zlib)))
>
> I don't think this package is using libressl:

GnuTls cancels openssl or libressl out. When I had
--with-openssl=build-input of libressl/openssl set it had no effect.

Updated patch attached.

From f6ea8a17772b7d3b80a603d7aef576bf13e13be5 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Thu, 15 Sep 2016 21:46:46 +
Subject: [PATCH] gnu: Add gloox.

* gnu/packages/messaging.scm (gloox): New variable.
---
 gnu/packages/messaging.scm | 30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 3627fec..9fc2088 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2015 Andreas Enge 
 ;;; Copyright © 2015, 2016 Ricardo Wurmus 
 ;;; Copyright © 2015 Efraim Flashner 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -755,4 +755,32 @@ for sending encrypted messages to one person or many subscribers.")
 (synopsis "Distributed peer-to-peer communication")
 (home-page "https://bitmessage.org/";)))
 
+(define-public gloox
+  (package
+(name "gloox")
+(version "1.0.17")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "https://camaya.net/download/gloox-";
+   version ".tar.bz2"))
+   (sha256
+(base32
+ "09c01jr5nrm7f1ly42wg0pqqscmp48pv8y2fjx1vwbavjxdq59ri"
+(build-system gnu-build-system)
+(inputs
+ `(("libidn" ,libidn)
+   ("gnutls" ,gnutls)
+   ("zlib" ,zlib)))
+(native-inputs
+ `(("pkg-config" ,pkg-config)))
+(synopsis "Portable high-level Jabber/XMPP library for C++")
+(description
+ "gloox is a full-featured Jabber/XMPP client library,
+written in ANSI C++.  It makes writing spec-compliant clients easy
+and allows for hassle-free integration of Jabber/XMPP functionality
+into existing applications.")
+(home-page "http://camaya.net/gloox";)
+(license license:gpl3)))
+
 ;;; messaging.scm ends here
-- 
2.10.0


-- 
  ng0


signature.asc
Description: PGP signature


Re: [Patch] add keychain

2016-09-24 Thread James Richardson

Hartmut Goebel writes:

Thank you for the feedback! Much appreciated!

> Am 22.09.2016 um 14:10 schrieb James Richardson:
>> * gnu/packages/keychain.scm: Add new file.
>
> I suggest putting this into some other file, e.g. crypto.scm or ssh.scm.
> Otherwise we have a file for a single package.

I wasn't sure of the policy. I will move it to one of these files.

>
>> * gnu/packages/keychain.scm: (keychain): New variable.
>
> If you stay with the separate file, this line is not needed.
>
>> +   #:builder (begin
>> +   (use-modules (guix build utils))
>> +   (let ((bin-dir (string-append %output "/bin"))
>> + (man1-dir (string-append %output 
>> "/share/man/man1"))
>> + (tar (string-append
>> +   (assoc-ref %build-inputs "tar")
>> +   "/bin/tar"))
>> + (bzip2 (assoc-ref %build-inputs "bzip2"))
> You may want to have a look at audio.scm:freepats for a bit shorter and
> more obvious code.

I will take a look.

>
>> + (mkdir-p bin-dir)
>> + (mkdir-p man1-dir)
>> + (setenv "PATH" (string-append bzip2 "/bin"))
>> + (system* tar "xfv" source)
>
> Please unpack the source first, the code is more obvious then.
>> + (copy-file (string-append ,name "-"
>> +   ,version "/keychain.1")
> If you run this using "with-directory-excursion", the code is more
> obvious and simpler.
>> +(string-append man1-dir "/keychain.1"))
>> + (copy-file (string-append ,name "-"
>> +   ,version "/keychain")
>> +(string-append bin-dir "/keychain"))
>
> You can use install-file and save the make-p above.
>> +(native-inputs `(("bzip2" ,bzip2)
>> + ("tar" ,tar)

I wasn't aware of of install-file. I will make these updates.

>
> Please warp like this:
>
> +(native-inputs
> + `(("bzip2" ,bzip2)
> +  ("tar" ,tar)
>
>
>> + ("source" ,source)))
>
>
> No need for listing the source here.
>

I will work on the wording.

>> +(synopsis "Key manager for OpenSSH")
>
> Not only for *open*ssh, but for other implementations, too. And für
> GnuPG-Agent, Maybe even talk abpout the Agent in the synopsis.
>
> Keychains itself says it is a "agent manager".
>
>> +(description
>> + "Keychain is an OpenSSH key manager, typically run from
>> +~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
>> +otherwise it starts one.  It saves the ssh-agent environment variables to
>> +~/.keychain/$HOSTNAME-sh, so that subsequent logins and
>> +non-interactive shells such as cron jobs can source the file and make
>> +passwordless ssh connections.  In addition, when keychain runs, it
>> +verifies that the key files specified on the command-line are known to
>> +ssh-agent, otherwise it loads them, prompting you for a password
>> +if necessary.")
>
>
> The text above is a details workflow description. For me the text form
> the keychain.spec-file is more meaningful. Maybe you want to combine them?
>
> Keychain is a manager for OpenSSH, ssh.com, Sun SSH and GnuPG agents.
> It acts as a front-end to the agents, allowing you to easily have one
> long-running agent process per system, rather than per login session.
> This reduces the number of times you need to enter your passphrase
> from once per new login session to once every time your local machine
> is rebooted.

I'll try to have these changes in the next few days. Thank you for the
review.

--
James Richardson



Re: stumpwm and common lisp modules

2016-09-24 Thread James Richardson

Andy Patterson writes:

> On Thu, 22 Sep 2016 23:40:46 -0400
> James Richardson  wrote:
>
>> Hello list,
>> 
>> I was attempting to make a package for stumpwm. I got as far as, oh it
>> has a dependency on cl-ppcre (and a few other cl packages). Well it
>> turns out that actually putting a lisp module in a guix package seems,
>> well, non trivial. Does anyone else have an interest getting lisp
>> packages into Guix?
>> 
>> 
>
> Hi James,
>
> I've been working on a build system for CL packages for some time now,
> which works well enough to produce a working stumpwm package. It still
> has some missing parts and design issues which I've been mulling over,
> but if you're interested I could try to clean things up and post my
> progress soon.
>
> What do you think?

I would be very interested! I'm not really a lisp expert (yet), but I
will help where I can.



Re: [PATCH] gnu: Add gloox.

2016-09-24 Thread ng0
Leo Famulari  writes:

> [ Unknown signature status ]
> On Thu, Sep 15, 2016 at 09:54:17PM +, ng0 wrote:
>> This patch adds gloox, a dependency for 0ad needs for their "lobby"
>> feature. Gentoo builds it with libressl without any patches applied,
>> they had a long discussion and are very strict in their testing, looking
>> at the tests comparing libressl and openssl builds I did there was no
>> failure and if it won't work I'll notice with 0ad. I'm positive that it
>> works.
>
>> Subject: [PATCH] gnu: Add gloox.
>> 
>> * gnu/packages/messaging.scm (gloox): New variable.
>
>> +(inputs
>> + `(("libidn" ,libidn)
>> +   ("gnutls" ,gnutls)
>> +   ("libressl" ,libressl)
>> +   ("zlib" ,zlib)))
>
> I don't think this package is using libressl:
>
> $ guix gc --references $(./pre-inst-env guix build gloox)
> /gnu/store/3fhnmvbdxlsh64pr3zg4y74x3hlx33qw-libtasn1-4.8
> /gnu/store/5992iq1v7arqa14ym3di58n4la0893nv-zlib-1.2.8
> /gnu/store/6004mqdv1y8wc6zvg9yxy4bh652sgzms-gloox-1.0.17
> /gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib
> /gnu/store/cdkrfbl10kbyyjjw3yfk9hckfw8n1b7g-gmp-6.1.0
> /gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23
> /gnu/store/sbj1kgn8bs91bn7ba9qk4n3l2rr7dxbr-libidn-1.32
> /gnu/store/ykzwykkvr2c80rw4l1qh3mvfdkl7jibi-bash-4.3.42
> /gnu/store/yrl3c1mxqwcpppyh0sjlwn3sj2w5qj54-gnutls-3.5.2
>
> The Debian package uses GnuTLS only:
> https://packages.debian.org/source/sid/gloox

I always look at Gentoo first, and it is validated for
openssl+libressl without any additional patches: (link at gpo, which
mirrors them from packages.gentoo.org)
https://data.gpo.zugaina.org/gentoo/net-libs/gloox/gloox-1.0.17.ebuild

2016-09-24 17:06  I think net-libs/gloox/gloox-* is wrong in using 
openssl/libressl. for version 0.17 the --with-ssl option is ignored. I packaged 
it for Guix and assumed openssl or libressl would work, but it is not even 
linked in the end. someone should fix that for Gentoo.
2016-09-24 17:09  ng0: links ok here
2016-09-24 17:09  ET_DYN 
libresolv.so.2,libssl.so.1.0.0,libcrypto.so.1.0.0,libz.so.1,libstdc++.so.6,libm.so.6,libc.so.6,libgcc_s.so.1
 /usr/lib64/libgloox.so

I'll see what I need to adjust, will send a new patch.
-- 
  ng0



Re: [PATCH] gnu: openldap: Use gnutls.

2016-09-24 Thread Alex Vong
Hello,

Jan Synáček  writes:

> On Fri, Sep 16, 2016 at 6:21 PM, Alex Vong  wrote:
>> Hello,
>
> Hi,
>
>> The following patch does what the title says. The link of the bug
>>  is no
>> longer accessible, so I assume the bug is fixd since I cannot find it on
>> the internet.
>
> The #7430 was fixed in 2013.
>
>> ==
>> # Download the upstream source and make changes as required for DFSG reasons.
>> # Assumes wget is available, as this is generally only used by the package
>> # maintainers.
>> get-orig-source:
>> @if [ ! -d "debian/schema" ] ; then \
>> echo 'Run this from the top directory of the Debian source' >&2; 
>> \
>> exit 1; \
>> fi
>> wget $(URL)/openldap-$(VERSION).tgz
>> tar xzf openldap-$(VERSION).tgz
>> rm -r openldap-$(VERSION)/doc/drafts
>> rm -r openldap-$(VERSION)/doc/rfc
>> set -e; for schema in debian/schema/*.schema debian/schema/*.ldif ; 
>> do \
>> file=`basename "$$schema"`; \
>> rm openldap-$(VERSION)/servers/slapd/schema/$$file; \
>> done
>> mv openldap-$(VERSION) openldap-$(VERSION)+dfsg
>> tar cf openldap_$(VERSION)+dfsg.orig.tar openldap-$(VERSION)+dfsg
>> rm -r openldap-$(VERSION)+dfsg
>> gzip -9 openldap_$(VERSION)+dfsg.orig.tar
>> ==
>
> as a former OpenLDAP maintainer on Fedora and RHEL, I strongly suggest
> you link it against openssl. It's basically the only really supported
> crypto upstream.

OK, first let me introduce '->' to means 'is a dependency of'.

Currently we have the following:
  openldap -> curl -> octave

This means 'openssl -> openldap' cannot happens,
otherwise 'openssl -> octave',
which is a violation of GPLv3+.

I am interested in knowing how Fedora solves this issue.

Thanks,
Alex



[PATCH] python-lzo + python-lz4

2016-09-24 Thread ng0
lz4: builds. lzo: I don't know how to make it find lzo headers, help
requested.

From 2fb504abdf78e63de0d538fd2cebef43b9fc38f6 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Wed, 21 Sep 2016 23:21:39 +
Subject: [PATCH 1/2] gnu: Add python-lz4.

* gnu/packages/compression.scm (python-lz4): New variable.
---
 gnu/packages/compression.scm | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 6504641..b1d5338 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 David Craven 
 ;;; Copyright © 2016 Kei Kebreau 
 ;;; Copyright © 2016 Marius Bakke 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +39,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
@@ -45,6 +47,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages valgrind)
   #:use-module ((srfi srfi-1) #:select (last)))
 
@@ -632,6 +635,34 @@ time for compression ratio.")
 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
 (license (list license:bsd-2 license:gpl2+
 
+(define-public python-lz4
+  (package
+(name "python-lz4")
+(version "0.8.2")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "lz4" version))
+   (sha256
+(base32
+ "1irad4sq4hdr30fr53smvv3zzk4rddcf9b4jx19w8s9xsxhr1x3b"
+(build-system python-build-system)
+(inputs
+ `(("python-nose" ,python-nose)))
+(home-page "https://github.com/python-lz4/python-lz4";)
+(synopsis "LZ4 Bindings for Python")
+(description
+ "This package provides python bindings for the lz4 compression library
+by Yann Collet.  The project contains bindings for the LZ4 block format and
+the LZ4 frame format.")
+(license license:bsd-3)))
+
+(define-public python2-lz4
+  (package
+(inherit (package-with-python2
+  (strip-python2-variant python-lz4)))
+(native-inputs `(("python2-setuptools" ,python2-setuptools)
+
 (define-public squashfs-tools
   (package
 (name "squashfs-tools")
-- 
2.10.0

From 2b96177def2703329cc5544efddcc740264d7944 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Thu, 22 Sep 2016 00:08:21 +
Subject: [PATCH 2/2] gnu: Add python-lzo.

* gnu/packages/compression.scm (python-lzo): New variable.
---
 gnu/packages/compression.scm | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index b1d5338..30e69c6 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -364,6 +364,37 @@ 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
+ `(#: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" "\")"
+(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 lzop
   (package
 (name "lzop")
-- 
2.10.0


-- 
  ng0


signature.asc
Description: PGP signature


Re: [PATCH] gnu: Add gnome-calculator.

2016-09-24 Thread Kei Kebreau
l...@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> Kei Kebreau  skribis:
>
>> rennes  writes:
>>
>>> On Thu, 2016-09-22 at 21:23 -0400, Kei Kebreau wrote:
 
 This is a good patch! The only change I recommend is moving the
 defintion to gnome.scm.
>>>
>>> I update the patch,
>>>  * Create the definition in gnome.scm file.
>>>  * Move 'glib' to native-inputs.
>>>  * Delete Copyright duplicate for 
>>>    ';;; Copyright © 2016 Rene Saavedra '
>>>
>>> Thank you
>>
>> Looks good and works well.
>>
>> Does somebody want to commit this to master?
>> I'd do it myself, but I'm unfamiliar with the process of commiting
>> someone else's code and I don't want to break anything.
>
> It’s a good occasion to try—we need more reviewers!  :-)
>
> The process is essentially to pipe the patch (which includes the commit
> log and Subject: line) through “git am -s”.
>
> If that applies fine, just run ‘guix lint the-package’ and ideally ‘guix
> build --rounds=2 the-package’ to catch any issues.
>
> If nothing comes up, just push!
>
> If minor issues (typos, synopsis, etc.) come up, you might commit them
> on behalf of the author, or ask them what they prefer.
>
> Could you try and report back?  :-)
>
> Thanks Kei & rennes!
>
> Ludo’.

I've already pushed it! I guess my last message only went back to
Leo. Thank you and Leo for your help. :-)

rennes, everything looked good. Thanks for your contribution!


signature.asc
Description: PGP signature


[PATCH] kakasi + perl-kakasi -- dependencies for namazu

2016-09-24 Thread ng0
Those are in namazu.scm because they are needed for namazu. Tests for
kakasi require some fixes, however I will not fix this.

From d8102a06d98d3f5726b04da2cf64f09f69793ed2 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Sat, 17 Sep 2016 23:56:29 +
Subject: [PATCH 1/2] gnu: Add kakasi.

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

diff --git a/gnu/local.mk b/gnu/local.mk
index e2cf40d..a6e2464 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -253,6 +253,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/musl.scm\
   %D%/packages/mtools.scm			\
   %D%/packages/nano.scm\
+  %D%/packages/namazu.scm   \
   %D%/packages/ncdu.scm\
   %D%/packages/ncurses.scm			\
   %D%/packages/netpbm.scm			\
diff --git a/gnu/packages/namazu.scm b/gnu/packages/namazu.scm
new file mode 100644
index 000..bec61df
--- /dev/null
+++ b/gnu/packages/namazu.scm
@@ -0,0 +1,53 @@
+;;; 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 namazu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public kakasi
+  (package
+   (name "kakasi")
+   (version "2.3.6")
+   (source (origin
+(method url-fetch)
+(uri (string-append "http://kakasi.namazu.org/stable/";
+name "-" version ".tar.gz"))
+(sha256
+ (base32
+  "14qqjr24p5s4dashr3ikp5gx8g789b8q4bc22ksh7h0ravypchh0"
+   (build-system gnu-build-system)
+   (arguments
+`(;; kakasi-4 /bin/echo fails to get substituted, we need to replace
+  ;; /bin/echo with (which echo) in tests/kakasi-{1,4,5,6,7}
+  #:tests? #f))
+   (native-inputs
+`(("autoconf" ,autoconf)
+  ("automake" ,automake)))
+   (synopsis "Kanji Kana Simple Inverter")
+   (description
+"KAKASI is the language processing filter to convert Kanji characters
+to Hiragana, Katakana or Romaji and may be helpful to read Japanese
+documents.")
+   (license license:gpl2+)
+   (home-page "http://kakasi.namazu.org";)))
-- 
2.10.0

From 2d81d97daa68000192c8c6a2bed3150c39d7957f Mon Sep 17 00:00:00 2001
From: ng0 
Date: Sun, 18 Sep 2016 01:22:42 +
Subject: [PATCH 2/2] gnu: Add perl-text-kakasi.

* gnu/packages/namazu.scm (perl-text-kakasi): New variable.
---
 gnu/packages/namazu.scm | 33 -
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/namazu.scm b/gnu/packages/namazu.scm
index bec61df..858254c 100644
--- a/gnu/packages/namazu.scm
+++ b/gnu/packages/namazu.scm
@@ -20,10 +20,12 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages perl)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl))
 
 (define-public kakasi
   (package
@@ -51,3 +53,32 @@ to Hiragana, Katakana or Romaji and may be helpful to read Japanese
 documents.")
(license license:gpl2+)
(home-page "http://kakasi.namazu.org";)))
+
+(define-public perl-text-kakasi
+  (package
+(name "perl-text-kakasi")
+(version "2.04")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "mirror://cpan/authors/id/D/DA/"
+   "DANKOGAI/Text-Kakasi-" version ".tar.gz"))
+   (sha256
+(base32
+ "186v4ibdafag1spyfx8anhlprpl8yj35m6820yfbigx4igkh2k44"
+(build-system perl-build-system)
+(native-inputs
+ `(("perl-test-harness" ,perl-test-harness)))
+(inputs
+ `(("kakasi" ,kakasi)))
+(arguments
+ `(#:tests? #f)) ; Requires kakasi in -lkakasi , fixme.
+(home-page "http://search.cpan.org/dist/Text-Kakasi";)
+(synopsis "

[PATCH] gnu: Add epic5.

2016-09-24 Thread ng0
I tried to get ssl working via:
- patching include/config.h
- just export the variable which was in include/config.h without
  patching it.

but it seems like epic5 does something different which 'justworks™' in
ircii. epic5 is based on ircii.
If ssl is mandatory, I'll check their git repository and see if there
have been any commits recently fixing this.

From 04cd790b1b08fe9fe09896db267c78640872 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Tue, 13 Sep 2016 23:45:21 +
Subject: [PATCH 1/2] licenses: Add epic.

* guix/licenses.scm (epic): New variable.
---
 guix/licenses.scm | 9 +
 1 file changed, 9 insertions(+)

diff --git a/guix/licenses.scm b/guix/licenses.scm
index 265f048..4abd539 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -40,6 +40,7 @@
 artistic2.0 clarified-artistic
 copyleft-next
 cpl1.0
+epic
 epl1.0
 expat
 freetype
@@ -209,6 +210,14 @@ at URI, which may be a file:// URI pointing the package's tree."
"http://directory.fsf.org/wiki/License:CPLv1.0";
"https://www.gnu.org/licenses/license-list#CommonPublicLicense10";))
 
+;; The epic license is equal to the standard three-clause BSD license except
+;; that you are not permitted to remove the "Redistribution is permitted"
+;; clause of the license if you distribute binaries.
+(define epic
+  (license "epic"
+   "http://epicsol.org/copyright";
+   #f))
+
 (define epl1.0
   (license "EPL 1.0"
"http://directory.fsf.org/wiki/License:EPLv1.0";
-- 
2.10.0

From f61b13ef79a6f05ec358652fa428324d7b2858d9 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Tue, 13 Sep 2016 23:46:16 +
Subject: [PATCH 2/2] gnu: Add epic5.

* gnu/packages/irc.scm (epic5): New variable.
---
 gnu/packages/irc.scm | 80 +++-
 1 file changed, 79 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 786cfbc..a108b2a 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014 Kevin Lemonnier 
 ;;; Copyright © 2015 Ludovic Courtès 
 ;;; Copyright © 2015, 2016 Efraim Flashner 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,9 +31,11 @@
   #:use-module (gnu packages autogen)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages file)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -46,6 +48,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls))
@@ -291,3 +294,78 @@ and extensible with plugins and scripts.")
 (description
  "sic is a simple IRC client, even more minimalistic than ii.")
 (license license:expat)))
+
+(define-public epic5
+  (package
+(name "epic5")
+(version "2.0.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://ftp.epicsol.org/pub/epic/EPIC5-PRODUCTION/";
+  name "-" version ".tar.xz"))
+  (sha256
+   (base32
+"1ap73d5f4vccxjaaq249zh981z85106vvqmxfm4plvy76b40y9jm"
+(build-system gnu-build-system)
+(arguments
+ `(#:test-target "test"
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'patch-perl
+   (lambda _
+ (substitute* "regress/crash-irc"
+   (("perl5") (which "perl")
+ (add-after 'unpack 'patch-bsdinstall
+   ;; We should include this in the build-system, bsdinstall is a standard.
+   ;; If we just remove /bin/ some part of the bsdinstall breaks.
+   (lambda _
+ (substitute* "bsdinstall"
+   (("/bin/strip") "strip")
+   (("/bin/cp") "cp")
+   (("/bin/chmod") "chmod")
+   (("/etc/chown") "chown")
+   (("/bin/chgrp") "chgrp")
+   (("/bin/mkdir") "mkdir")
+   (("/bin/rm") "rm")
+   (("/bin/mv") "mv")
+   (("/etc/") ""
+ (replace 'configure
+   (lambda* (#:key outputs #:allow-other-keys)
+ ;; The tarball uses a very old version of autconf. It doesn't
+ ;; understand extra flags like `--enable-fast-install', so
+ ;; we need to invoke it with just what it understands.
+ (let ((out (assoc-ref outputs "out")))
+   ;; 'configure' doesn't understand '--host'.
+   ,@(if (%current-target-system)
+ 

Re: Guix on other distros: Gentoo. [You run Gentoo? Please help testing.]

2016-09-24 Thread ng0
Hi,

I don't like to leave questions open. What if someone else finds this in
the future and wonders how we solved it? Find the answer below.

Efraim Flashner  writes:

> On Fri, Aug 05, 2016 at 07:02:14PM +, ng0 wrote:
>> 
>> The disfunctional thing currently is:
>> 
>> guixbuilder01 ... guixbuilder10 get created and added to guixbuild
>> group.
>> 
>> Post-setup I let root authorize hydra's pubkey, then I run
>> `rc-service start guix' which sadly makes the terminal unusable if you
>> don't append "&".
>> 
>> running guix pull then as root downloads happen, but as soon as builder
>> should start, it fails:
>> 
>> shikahr ~ # guix pull
>> 
>> Starting download of /tmp/guix-file.RpedfI
>> From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
>>  ….tar.gz   1.1MiB/s 00:10 | 10.3MiB
>>  transferred
>>  unpacking
>>  '/gnu/store/h33fva5hvrw7z99vrn3ivnh07mgg55qc-guix-latest.tar.gz'...
>>  substitute: updating list of substitutes from
>>  'https://mirror.hydra.gnu.org'... 100.0%
>>  The following derivations will be built:
>> /gnu/store/yw3dzq3nlngki5bd8z5yp1aslvzsjh1n-guix-latest.drv
>> /gnu/store/2gyrssyswj0p2z6yr7938kln20piy4w6-module-import.drv
>> /gnu/store/jb6ir2q5j8lwmdcqlhs7c4vdkgllcjga-module-import-compiled.drv
>>   building path(s)
>>`/gnu/store/35xw5kccyq76v8zgkdrnx1z9w8s6ll7m-module-import'
>> guix pull: error: build failed: the build users group
>>   `guixbuild' has no members
>>   shikahr ~ # id -nG guixbuilder01
>>   guixbuild
>>   shikahr ~ # id -nG guixbuilder1
>>   id: guixbuilder1: no such user
>>   
>> 
>> I know the openrc service is total crap because if you don't kill every
>> instance of guix-daemon before shutdown/reboot, you have almost 30
>> minutes delay.
>> OpenRC services are not my favorit thing to write, but it should just
>> work.
>> 
>> Also strange enough a sequence from 1 - 10 in ebuild creates users 01 -
>> 10.
>> 
> one thing you could try as a work around is to only make 9 builders, or
> to number the builders from 10 to 19.

This is how lynX worked around it for my ebuild:

pkg_setup() {
enewgroup guixbuild
g=0
for i in `seq -w 0 9`;
do
enewuser guixbld$i -1 -1 /var/empty guixbuild;
if [ $g == 0 ]; then
g="guixbld$i"
else
g="$g,guixbld$i"
fi
done
# For some strange reason all of the generated
# user ids need to be listed in /etc/group even though
# they were created with the correct group. This is a
# command that patches the /etc/group file accordingly,
# but it expects perl to be installed. If you don't have
# perl installed, you have to do this manually. Adding a
# dependency for this is inappropriate.
perl -pi~ -e 's/^(guixbuild:\w+:\d+):$/\1:'$g'/' /etc/group
}

With the current version I was able to build+install "hello". What's now
missing is fixing the service, otherwise you can safely run Guix on
Gentoo.

> -- 
> Efraim Flashner  אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
  ng0



mailmap: new address.

2016-09-24 Thread ng0
This is in a patchset which is waiting for review, but as new patches
get added, this should be applied.
I am retiring my own domains next year, falling back to my hoster
provided ones now.
Future commits will be made by ngillm...@runbox.com only.

From f2339786a1707dc53415156d6f973f339235b481 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Wed, 21 Sep 2016 09:55:40 +
Subject: [PATCH 5/8] mailmap: Add new address for ng0.

---
 .mailmap | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index 2af7760..4f756ec 100644
--- a/.mailmap
+++ b/.mailmap
@@ -30,9 +30,10 @@ Ludovic Courtès  
 Mathieu Lirzin  
 Mathieu Lirzin  
 Nikita Karetnikov  
-ng0  
-ng0  
-ng0  
+ng0  
+ng0  
+ng0  
+ng0  
 Pjotr Prins 
 Pjotr Prins  
 Raimon Grau  
-- 
2.10.0

-- 
  ng0


signature.asc
Description: PGP signature


Re: [PATCH 42/42] gnu: Add darcs.

2016-09-24 Thread ng0
Leo Famulari  writes:

> On Fri, Sep 23, 2016 at 08:08:37PM +, ng0 wrote:
>> Leo Famulari  writes:
>> 
>> > On Fri, Sep 23, 2016 at 09:12:33AM +, ng0 wrote:
>> >> I also think for reference we should keep the versions of packages it
>> >> needs as they are so many. On the other hand hackage keeps the list of
>> >> dependencies and versions of those, so... should I send a patch removing
>> >> these comments?
>> >
>> > I think it's better to say how to learn that information. What's there
>> > now will become obsolete sooner or later, and it's not clear to me how I
>> > could update the information.
>> >
>> 
>> That's just taken directly from hackage and/or the initial error output
>> and/or the haskell setup file.
>> 
>> Should I adjust it? For me the source is 'normal' you find this
>> information when you look for the application:
>> https://hackage.haskell.org/package/darcs-2.12.4
>
> It looks like hackage provides that version information for many of
> their packages. So, I don't think we need to include it in our Darcs
> package.
>
I Agree. You might want to check on (inputs (ghc)) as I have not checked
again if this is already provided by the build-system.

From 2367b485b7fad2b3220610c01e71acc781a83220 Mon Sep 17 00:00:00 2001
From: ng0 
Date: Sun, 4 Sep 2016 16:10:02 +
Subject: [PATCH] gnu: Add darcs.

* gnu/packages/version-control.scm (darcs): New variable.
---
 gnu/packages/version-control.scm | 96 +++-
 1 file changed, 95 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 29559bd..082640d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2015 Kyle Meyer 
 ;;; Copyright © 2015 Ricardo Wurmus 
 ;;; Copyright © 2016 Leo Famulari 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +35,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages apr)
@@ -50,6 +51,7 @@
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages nano)
   #:use-module (gnu packages ncurses)
@@ -1249,3 +1251,95 @@ a built-in wiki, built-in file browsing, built-in tickets system, etc.")
 (description "Stagit creates static pages for git repositories, the results can
 be served with a HTTP file server of your choice.")
 (license license:expat)))
+
+;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
+;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070
+;; and results of search engines will show that if the protocol is http, https
+;; is never mentioned.
+(define-public darcs
+  (package
+(name "darcs")
+(version "2.12.4")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://hackage.haskell.org/package/darcs/";
+  "darcs-" version ".tar.gz"))
+  (sha256
+   (base32
+"0jfwiwl5k8wspciq1kpmvh5yap4japrf97s9pvhcybxxhaj3ds28"
+(build-system haskell-build-system)
+(arguments
+ `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
+   "-fnetwork-uri" "-fhttp" "--flag=executable"
+   "--flag=library")
+   ;; 20 failing shell tests out of over 400. We seem to be unable to
+   ;; get the file which should show us more about the failures.
+   #:tests? #f))
+(inputs
+ `(("ghc-cmdargs" ,ghc-cmdargs)
+   ("ghc-split" ,ghc-split)
+   ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
+   ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
+   ("ghc-test-framework" ,ghc-test-framework)
+   ("ghc-quickcheck" ,ghc-quickcheck)
+   ("ghc-findbin" ,ghc-findbin)
+   ("ghc-hunit" ,ghc-hunit)
+   ("ghc-array" ,ghc-array)
+   ("ghc-async" ,ghc-async)
+   ("ghc-attoparsec" ,ghc-attoparsec)
+   ("ghc-base16-bytestring" ,ghc-base16-bytestring)
+   ("ghc-binary" ,ghc-binary)
+   ("ghc-bytestring-builder" ,ghc-bytestring-builder)
+   ("ghc-cryptohash" ,ghc-cryptohash)
+   ("ghc-data-ordlist" ,ghc-data-ordlist)
+   ("ghc-directory" ,ghc-directory)
+   ("ghc-fgl" ,ghc-fgl)
+   ("ghc-system-filepath" ,ghc-system-filepath)
+   ("ghc-graphviz" ,ghc-graphviz)
+   ("ghc-hashable" ,ghc-hashable)
+   ("ghc-haskeline" ,ghc-haskeline)
+   ("ghc-html" ,ghc-html)
+   ("ghc-mmap" ,ghc-mmap)
+   ("ghc-mtl" ,ghc-mtl)
+   ("ghc-old-time" ,ghc-old-time)
+   ("ghc-

Re: [PATCH](WIP) gforth. looking for someone with interest in this to take over.

2016-09-24 Thread ng0
宋文武  writes:

> ng0  writes:
>
>> [...]
>> Subject: [PATCH 1/2] gnu: Add gforth.
>
> Thanks, I applied it with some modifications:

Wait a minute. It was functional? My impression was this does not even
build. Maybe I was wrong. Or did you fix it through the modifications
below?

> - Rename it to gforth.scm, as it's a GNU package.

Why? There's colorforth, which I did not append, in the same file as it
is also a forth implementation. And they are not the only ones. I picked
this name as forth is the name of the language, like in lisp.scm,
scheme.scm, etc.
I want to send a patch to rename it to forth.scm and add colorforth into
the file.

> - Use synopsis and description from `guix import gnu'.
> - Remove inputs except `m4'.  libffcall is used by 'lib.fs' to dlopen
>   libraries at runtime, I think it's not useful for Guix.
> - Install gforth.el (compile and autoload not done).
>

Thank you for reviewing and applying
-- 
  ng0



Re: [PATCH] gnu: Add sendmail

2016-09-24 Thread Alex Vong
Alex Kost  writes:

> John Darrington (2016-09-17 12:11 +0200) wrote:
>
>> On Sat, Sep 17, 2016 at 05:38:26PM +0800, Alex Vong wrote:
> [...]
>>  >  > + "contrib/mmuegel" "devtools/bin/configure.sh")
>>  >  > +   (("/bin/sh") (which "bash")))
>>  >  > +
>>  >  > + (substitute* "devtools/bin/Build"
>>  >  > + (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"
>>  >  > + #t))
>>  >  I think the `#t' is not neccessary here, since `substitute*' uses
>>  >  `substitute', which will either return #t or throw an exception.
>>  >
>>  > WTF??  Didn't you complain earlier this week when I *didn't* put #t in
>>  > exactly this
>>  > scenario??
>>  >
>>  Yes, I am a different Alex :)
>>  Also, it seems we are not being consistent here, sometimes we put `#t'
>>  after `substitute*', sometimes we don't. Anyone has an idea?
>>
>> I did raise some suggestions in my earlier posts.  But again I don't
>> have any strong
>> opinion.
>
> I have a strong opinion: if a docstring of a procedure says what value
> it returns, we can rely on it, otherwise we should not guess what value
> will be returned.  In case of 'substitute*' (and 'substitute'), the
> returned value is not specified, so I think if a phase ends with
> 'substitute*', we should (or even must) add #t after it.

I see your point that one should not be relying on undocumented
features, which I agree. But I also see an alternative: to make
'substitute*' either return true or throw an exception and document
it. I think the heart of the problem is scheme is "untyped", so we rely
on the documentation. What do you think?



Re: [PATCH 01/25] gnu: Add r-hwriter.

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

If you don’t get more feedback, not even from ‘guix lint’, then I guess
you can safely push the 25 patches.  :-)

At first sight, they all sound fairly straightforward.

Thanks!

Ludo’.



Re: [PATCH] guix: gnu-build-system: add new phase patch-dot-desktop-files

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

John Darrington  skribis:

> Ludo wanted something like this, I think.  To be pushed to core-updates of 
> course...

This Ludo is a very demanding person…  ;-)

> * guix/build/gnu-build-system.scm (patch-dot-desktop-files): New procedure.

The approach looks good to me, so I’m just commenting on the style:

> +  ;; Search for BINARY in the output directory,
> +  ;; then all the input directories.
> +  (let lp ((dir-list (cons output-dir (map (lambda (i) (cdr i)) 
> inputs
> +(if (null? dir-list)
> +;; Leave unchanged if we cannot find the binary.
> +binary
> +(let ((resolv (find-files
> +   (car dir-list)
> +   (lambda (file stat)
> + ;; The candidate file must be a regular file,
> + ;; have execute permission and the correct name.
> + (and stat
> +  (eq? 'regular (stat:type stat))
> +  (not (zero? (logand #o001 (stat:perms 
> stat
> +  ((file-name-predicate
> +(string-append "^" binary "$")) file 
> stat))
> +
> +  (if (null? resolv)
> +  (lp (cdr dir-list))
> +  (car resolv))

Please use ‘match’ instead of car, cdr, etc. (see ‘patch-shebangs’ in
the same file for an example), and use full words such as “directories”
instead of “dir-list” (info "(guix) Coding Style").

I think you can write:

  (string=? binary file)

instead of using ‘file-name-predicate’.

> +(for-each (match-lambda
> +(( _ . output-dir)
> + (for-each (lambda (f)
> + (substitute* f
> +   (("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary 
> rest)
> +(string-append
> + "Exec=" (find-binary binary output-dir 
> inputs) rest))
> +
> +   (("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ 
> binary rest)
> +(string-append
> + "TryExec=" (find-binary binary output-dir 
> inputs) rest
> +   (find-files output-dir ".desktop$"

The ‘find-files’ regexp should be "\\.desktop$", or a predicate:

  (lambda (file stat)
(string-suffix? ".desktop" file))

Could you send an updated patch?

Thanks for working on it!

Ludo’.



Re: [PATCH 01/12] import: Move json-fetch to (guix import utils).

2016-09-24 Thread Ludovic Courtès
David Craven  skribis:

> Just didn't see the point of having a file json.scm file there and
> found the name to be a little misleading, but ok.

Yeah, what Eric describes is the reason.  And then (guix scripts
refresh) has this ‘maybe-updater’ macro that checks whether a given
import depends on a missing optional dependency.

Given that JSON is used a lot, we might eventually make Guile-JSON a
mandatory dependency.  We could also push David Thompson to update the
(ice-9 json) module and have it in Guile proper.  :-)

Ludo’.



Re: [PATCH] gnu: r-curl: Respect CURL_CA_BUNDLE variable.

2016-09-24 Thread Ricardo Wurmus

Leo Famulari  writes:

> On Wed, Sep 21, 2016 at 09:24:10PM +0200, Ricardo Wurmus wrote:
>> Leo Famulari  writes:
>> 
>> > On Tue, Sep 13, 2016 at 11:53:33PM +0200, Roel Janssen wrote:
>> >> This patch was essential to me being able to interact with HTTPS urls in
>> >> R.  As far as I understand, by default, R only looks for CURL_CA_BUNDLE
>> >> on Windows, but with this patch it looks for CURL_CA_BUNDLE on GNU/Linux
>> >> as well.  Is this correct?
>> >> 
>> >> I can confirm it works for me, so I'd like to see this patch pushed.
>> >
>> > It's good to hear that it works, but I still think we should run it by
>> > the upstream maintainers. We are activating C code that they
>> > specifically decided not to use on GNU / Linux. Why did they do that?
>> 
>> The comments in the code indicate that on Windows they try to load the
>> certs bundle that comes with R for Windows, i.e. in the R HOME’s “etc”
>> directory.  There is no such file on GNU, so no special handling is
>> needed.
>> 
>> On GNU this is taken care of by libcurl.  It comes with a default path
>> to the certs bundle, which can be overridden with configure flags
>> (“--with-ca-bundle” or “--with-ca-path”).  In our Guix package we don’t
>> do this (yet?), so by default SSL cert validation is broken.
>> 
>> libcurl does not respect CURL_CA_BUNDLE; it assumes that the application
>> will override the CA bundle path if it needs a special path, otherwise
>> it assumes that the default path is fine (using Guix this is not the
>> case).
>> 
>> The maintainers of the R curl package made the special case for Windows
>> because it is not needed on GNU systems following the FHS.  The best fix
>> here would be to patch libcurl such that it checks the CURL_CA_BUNDLE
>> environment variable invariably, just like the curl command line tool
>> does.  Until this is done I think we should path packages such as
>> r-curl to make them usable.  Once we have agreed on a fix to libcurl we
>> can remove all patches to individual packages using libcurl.
>
> That makes sense. Thank you for taking the time to explain.

Sure!  Pushed to master as 8f309571d3847d4bca331061e881fa01d9badb77.

~~ Ricardo