Re: Daemon update

2015-05-21 Thread Taylan Ulrich Bayırlı/Kammer
Alex Vorobiev  writes:

> Ludovic Courtès  gnu.org> writes:
>> bunch of C++11 lambdas here, a bit of ‘auto’ there.)  
>
> Does it mean it can't be installed on systems with older c++
> compilers?

FYI Guix can be "bootstrapped" very easily with the new binary tarballs
without needing to compile anything.

See the master branch's manual for some pitfalls that made it into the
0.8.2 release.  (Namely, extracting the binary tarball might change the
ownership and permissions of /, /root, and /var, if you don't pass
--skip-old-files to tar.)

After extracting the tarball there will be a /root/.guix-profile with
guix installed, and any user can call:

  /gnu/store/...-guix-.../bin/guix package -i guix

to create their ~/.guix-profile with guix installed.

After that, git checkouts of guix can be built via:

  guix environment guix --pure -E 'autoreconf -vif'
  guix environment guix --pure -E \
"./configure --with-libgcrypt-prefix=$(guix build libgcrypt | head -1)"
  guix environment guix --pure -E make

and for later re-compilations only the last line is necessary, and
sometimes the first.  'make install' should probably be avoided.

Hope that helps,
Taylan



Re: permission denied: /gnu/store/...guile...

2015-05-21 Thread Ludovic Courtès
rekado  skribis:

>>> Derive([("out","/gnu/store/vvs2c9zzl9zwrq0zwrayjlih9cpwjbcq-ibus-pinyin-1.5.0.tar.gz","sha256","a85d458dcc51ea9fd65849e63002428b3fcb3b39adcbea9214b5cb4a4cbdbc96")],[("/gnu/store/479gki04zgbysxipcb1wdl56mh1bldbx-guile-2.0.11.drv",["out"]),("/gnu/store/p20cih7k80cpqka6f06100j1ycgf3fl1-module-import.drv",["out"]),("/gnu/store/s8bacxxryg87p2ag6gl46qz6jvpdm5qs-gnutls-3.4.0.drv",["out"]),("/gnu/store/w9g2dqsfgr6n8pslwmm2lgbka96qwig4-module-import-compiled.drv",["out"])],["/gnu/store/yhds5m08mgp3a3yb2gj9imn7pkap0fc1-ibus-pinyin-1.5.0.tar.gz-builder"],"x86_64-linux","/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile",["--no-auto-compile","-L","/gnu/store/6fnbs4j7dsn6rc598d72caay00yggvh7-module-import","-C","/gnu/store/ww9kwrbs4h468vll6a3swg6dc3hr9f8i-module-import-compiled","/gnu/store/yhds5m08mgp3a3yb2gj9imn7pkap0fc1-ibus-pinyin-1.5.0.tar.gz-builder"],[("impureEnvVars","http_proxy
>>>  
>>> https_proxy"),("out","/gnu/store/vvs2c9zzl9zwrq0zwrayjlih9cpwjbcq-ibus-pinyin-1.5.0.tar.gz")])
>>>  
>> 
>>However I don’t see this derivation mention in the strace log.
>
> Oh, right.  The strace log shows the output for another package I'm working 
> on, "gnome-keyring".  There are only two things it has in common with 
> "ibus-pinyin": there is no binary substitute available and I get the same 
> error about "permission denied" when executing guile.

Could you post the output of
“stat /gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile”?

What do the following return at the Guile REPL:

  (getgr 3)
  (getpw 30001)

?

> The strace log is here: 
> http://elephly.net/downies/guile-permission-denied2.txt

Note that here, since it’s a fixed-output derivation, there’s no chroot,
unshare, etc., so it’s really just UID 30001 running that file.
Something equivalent to:

  # su guixbuilder01
  $ /gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile

> 
> rekado@banana guix $ sudo ls
> sudo: unable to stat /etc/sudoers: Permission denied
> sudo: no valid sudoers sources found, quitting
> sudo: unable to initialize policy plugin

Same with:

  /run/setuid-programs/sudo ls

?

Does /run/setuid-programs/sudo have the same inode as
$(guix build sudo)/bin/sudo?

  stat -c '%i' /run/setuid-programs/sudo \
$(guix build sudo)/bin/sudo


The only partitions are / and /home, right?

Thanks,
Ludo’.



Search paths vs. environment variables that designate a single file

2015-05-21 Thread Ludovic Courtès
宋文武  skribis:

> Ludovic Courtès  writes:
>
>> With commit dbc31ab, it is now possible to do things like:
>>
>>   eval `guix package --search-paths=suffix`
>>
>> to augment the search path environment variables instead of overriding
>> them.
> Doesn't the KIND field belong to 'search-path-specification'?
> Some variables are exact (GDK_PIXBUF_MODULE_FILE, GTK_DATA_PREFIX, etc.)
> by definition.

What do you mean?

Here ‘exact’ means:

  export PATH=/foo

whereas ‘prefix’ means:

  export PATH=/foo:$PATH

This is not a property of the ‘PATH’ variable, but rather a choice that
the user can make.

What makes ‘GDK_PIXBUF_MODULE_FILE’ particular?  From the name I’m
guessing it is *not* a search path, but rather is meant to specify a
single file.  This is not what ‘search-path-specification’ is for, at
least in its current form.

> I'd like to add 'GTK_DATA_PREFIX' and 'GTK_EXE_PREFIX' to gtk+
> as 'exact' native-search-paths.
> They generate value to profile as:
>   - /run/current-system/profile, if you have installed xfce system wide.
>   - ~/.guix-profile, if you installed xfce into user's profile.
> So, the GTK+ themes will work out-of-box.

Likewise, it seems that these are not search paths.

This is not the first time there’s this temptation to use
‘search-path-specification’ for things that are not search paths.
Clearly there seems to be a need for a similar mechanism, but we need to
find a way for formalize it.

One way might be to augment ‘search-path-specification’ to support
“single-item search paths” that basically designate a single file.

Or we could come up with a different mechanism, but it’s not clear to me
what that would be.

Thoughts?

Thanks,
Ludo’.



Re: Guix binary tarball

2015-05-21 Thread Ludovic Courtès
Mark H Weaver  skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver  skribis:
>>
>>> Here's a suggested patch:
>>>
>>> diff --git a/gnu/system/install.scm b/gnu/system/install.scm
>>> index 799851c..10fbfdd 100644
>>> --- a/gnu/system/install.scm
>>> +++ b/gnu/system/install.scm
>>> @@ -71,7 +71,14 @@ under /root/.guix-profile where GUIX is installed."
>>>(with-directory-excursion %root
>>>  (zero? (system* "tar" "--xz" "--format=gnu"
>>>  "--owner=root:0" "--group=root:0"
>>> -"-cvf" #$output ".")
>>> +"-cvf" #$output
>>> +;; Avoid adding /, /var, or /root to the 
>>> tarball,
>>> +;; so that the ownership and permissions of 
>>> those
>>> +;; directories will not be overwritten when
>>> +;; extracting the archive.
>>> +"./root/.guix-profile"
>>> +"./var/guix"
>>> +"./gnu")
>>>  
>>>  (gexp->derivation "guix-tarball.tar.xz" build
>>>#:references-graphs `(("profile" ,profile))
>>>
>>> If we did this, then we could revert 8c3a5d7059 and avoid any use of
>>> --skip-old-files.  I would be in favor of this.
>>>
>>> What do you think?
>>
>> Yes, that’s even better, please commit and revert 8c3a5d7059.
>
> Done.
>
> I would advocate releasing 0.8.3 ASAP with these fixes, since the binary
> installation method in 0.8.2 has such serious problems.
>
> What do you think?

Not sure if “serious” is appropriate (those who tested it a month ago
had no problems using it, despite the UID issue), but yes, we should aim
for a quick release.  This time, we need to get feedback /before/ the
release.  ;-)

I also want to fully understand the problem that Ricardo reported before
we release again.

Thanks,
Ludo’.



Re: [PATCH] ui: Deduplicate 'show-what-to-build*'.

2015-05-21 Thread Ludovic Courtès
David Thompson  skribis:

> From aab1d1d3ebc76a9ac9c82d3690d76cdad1128a6f Mon Sep 17 00:00:00 2001
> From: David Thompson 
> Date: Wed, 20 May 2015 18:42:35 -0400
> Subject: [PATCH] ui: Deduplicate 'show-what-to-build*'.
>
> * guix/ui.scm (show-what-to-build*): New procedure.
> * guix/scripts/environment.scm (show-what-to-build*): Delete.
> * guix/scripts/system.scm (show-what-to-build*): Likewise.
> * build-aux/make-binary-tarball.scm (show-what-to-build*): Likewise.

Aaah, thank you, please push!  :-)

Ludo’.



Re: [PATCH] gnu: r: Apply patch to fix linking against R.

2015-05-21 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From 0bb28820d47d9e02f4580253f11666e254841019 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Tue, 19 May 2015 11:53:47 +0200
> Subject: [PATCH] gnu: r: Apply patch to fix linking against R.
>
> * gnu/packages/patches/r-fix-15899.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add it.
> * gnu/packages/statistics.scm (r)[source]: Use it.

Sure, please push.

Thanks,
Ludo’.



Re: ftp Re: --with-store-dir and/or --localstatedir seem to be ignored

2015-05-21 Thread Ludovic Courtès
Alex Vorobiev  skribis:

> Ludovic Courtès  gnu.org> writes:
>
>> 
>> Alex Vorobiev  gmail.com> skribis:
>> 
>> > Thanks! I pulled the master from git and rebuilt/reinstalled guix. Now 
> I 
>> > don't see that error! But I do see another one:
>> >
>> > $ guix package -i bash
>> > looking for the latest release of GNU bash...FTP to `ftp.gnu.org' 
> failed:
>> > 530: User access denied.
>> 
>> This is annoying but harmless: ‘guix package’ is looking for the latest
>> Bash version available at ftp.gnu.org to tell you whether a newer one is
>> available upstream.  Here it cannot do that, so it just proceeds with
>> installation.
>
> Hi,
> How is it harmless? The error just causes the command to show the backtrace 
> and quit. It does not proceed with the installation.

I actually experience the same thing yesterday on a network that blocked
FTP, and noticed that this was indeed not working as intended.

Commit 820a403 fixes that (you can get it with “guix pull”.)

Thanks!

Ludo’.



Re: [PATCH] scripts: Move 'set-build-options-from-command-line*' to (guix scripts build) module.

2015-05-21 Thread Ludovic Courtès
David Thompson  skribis:

> From 8bb17b4ce15e6db8c9a6aea3cd83208dd76f8e8c Mon Sep 17 00:00:00 2001
> From: David Thompson 
> Date: Wed, 20 May 2015 18:48:10 -0400
> Subject: [PATCH] scripts: Move 'set-build-options-from-command-line*' to (guix
>  scripts build) module.
>
> * guix/scripts/build.scm (set-build-options-from-command-line*): New
>   procedure.
> * guix/scripts/environment.scm (set-build-options-from-command-line*): Delete.

OK!

Ludo'.



Re: Daemon update

2015-05-21 Thread Ludovic Courtès
Alex Vorobiev  skribis:

> Does it mean it can't be installed on systems with older c++
> compilers?

On these systems, I would suggest installing from the binary tarball.

Not having to build Guile, libgcrypt, and everything on such a system is
already a good incentive to use the binary tarball.

How does that sound?

Thanks,
Ludo’.



Re: [PATCH 03/10] gnu: hurd: Pass --build to gnumach-headers when not cross building.

2015-05-21 Thread Manolis Ragkousis
Done.

Manolis



Re: [PATCH 04/10] gnu: hurd: Pass --build to hurd-headers when not cross building.

2015-05-21 Thread Manolis Ragkousis
Done.

Manolis



Re: [PATCH 05/10] gnu: bison: Add m4 as a native input.

2015-05-21 Thread Manolis Ragkousis
Pushed to wip-hurd.

Manolis



Re: [PATCH 06/10] gnu: flex: Add m4 as a native input.

2015-05-21 Thread Manolis Ragkousis
Done and pushed to wip-hurd.

Manolis



Re: [PATCH 07/10] gnu: hurd: Add flex as an input to mig.

2015-05-21 Thread Manolis Ragkousis
Pushed to wip-hurd.

Manolis



Re: [PATCH 05/10] gnu: bison: Add m4 as a native input.

2015-05-21 Thread Ludovic Courtès
How should we manage branches?

There are improvements like these Bison and Flex changes that could go
to ‘core-updates’, which would be beneficial to everyone in the long
term.

Perhaps you could cherry-pick these changes in ‘core-updates’ and then
rebase ‘wip-hurd’ on top of it?  WDYT?

Ludo’.



Re: [PATCH 05/10] gnu: bison: Add m4 as a native input.

2015-05-21 Thread Manolis Ragkousis
On 21 May 2015 at 12:25, Ludovic Courtès  wrote:
> Perhaps you could cherry-pick these changes in ‘core-updates’ and then
> rebase ‘wip-hurd’ on top of it?  WDYT?

That's sound like a good idea. Will push those two to core-updates,
rebase wip-hurd on top of core-updates and push the new wip-hurd.

Manolis



Re: [PATCH]: gnu: shogun: Remove non-free source files.

2015-05-21 Thread Ricardo Wurmus
Attached is a patch to remove non-free source files as well as anything
in a "#ifdef USE_SVMLIGHT ... #endif" block.

>From d409756bd2fc2db396d6257cfed42a213f6f43f6 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Fri, 8 May 2015 16:53:28 +0200
Subject: [PATCH] gnu: shogun: Remove non-free source files.

* gnu/packages/bioinformatics.scm (shogun)[source]: Add snippet to remove
  non-free sources.
---
 gnu/packages/bioinformatics.scm | 36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index fa7ff4c..e1dfda1 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1605,7 +1605,41 @@ against local background noises.")
  "/sources/shogun-" version ".tar.bz2"))
(sha256
 (base32
- "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb"
+ "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb"))
+   (modules '((guix build utils)
+  (ice-9 rdelim)))
+   (snippet
+'(begin
+   ;; Remove non-free sources and files referencing them
+   (for-each delete-file
+ (find-files "src/shogun/classifier/svm/"
+ "SVMLight\\.(cpp|h)"))
+   (for-each delete-file
+ (find-files "examples/undocumented/libshogun/"
+ (string-append
+  "(classifier_.*svmlight.*|"
+  "evaluation_cross_validation_locked_comparison).cpp")))
+   ;; Remove non-free functions.
+   (for-each
+(lambda (file)
+  (with-atomic-file-replacement file
+(lambda (in out)
+  (let loop ((line (read-line in 'concat))
+ (skipping? #f))
+(if (eof-object? line)
+#t
+(let ((skip-next?
+   (or (and skipping?
+(not (string-prefix?
+  "#endif //USE_SVMLIGHT" line)))
+   (string-prefix?
+"#ifdef USE_SVMLIGHT" line
+  (when (or (not skipping?)
+(and skipping? (not skip-next?)))
+(display line out))
+  (loop (read-line in 'concat) skip-next?)))
+(find-files "src/shogun/kernel/"
+"^Kernel\\.(cpp|h)"))
 (build-system cmake-build-system)
 (arguments
  '(#:tests? #f ;no check target
-- 
2.1.0



Re: [PATCH 05/10] gnu: bison: Add m4 as a native input.

2015-05-21 Thread Manolis Ragkousis
Done.



[PATCH] Add optional dependencies to ipython.

2015-05-21 Thread Ricardo Wurmus
>From 9243823abad3943bd3f4ebe4f6d18cc53c2143e0 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 15:24:11 +0200
Subject: [PATCH] gnu: python-ipython: Add optional dependencies.

* gnu/packages/python.scm (python-ipython)[inputs]: Add optional dependencies
  "python-tornado" and "python-pyzmq".
---
 gnu/packages/python.scm | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5e4217a..9548d33 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3016,13 +3016,15 @@ Python language binding specification.")
(base32 "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y"
 (build-system python-build-system)
 (outputs '("out" "doc"))
-;; FIXME: add optional dependencies when available: pyzmq, tornado, ...
+;; FIXME: add optional dependencies when available: pexpect
 (inputs
  `(("readline" ,readline)
("python-matplotlib" ,python-matplotlib)
("python-numpy" ,python-numpy-bootstrap)
("python-numpydoc" ,python-numpydoc)
-   ("python-nose" ,python-nose)))
+   ("python-nose" ,python-nose)
+   ("python-tornado" ,python-tornado)
+   ("python-pyzmq" ,python-pyzmq)))
 (native-inputs
  `(("pkg-config" ,pkg-config)
("python-sphinx" ,python-sphinx)
-- 
2.1.0




[PATCH] Add python-pyzmq

2015-05-21 Thread Ricardo Wurmus
>From 52803251fb0b334d29302fb4ab9531b04f0223da Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 15:20:45 +0200
Subject: [PATCH] gnu: Add python-pyzmq.

* gnu/packages/python.scm (python-pyzmq, python2-pyzmq): New variables.
---
 gnu/packages/python.scm | 37 -
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e771e17..5e4217a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -26,7 +26,7 @@
 
 (define-module (gnu packages python)
   #:use-module ((guix licenses)
-#:select (asl2.0 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
+#:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
   gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+
   psfl public-domain x11-style))
   #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
@@ -45,6 +45,7 @@
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages openssl)
   #:use-module (gnu packages perl)
@@ -3744,3 +3745,37 @@ applications.")
 
 (define-public python2-waf
   (package-with-python2 python-waf))
+
+(define-public python-pyzmq
+  (package
+(name "python-pyzmq")
+(version "14.6.0")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-";
+ version ".tar.gz"))
+   (sha256
+(base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"
+(build-system python-build-system)
+(arguments
+ `(#:configure-flags
+   (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
+   ;; FIXME: You must build pyzmq with 'python setup.py build_ext
+   ;; --inplace' for 'python setup.py test' to work.
+   #:tests? #f))
+(inputs
+ `(("zeromq" ,zeromq)))
+(native-inputs
+ `(("pkg-config" ,pkg-config)
+   ("python-nose" ,python-nose)
+   ("python-setuptools" ,python-setuptools)))
+(home-page "http://github.com/zeromq/pyzmq";)
+(synopsis "Python bindings for 0MQ")
+(description
+ "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
+(license bsd-4)))
+
+(define-public python2-pyzmq
+  (package-with-python2 python-pyzmq))
-- 
2.1.0




[PATCH] gnu: Add rsem.

2015-05-21 Thread Ricardo Wurmus
>From 93ac344b82dae538c1610dd3b1195d9dd50c9592 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 15:43:25 +0200
Subject: [PATCH] gnu: Add rsem.

* gnu/packages/bioinformatics.scm (rsem): New variable.
---
 gnu/packages/bioinformatics.scm | 78 +
 1 file changed, 78 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e1dfda1..7bc5971 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1068,6 +1068,84 @@ files and writing bioinformatics applications.")
 generated using the PacBio Iso-Seq protocol.")
   (license license:bsd-3
 
+(define-public rsem
+  (package
+(name "rsem")
+(version "1.2.20")
+(source
+ (origin
+   (method url-fetch)
+   (uri
+(string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-";
+   version ".tar.gz"))
+   (sha256
+(base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q"))
+   (patches (list (search-patch "rsem-makefile.patch")))
+   (modules '((guix build utils)))
+   (snippet
+'(begin
+   ;; remove bundled copy of boost
+   (delete-file-recursively "boost")
+   #t
+(build-system gnu-build-system)
+(arguments
+ `(#:tests? #f ;no "check" target
+   #:phases
+   (modify-phases %standard-phases
+ ;; No "configure" script.
+ ;; Do not build bundled samtools library.
+ (replace 'configure
+  (lambda _
+(substitute* "Makefile"
+  (("^all : sam/libbam.a") "all : "))
+#t))
+ (replace 'install
+  (lambda* (#:key outputs #:allow-other-keys)
+(let* ((out (string-append (assoc-ref outputs "out")))
+   (bin (string-append out "/bin/"))
+   (perl (string-append out "/lib/perl5/site_perl")))
+  (mkdir-p bin)
+  (mkdir-p perl)
+  (for-each (lambda (file)
+  (copy-file file
+ (string-append bin (basename file
+(find-files "." "rsem-.*"))
+  (copy-file "rsem_perl_utils.pm"
+ (string-append perl "/rsem_perl_utils.pm")))
+#t))
+ (add-after
+  'install 'wrap-program
+  (lambda* (#:key outputs #:allow-other-keys)
+(let ((out (assoc-ref outputs "out")))
+  (for-each (lambda (prog)
+  (wrap-program (string-append out "/bin/" prog)
+`("PERL5LIB" ":" prefix
+  (,(string-append out "/lib/perl5/site_perl")
+'("rsem-plot-transcript-wiggles"
+  "rsem-calculate-expression"
+  "rsem-generate-ngvector"
+  "rsem-run-ebseq"
+  "rsem-prepare-reference")))
+#t)
+(inputs
+ `(("boost" ,boost)
+   ("ncurses" ,ncurses)
+   ("r" ,r)
+   ("perl" ,perl)
+   ("samtools" ,samtools-0.1)
+   ("zlib" ,zlib)))
+(home-page "http://deweylab.biostat.wisc.edu/rsem/";)
+(synopsis "Estimate gene expression levels from RNA-Seq data")
+(description
+ "RSEM is a software package for estimating gene and isoform expression
+levels from RNA-Seq data.  The RSEM package provides a user-friendly
+interface, supports threads for parallel computation of the EM algorithm,
+single-end and paired-end read data, quality scores, variable-length reads and
+RSPD estimation.  In addition, it provides posterior mean and 95% credibility
+interval estimates for expression levels.  For visualization, it can generate
+BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.")
+(license license:gpl3+)))
+
 (define-public rseqc
   (package
 (name "rseqc")
-- 
2.1.0




Re: [PATCH] gnu: Add rsem.

2015-05-21 Thread Ricardo Wurmus
I'm sorry, I forgot to also commit the required patch to the Makefile.
Here's an updated patch.

>From f112436cc5b87dda23bd5ef5b0171b68cb21cda8 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 15:43:25 +0200
Subject: [PATCH] gnu: Add rsem.

* gnu/packages/bioinformatics.scm (rsem): New variable.
* gnu/packages/patches/rsem-makefile.patch: New file.
---
 gnu/packages/bioinformatics.scm  |  78 
 gnu/packages/patches/rsem-makefile.patch | 682 +++
 2 files changed, 760 insertions(+)
 create mode 100644 gnu/packages/patches/rsem-makefile.patch

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e1dfda1..7bc5971 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1068,6 +1068,84 @@ files and writing bioinformatics applications.")
 generated using the PacBio Iso-Seq protocol.")
   (license license:bsd-3
 
+(define-public rsem
+  (package
+(name "rsem")
+(version "1.2.20")
+(source
+ (origin
+   (method url-fetch)
+   (uri
+(string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-";
+   version ".tar.gz"))
+   (sha256
+(base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q"))
+   (patches (list (search-patch "rsem-makefile.patch")))
+   (modules '((guix build utils)))
+   (snippet
+'(begin
+   ;; remove bundled copy of boost
+   (delete-file-recursively "boost")
+   #t
+(build-system gnu-build-system)
+(arguments
+ `(#:tests? #f ;no "check" target
+   #:phases
+   (modify-phases %standard-phases
+ ;; No "configure" script.
+ ;; Do not build bundled samtools library.
+ (replace 'configure
+  (lambda _
+(substitute* "Makefile"
+  (("^all : sam/libbam.a") "all : "))
+#t))
+ (replace 'install
+  (lambda* (#:key outputs #:allow-other-keys)
+(let* ((out (string-append (assoc-ref outputs "out")))
+   (bin (string-append out "/bin/"))
+   (perl (string-append out "/lib/perl5/site_perl")))
+  (mkdir-p bin)
+  (mkdir-p perl)
+  (for-each (lambda (file)
+  (copy-file file
+ (string-append bin (basename file
+(find-files "." "rsem-.*"))
+  (copy-file "rsem_perl_utils.pm"
+ (string-append perl "/rsem_perl_utils.pm")))
+#t))
+ (add-after
+  'install 'wrap-program
+  (lambda* (#:key outputs #:allow-other-keys)
+(let ((out (assoc-ref outputs "out")))
+  (for-each (lambda (prog)
+  (wrap-program (string-append out "/bin/" prog)
+`("PERL5LIB" ":" prefix
+  (,(string-append out "/lib/perl5/site_perl")
+'("rsem-plot-transcript-wiggles"
+  "rsem-calculate-expression"
+  "rsem-generate-ngvector"
+  "rsem-run-ebseq"
+  "rsem-prepare-reference")))
+#t)
+(inputs
+ `(("boost" ,boost)
+   ("ncurses" ,ncurses)
+   ("r" ,r)
+   ("perl" ,perl)
+   ("samtools" ,samtools-0.1)
+   ("zlib" ,zlib)))
+(home-page "http://deweylab.biostat.wisc.edu/rsem/";)
+(synopsis "Estimate gene expression levels from RNA-Seq data")
+(description
+ "RSEM is a software package for estimating gene and isoform expression
+levels from RNA-Seq data.  The RSEM package provides a user-friendly
+interface, supports threads for parallel computation of the EM algorithm,
+single-end and paired-end read data, quality scores, variable-length reads and
+RSPD estimation.  In addition, it provides posterior mean and 95% credibility
+interval estimates for expression levels.  For visualization, it can generate
+BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.")
+(license license:gpl3+)))
+
 (define-public rseqc
   (package
 (name "rseqc")
diff --git a/gnu/packages/patches/rsem-makefile.patch b/gnu/packages/patches/rsem-makefile.patch
new file mode 100644
index 000..5481dc6
--- /dev/null
+++ b/gnu/packages/patches/rsem-makefile.patch
@@ -0,0 +1,682 @@
+This patch simplifies the Makefile, making it much easier to build rsem
+without the bundled version of samtools.  It has already been submitted
+upstream: https://github.com/bli25wisc/RSEM/pull/11
+
+From 161894e91a16c7e15af57e4fcfe8cb613711c7fa Mon Sep 17 00:00:00 2001
+From: Ricardo Wurmus 
+Date: Wed, 22 Apr 2015 14:51:07 +0200
+Subject: [PATCH 1/7] remove all headers from Makefile

[PATCH] Add python-{click,redis,rq}

2015-05-21 Thread Ricardo Wurmus
>From c4f765bbf7d92b0c643148ccecfe9fb2ccae193a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 16:19:00 +0200
Subject: [PATCH 1/3] gnu: Add python-click.

* gnu/packages/python.scm (python-click, python2-click): New variables.
---
 gnu/packages/python.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9548d33..de5cbf9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1637,6 +1637,33 @@ is used by the Requests library to verify HTTPS requests.")
 (define-public python2-certifi
   (package-with-python2 python-certifi))
 
+(define-public python-click
+  (package
+(name "python-click")
+(version "4.0")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://pypi.python.org/packages/source/c/click/click-";
+ version ".tar.gz"))
+   (sha256
+(base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "http://click.pocoo.org";)
+(synopsis "Command line library for Python")
+(description
+ "Click is a Python package for creating command line interfaces in a
+composable way with as little code as necessary.  Its name stands for
+\"Command Line Interface Creation Kit\".  It's highly configurable but comes
+with sensible defaults out of the box.")
+(license bsd-3)))
+
+(define-public python2-click
+  (package-with-python2 python-click))
+
 (define-public python-requests
   (package
 (name "python-requests")
-- 
2.1.0

>From b94c950e90e42076d554b5c49714d13d15b3c2ab Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 16:24:05 +0200
Subject: [PATCH 2/3] gnu: Add python-redis.

* gnu/packages/python.scm (python-redis, python2-redis): New variables.
---
 gnu/packages/python.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index de5cbf9..4b5e74d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2170,6 +2170,33 @@ mining and data analysis.")
`(("python2-pytz" ,python2-pytz)
  ,@(package-propagated-inputs scikit-image))
 
+(define-public python-redis
+  (package
+(name "python-redis")
+(version "2.10.3")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://pypi.python.org/packages/source/r/redis/redis-";
+ version ".tar.gz"))
+   (sha256
+(base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"
+(build-system python-build-system)
+;; Tests require a running Redis server
+(arguments '(#:tests? #f))
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)
+   ("python-pytest" ,python-pytest)))
+(home-page "https://github.com/andymccurdy/redis-py";)
+(synopsis "Redis Python Client")
+(description
+ "This package provides a Python interface to the Redis key-value store.")
+(license license:expat)))
+
+(define-public python2-redis
+  (package-with-python2 python-redis))
+
 (define-public python-cython
   (package
 (name "python-cython")
-- 
2.1.0

>From 20fda76565d1854dca3e7b10fc6083c72df16b02 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 21 May 2015 16:24:55 +0200
Subject: [PATCH 3/3] gnu: Add python-rq.

* gnu/packages/python.scm (python-rq, python2-rq): New variables.
---
 gnu/packages/python.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4b5e74d..ed24984 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2197,6 +2197,35 @@ mining and data analysis.")
 (define-public python2-redis
   (package-with-python2 python-redis))
 
+(define-public python-rq
+  (package
+(name "python-rq")
+(version "0.5.2")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://pypi.python.org/packages/source/r/rq/rq-";
+ version ".tar.gz"))
+   (sha256
+(base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"
+(build-system python-build-system)
+(propagated-inputs
+ `(("python-click" ,python-click)
+   ("python-redis" ,python-redis)))
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "http://python-rq.org/";)
+(synopsis "Simple job queues for Python")
+(description
+ "RQ (Redis Queue) is a simple Python library for queueing jobs and
+processing them in the background with workers.  It is backed by Redis and it
+is designed to have a low barrier to entry.")
+(license bsd-2)))
+
+(define-public python2-rq
+  (package-with-python2 python-rq))
+
 (define-public python-cython
   (package
 (name "python-cython")
-- 
2.1.0



Re: Search paths vs. environment variables that designate a single file

2015-05-21 Thread 宋文武
Ludovic Courtès  writes:

> 宋文武  skribis:
>
>> Ludovic Courtès  writes:
>>
>>> With commit dbc31ab, it is now possible to do things like:
>>>
>>>   eval `guix package --search-paths=suffix`
>>>
>>> to augment the search path environment variables instead of overriding
>>> them.
>> Doesn't the KIND field belong to 'search-path-specification'?
>> Some variables are exact (GDK_PIXBUF_MODULE_FILE, GTK_DATA_PREFIX, etc.)
>> by definition.
>
> What do you mean?
>
> Here ‘exact’ means:
>
>   export PATH=/foo
>
> whereas ‘prefix’ means:
>
>   export PATH=/foo:$PATH
>
> This is not a property of the ‘PATH’ variable, but rather a choice that
> the user can make.
OK.
>
> What makes ‘GDK_PIXBUF_MODULE_FILE’ particular?  From the name I’m
> guessing it is *not* a search path, but rather is meant to specify a
> single file.  This is not what ‘search-path-specification’ is for, at
> least in its current form.
Yes, that's right.
>
>> I'd like to add 'GTK_DATA_PREFIX' and 'GTK_EXE_PREFIX' to gtk+
>> as 'exact' native-search-paths.
>> They generate value to profile as:
>>   - /run/current-system/profile, if you have installed xfce system wide.
>>   - ~/.guix-profile, if you installed xfce into user's profile.
>> So, the GTK+ themes will work out-of-box.
>
> Likewise, it seems that these are not search paths.
>
> This is not the first time there’s this temptation to use
> ‘search-path-specification’ for things that are not search paths.
> Clearly there seems to be a need for a similar mechanism, but we need to
> find a way for formalize it.
Hm, currently the 'search-paths' is the only way for a specified package
to populate environment variables into profile (and builder).  I tend to
think 'search-paths' are designed for build, but they are unually useful
(and same) for profile too.
>
> One way might be to augment ‘search-path-specification’ to support
> “single-item search paths” that basically designate a single file.
>
Yes, but some conflicted inputs will bring headahce to builder.
For 'GDK_PIXBUF_MODULE_FILE', both gdk-pixbuf and librsvg have
loaders.cache file, how we ensure the one from librsvg is selected?

> Or we could come up with a different mechanism, but it’s not clear to me
> what that would be.
I have no idea about now too.

Thanks!



Need to increase 20-hour build timeout for NSS on MIPS

2015-05-21 Thread Mark H Weaver
NSS consistently fails to build on MIPS because it hits the 20 hour
timeout specified in 'package->alist' in build-aux/hydra/gnu-system.scm.

As a one-time hack, I modified the database on Hydra to increase the
timeout for  to 40 hours, and found
that the build succeeded after about 28.25 hours.

The overwhelming majority of that time is spent in the test suite -- the
build phase takes only about 10 minutes on MIPS -- but I'm reluctant to
disable the test suite for a library as security-critical as NSS.

So, we either need a way to set the timeout on a per-package basis, or
we need to increase the default timeout in gnu-system.scm.  I still
don't know how much to increase it, because in this case there were no
other builds happening on the machine for much of the time, whereas
typically there will be two builds assigned to each MIPS build slave.

Suggestions?

 Mark



Re: Guix Oficial Website

2015-05-21 Thread Luis Felipe López Acevedo

On 2015-05-18 14:45, l...@gnu.org wrote:

Andreas Enge  skribis:

On Mon, May 18, 2015 at 11:53:45AM -0500, Luis Felipe López Acevedo 
wrote:
Ludovic suggested before that we could make the download items more 
compact,

and I agree. For example, instead of having one download item per
architecture, we would have one item for GuixSD and one item for 
Guix, each
of them listing the available download alternatives (architecture, 
source,

...). For example:

---
GuixSD 0.8.2

USB installer of the Guix System Distribution.

Download for x86_64 (get signature)
Download for xi686  (get signature)
Download for ...(get signature)


That looks good.


+1

Ludo’.


OK, the new items in the download page would look like in this mock-up:

https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png

What do you think?


--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/



Re: [PATCH] profiles: Add gtk-icon-themes hook.

2015-05-21 Thread Ludovic Courtès
宋文武  skribis:

> * guix/profiles.scm (gtk-icon-themes): New function.
>   (%default-profile-hooks): Add it.

[...]

> +(define (gtk-icon-themes manifest)
> +  "Return a derivation that unions all icon themes from manifest entries and
> +creates the GTK+ 'icon-theme.cache' file for each icon theme."
> +  (define (entry-lookup-gtk+ store entry)
> +"Return the GTK+ package or store path referenced by the manifest ENTRY, 
> or
> +#f if not referenced."

Please use a comment rather than a docstring for inner defines.

> +;; Find GTK+ in a list of packages.
> +(define (by-packages packages)
> +  (find (lambda (package)
> +  (equal? "gtk+" (package-name package)))
> +packages))
> +
> +;; Find GTK+ in a list of store paths.
> +(define (by-paths paths)
> +  (find (lambda (path)
> +  (equal? "gtk+"
> +  (package-name->name+version
> +   (store-path-package-name path
> +paths))
> +
> +(match (manifest-entry-item entry)
> +  ((? package? package)
> +   (by-packages (delete-duplicates
> + (map cadr (package-transitive-inputs package)
> +  ((? string? path)
> +   (by-paths (references store path)

This procedure must be turned into a monadic procedure along these
lines (note: by-packages -> find-among-packages, and by-paths ->
find-among-store-items):

  (define (lookup-gtk+ entry)
(define (find-among-packages ...) ...)
(define (find-among-store-items ...) ...)

(with-monad %store-monad
  (match (manifest-entry-item entry)
((? package? package)
 (match (package-transitive-inputs package)
   (((labels packages . _) ...)
(return (find-among-packages packages)
((? string? item)
 (mlet %store-monad ((refs (references* item)))
   (return (find-among-store-items refs)))

> +  (define (manifest-lookup-gtk+ store manifest)
> +"Return the first GTK+ package or store path referenced by MANIFEST 
> entries,
> +or #f if not referenced by any entry."
> +(any (cut entry-lookup-gtk+ store <>) (manifest-entries manifest)))

This becomes:

  (anym %store-monad
(cut entry-lookup-gtk+ store <>)
(manifest-entries manifest))

> +  (define gtk+
> +(with-store store
> +  (manifest-lookup-gtk+ store manifest)))

Opening an extra connection like this is Very Bad.  ;-)
This is addressed by the above.

So this becomes:


  (mlet %store-monad ((gtk+ (lookup-gtk+ manifest)))
(define build
  #~(...))

...)

Could you send an updated patch?

Thank you!

Ludo’.



Re: [PATCH]: gnu: shogun: Remove non-free source files.

2015-05-21 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Attached is a patch to remove non-free source files as well as anything
> in a "#ifdef USE_SVMLIGHT ... #endif" block.

Good!

> From d409756bd2fc2db396d6257cfed42a213f6f43f6 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Fri, 8 May 2015 16:53:28 +0200
> Subject: [PATCH] gnu: shogun: Remove non-free source files.
>
> * gnu/packages/bioinformatics.scm (shogun)[source]: Add snippet to remove
>   non-free sources.

[...]

> +   ;; Remove non-free functions.
> +   (for-each
> +(lambda (file)
> +  (with-atomic-file-replacement file
> +(lambda (in out)
> +  (let loop ((line (read-line in 'concat))
> + (skipping? #f))
> +(if (eof-object? line)
> +#t
> +(let ((skip-next?
> +   (or (and skipping?
> +(not (string-prefix?
> +  "#endif //USE_SVMLIGHT" line)))
> +   (string-prefix?
> +"#ifdef USE_SVMLIGHT" line
> +  (when (or (not skipping?)
> +(and skipping? (not skip-next?)))
> +(display line out))
> +  (loop (read-line in 'concat) skip-next?)))
> +(find-files "src/shogun/kernel/"
> +"^Kernel\\.(cpp|h)"))

It would be nicer to give the lambda a name, like:

  (define (delete-ifdefs file)
...)

  ...

  (for-each delete-ifdefs (find-files ...))

OK to push with this change.

Thanks for working on it!

Ludo’.



Re: [PATCH]: gnu: shogun: Remove non-free source files.

2015-05-21 Thread Ludovic Courtès
You may actually be eligible for a GNU buck.  :-)

  http://www.gnu.org/help/gnu-bucks.html

Ludo’.



Re: [PATCH] Add python-pyzmq

2015-05-21 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From 52803251fb0b334d29302fb4ab9531b04f0223da Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 21 May 2015 15:20:45 +0200
> Subject: [PATCH] gnu: Add python-pyzmq.
>
> * gnu/packages/python.scm (python-pyzmq, python2-pyzmq): New variables.

LGTM!

Ludo'.



Re: [PATCH] Add optional dependencies to ipython.

2015-05-21 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From 9243823abad3943bd3f4ebe4f6d18cc53c2143e0 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 21 May 2015 15:24:11 +0200
> Subject: [PATCH] gnu: python-ipython: Add optional dependencies.
>
> * gnu/packages/python.scm (python-ipython)[inputs]: Add optional dependencies
>   "python-tornado" and "python-pyzmq".

LGTM.  One question though: how much does it add to the ipython’s
closure size, and is it something that many ipython users would have
little use for?

IOW, the popularity/extra-space ratio should be greater than one.  :-)

Ludo’.



Re: [PATCH] gnu: Add rsem.

2015-05-21 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From 93ac344b82dae538c1610dd3b1195d9dd50c9592 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 21 May 2015 15:43:25 +0200
> Subject: [PATCH] gnu: Add rsem.
>
> * gnu/packages/bioinformatics.scm (rsem): New variable.

LGTM!

> +   ;; remove bundled copy of boost
> +   (delete-file-recursively "boost")

Ouch, indeed!

Ludo’.



Initializing a 64bit system using guix on a 32bit OS

2015-05-21 Thread Alex Kost
Hello, I have Guix installed on a 32-bit "ArchLinux", and I use the
following command to “deploy” a 64-bit GuixSD:

$ guix system init --no-grub --system=x86_64-linux my-os-config.scm /mnt/guix

However, eventually it fails with the following output:

--8<---cut here---start->8---
...
downloading `/gnu/store/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe' from 
`http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe' (0.0 MiB 
installed)...
http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe 0.5 
KiB transferredkilling process 18626
guix system: error: build failed: a `x86_64-linux' is required to build 
`/gnu/store/zckxg5v0pdxb22kyl6jrzawj1wwrfjby-locale.drv', but I am a 
`i686-linux'
--8<---cut here---end--->8---

So I'm wondering is there a way to init a 64-bit system from a 32-bit
one or perhaps it's just not possible?

-- 
Thanks in advance,
Alex



Re: Search paths vs. environment variables that designate a single file

2015-05-21 Thread Ludovic Courtès
宋文武  skribis:

> Ludovic Courtès  writes:

[...]

>> One way might be to augment ‘search-path-specification’ to support
>> “single-item search paths” that basically designate a single file.
>>
> Yes, but some conflicted inputs will bring headahce to builder.
> For 'GDK_PIXBUF_MODULE_FILE', both gdk-pixbuf and librsvg have
> loaders.cache file, how we ensure the one from librsvg is selected?

I imagine the best we could do is to have a choose-first and a
choose-last policy, but I can’t imagine us adding a
for-GTK_PIXBUF_MODULE_FILE-make-sure-to-choose-librsvg-over-gdk-pixbuf.

So if that’s really the kind of policy that we want to express, we need
to find something else.

Ludo’.



Re: permission denied: /gnu/store/...guile...

2015-05-21 Thread rekado
> Could you post the output of
> “stat /gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile”?

~
root@banana ~# stat 
/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile
  File: ‘/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile’
  Size: 10912   Blocks: 24 IO Block: 4096   regular file
Device: 803h/2051d  Inode: 15582   Links: 1
Access: (0555/-r-xr-xr-x)  Uid: (0/root)   Gid: (0/root)
Access: 2015-05-21 09:06:47.744008648 +0200
Modify: 1970-01-01 01:00:01.0 +0100
Change: 2015-05-17 12:08:22.839537391 +0200
 Birth: -
~

> What do the following return at the Guile REPL:
>
> (getgr 3)
> (getpw 30001)
>
> ?

~
root@banana ~# guile
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)> (getgr 3)
$1 = #("guixbuild" "x" 3 ("guixbuilder01" "guixbuilder02" "guixbuilder03" 
"guixbuilder04" "guixbuilder05" "guixbuilder06" "guixbuilder07" "guixbuilder08" 
"guixbuilder09" "guixbuilder10"))
scheme@(guile-user)> (getpw 30001)
$2 = #("guixbuilder01" "x" 30001 3 "Guix Build User  1" "/var/empty" 
"/gnu/store/6v6wngdavjg0vlkpx8h69pxlzmi8cb8a-shadow-4.1.5.1/sbin/nologin")
scheme@(guile-user)> 
~

> Note that here, since it’s a fixed-output derivation, there’s no chroot,
> unshare, etc., so it’s really just UID 30001 running that file.
> Something equivalent to:
>
> # su guixbuilder01
> $ /gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile

I cannot switch to user "guixbuilder01" without having to input a password.  It 
appears that "su" is also not working as it should.

>> 
>> rekado@banana guix $ sudo ls
>> sudo: unable to stat /etc/sudoers: Permission denied
>> sudo: no valid sudoers sources found, quitting
>> sudo: unable to initialize policy plugin
>
> Same with:
>
> /run/setuid-programs/sudo ls
>
> ?

Yes, exactly the same message.

> Does /run/setuid-programs/sudo have the same inode as
> $(guix build sudo)/bin/sudo?

> stat -c '%i' /run/setuid-programs/sudo \
> $(guix build sudo)/bin/sudo

The inode is the same:

~
rekado@banana ~ $ stat -c '%i' /run/setuid-programs/sudo $(guix build 
sudo)/bin/sudo
1461970
1461970
~~

> The only partitions are / and /home, right?

I only manually mounted / (/dev/sda3) and /home (a luks logical volume):

~~
rekado@banana ~ $ mount
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
/dev/sda3 on / type ext4 (rw,relatime,data=ordered)
none on /dev type devtmpfs (rw,relatime,size=1966132k,nr_inodes=491533,mode=755)
none on /dev/pts type devpts (rw,relatime,gid=996,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime,size=1970696k)
/dev/sda3 on /gnu/store type ext4 (rw,relatime,data=ordered)
/dev/mapper/fedora-home on /home type ext4 (rw,relatime,data=ordered)
rekado@banana ~ $ 
~

Thank you,
Ricardo




Synaptics & libinput driver

2015-05-21 Thread Ludovic Courtès
Alex Kost  skribis:

> Daniel Pimentel (2015-05-20 16:12 +0300) wrote:
>
>> On 2015-05-20 09:24, l...@gnu.org wrote:
>>> Daniel Pimentel  skribis:

[...]

>> Allright, so I needed to add this code to my touchpad work well:
>>
>> Section "InputClass"
>>   Identifier "touchpad catchall"
>>   Driver "synaptics"
>>   MatchIsTouchpad "on"
>>   Option "TapButton1" "1"
>>   Option "TapButton2" "-1"
>>   Option "TapButton3" "3"
>>   Option "VertEdgeScroll" "on"
>>   Option "HorizTwoFingerScroll" "on"
>> EndSection
>>
>> What's solution? Add it to config.scm (is very long code to it?)?
>
> It's probably not a solution for you, but what I do is: I have Xorg
> server and required modules (xf86-input-evdev, …) installed in my
> user profile; and I start it with "-configdir /path/to/my/xorg.conf.d"
> option.

Commit d1cdd7b adds a more pleasant solution whereby one can specify
text to be added verbatim to the Xorg config file, like:

  (define input-class
"Section \"InputClass" ...")

  (define (my-slim-service)
(mlet %store-monad ((config (xorg-configuration-file
 #:extra-config (list input-class)))
(startx (xorg-start-command
 #:configuration-file config)))
  (slim-service #:startx startx)))

  (operating-system
;; ...
(services (cons (my-slim-service) ...)))

But more importantly, it seems to be that these things are supposed to
work out-of-the-box nowadays.

Commit c2ee19e adds the libinput Xorg driver in the server configuration
file, which might help.  It is described as the “future” of input
drivers:

  http://who-t.blogspot.fr/2015/01/xf86-input-libinput-compatibility-with.html

Ludo’.



Re: Guix Oficial Website

2015-05-21 Thread Andreas Enge
On Thu, May 21, 2015 at 01:48:32PM -0500, Luis Felipe López Acevedo wrote:
> OK, the new items in the download page would look like in this mock-up:
> https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png
> What do you think?

Much clearer, well done!

Andreas




Re: Guix Oficial Website

2015-05-21 Thread Ludovic Courtès
Luis Felipe López Acevedo  skribis:

> OK, the new items in the download page would look like in this mock-up:
>
> https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png
>
> What do you think?

Clearer and very nice!

How would you like to go about implementing it?  :-)
Mathieu(?) or myself could surely help for the Scheme side, if needed.

Ludo’.



Re: Guix Oficial Website

2015-05-21 Thread Luis Felipe López Acevedo

On 2015-05-21 16:09, l...@gnu.org wrote:

Luis Felipe López Acevedo  skribis:

OK, the new items in the download page would look like in this 
mock-up:


https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png

What do you think?


Clearer and very nice!

How would you like to go about implementing it?  :-)
Mathieu(?) or myself could surely help for the Scheme side, if needed.

Ludo’.


I think I understand the Scheme side of the website now and I'm able to 
build the HTML using the REPL, so I'd like to give it a try.


I'll ask for help if needed :)

Thanks,


--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/



Re: Guix Oficial Website

2015-05-21 Thread Paul van der Walt

On 2015-05-21 at 20:48, quoth Luis Felipe López Acevedo:
> OK, the new items in the download page would look like in this mock-up:
>
> https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png
>
> What do you think?

This solves my previous gripe, too.  Great! :)


signature.asc
Description: PGP signature


Re: Guix Oficial Website

2015-05-21 Thread Ludovic Courtès
Luis Felipe López Acevedo  skribis:

> OK, the new items in the download page would look like in this mock-up:
>
> https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png

I just realized that there’s the problem that the binary tarball and
source should link to different installation instructions.

Maybe the source should be completely separate?

Ludo’.



Re: Website, differentiating GuixSD vs Guix

2015-05-21 Thread Luis Felipe López Acevedo

On 2015-05-20 14:22, Paul van der Walt wrote:

Hello Guix,

Minor headache i had, thought i'd share.

Went to the website to download the binary tarball (which seems to work
very well, kudos!), but was bitten by the fact that the GuixSD and GNU
Guix downloads aren't separated. I first ended up with GuixSD instead 
of

Guix, then after reading way too quickly concluded that i686 was what i
wanted, ended up with the wrong Guix for my platform (x86_64, which is
visually at the end of the "list" containing GuixSD 0.8.2 (x86_64) and
GuixSD 0.8.2 (i686)).

So, i realise i should read more carefully and all, but perhaps a
horizontal rule between the two GuixSD and the 4 GNU Guix downloads
would be nice?

Feel free to call me hasty and myopic or just ignore me. Otherwise it
looks really polished, congrats :)

Ciao,
p.


Hey, Paul, thanks for your feedback.

The items in the download page will be updated to look like in the 
following mock-up to make them more compact:


https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png

Hopefully, the new design will also help people who push buttons without 
reading (just kidding :)).


--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/



Re: Guix Oficial Website

2015-05-21 Thread Luis Felipe López Acevedo

On 2015-05-21 16:43, l...@gnu.org wrote:

Luis Felipe López Acevedo  skribis:

OK, the new items in the download page would look like in this 
mock-up:


https://multimedialib.files.wordpress.com/2015/05/guixsd-downloads-mockup-2015-05-21.png


I just realized that there’s the problem that the binary tarball and
source should link to different installation instructions.

Maybe the source should be completely separate?

Ludo’.


I think it's ok to have a separate item for the source.


--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/



Re: permission denied: /gnu/store/...guile...

2015-05-21 Thread Ludovic Courtès
Could you try this:

--8<---cut here---start->8---
(chdir "/tmp")
(setgroups #())
(setgid 3)
(setuid 30001)
(pk 'uid/gid (getuid) (getgid))
(pk 'euid/egid (geteuid) (getegid))
(let loop ((i 3))
  (when (< i 1024)
(false-if-exception (close-fdes i))
(loop (+ 1 i
(execl "/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile" 
"guile"
   "-c" "(pk 'running (getuid) (geteuid))")
--8<---cut here---end--->8---

and then as root run:

  # guile the-above-file.scm

It should return zero and print:

--8<---cut here---start->8---
;;; (uid/gid 30001 3)

;;; (euid/egid 30001 3)

;;; (running 30001 30001)
--8<---cut here---end--->8---

TIA,
Ludo’.



Re: Need to increase 20-hour build timeout for NSS on MIPS

2015-05-21 Thread Ludovic Courtès
Mark H Weaver  skribis:

> So, we either need a way to set the timeout on a per-package basis, or
> we need to increase the default timeout in gnu-system.scm.  I still
> don't know how much to increase it, because in this case there were no
> other builds happening on the machine for much of the time, whereas
> typically there will be two builds assigned to each MIPS build slave.
>
> Suggestions?

What about using the ‘properties’ field of the package:

  (define-public nss
(package
  ;; ...
  (properties `((timeout . ,(* 40 3600))

and then have gnu-system.scm honor it when present?

Thanks,
Ludo’.



Xfce halt permission

2015-05-21 Thread Daniel Pimentel
Hi Guix, I'd like to add halt permission to normal user in XFCE session. 
The halt binary is in system profile:

/run/current-system/profile/sbin/halt
How to add halt binary to my normal user?

Thanks for help
--
Daniel Pimentel (d4n1)
GnuPG (0B1A1914)
FSF (13054)



Re: [PATCH] gnu: Add adwaita-icon-theme.

2015-05-21 Thread 宋文武
Federico Beffa  writes:

>> With 'gtk+', it will:
>> 1. use gtk-update-icon-cache to build a index-theme.cache   (ok)
>> 2. use gtk-encode-symbolic-svg to convert symbolic SVGs to PNGs (failed)
>
> To enable the SVG functionality of gdk-pixbuf you have to refer to the
> cache in the librsvg package, not the default in the gdk-pixbuf
> package. See gnome-themes-standard.
That's used at runtime, for 'gtk-encode-symbolic-svg', SVG support is
always needed, so I'd like to wrap it. 

And it seems to me that gnome-themes-standard doesn't require librsvg
to build.  The code to set 'GDK_PIXBUF_MODULE_FILE' in the builder
doesn't affect anything when running, it's redudant.



Is it possible add 'Guix package manager without "make install"' to guix doc?

2015-05-21 Thread Feng Shu

Christopher Allan Webber's blog: Guix package manager without "make install"


http://dustycloud.org/blog/guix-package-manager-without-make-install/


seem very useful, is it possible add to guix doc?

Thanks!

-- 




Add ssd and sawfish-page

2015-05-21 Thread Feng Shu


For Sawfish user, the below two packages are very useful, suggest add to guix.

1. https://github.com/SawfishWM/ssd
2. https://github.com/SawfishWM/sawfish-pager


Thanks

-- 




emacs toolbar with no icon.

2015-05-21 Thread Feng Shu

After install emacs with  "guix package -i emacs",  emacs toolbar show
no icon, after I install "gnome-icon-theme" and "gnome-themes-standard",
the icons showed.

Does it dependencies miss?

-- 




Re: Daemon update

2015-05-21 Thread Alexander Vorobiev
Ludo', Taylan,

Doesn't binary distribution have hardcoded /gnu/* paths? I can't use those
unfortunately. We have a standard configuration of RHEL 6.5 installed on
hundreds of servers and any modifications of the root directory (and all
other "standard" directories) layout are out of question. Would it be too
hard to add an environment variable(s) pointing to a Guix's store and cache
directories so that the binary build of the daemon doesn't depend on the
hardcoded values?
Thanks,
Alex

On Thu, May 21, 2015 at 3:24 AM, Ludovic Courtès  wrote:

> Alex Vorobiev  skribis:
>
> > Does it mean it can't be installed on systems with older c++
> > compilers?
>
> On these systems, I would suggest installing from the binary tarball.
>
> Not having to build Guile, libgcrypt, and everything on such a system is
> already a good incentive to use the binary tarball.
>
> How does that sound?
>
> Thanks,
> Ludo’.
>


Re: [PATCH] profiles: Add gtk-icon-themes hook.

2015-05-21 Thread 宋文武
Ludovic Courtès  writes:

> 宋文武  skribis:
>
>> * guix/profiles.scm (gtk-icon-themes): New function.
>>   (%default-profile-hooks): Add it.
>
> [...]
>
>> +(define (gtk-icon-themes manifest)
>> +  "Return a derivation that unions all icon themes from manifest entries and
>> +creates the GTK+ 'icon-theme.cache' file for each icon theme."
>> +  (define (entry-lookup-gtk+ store entry)
>> +"Return the GTK+ package or store path referenced by the manifest 
>> ENTRY, or
>> +#f if not referenced."
>
> Please use a comment rather than a docstring for inner defines.
OK.
>
>> +;; Find GTK+ in a list of packages.
>> +(define (by-packages packages)
>> +  (find (lambda (package)
>> +  (equal? "gtk+" (package-name package)))
>> +packages))
>> +
>> +;; Find GTK+ in a list of store paths.
>> +(define (by-paths paths)
>> +  (find (lambda (path)
>> +  (equal? "gtk+"
>> +  (package-name->name+version
>> +   (store-path-package-name path
>> +paths))
>> +
>> +(match (manifest-entry-item entry)
>> +  ((? package? package)
>> +   (by-packages (delete-duplicates
>> + (map cadr (package-transitive-inputs package)
>> +  ((? string? path)
>> +   (by-paths (references store path)
>
> This procedure must be turned into a monadic procedure along these
> lines (note: by-packages -> find-among-packages, and by-paths ->
> find-among-store-items):
>
>   (define (lookup-gtk+ entry)
> (define (find-among-packages ...) ...)
> (define (find-among-store-items ...) ...)
>
> (with-monad %store-monad
>   (match (manifest-entry-item entry)
> ((? package? package)
>  (match (package-transitive-inputs package)
>(((labels packages . _) ...)
> (return (find-among-packages packages)
> ((? string? item)
>  (mlet %store-monad ((refs (references* item)))
>(return (find-among-store-items refs)))
>
DONE.
>> +  (define (manifest-lookup-gtk+ store manifest)
>> +"Return the first GTK+ package or store path referenced by MANIFEST 
>> entries,
>> +or #f if not referenced by any entry."
>> +(any (cut entry-lookup-gtk+ store <>) (manifest-entries manifest)))
>
> This becomes:
>
>   (anym %store-monad
> (cut entry-lookup-gtk+ store <>)
> (manifest-entries manifest))
This doesn't work, 'anym' need a list of monadic values, I endup with:

  (anym %store-monad
(lambda (x) x) ; any better idea?
(map entry-lookup-gtk+ (manifest-entries manifest)))
>
>> +  (define gtk+
>> +(with-store store
>> +  (manifest-lookup-gtk+ store manifest)))
>
> Opening an extra connection like this is Very Bad.  ;-)
> This is addressed by the above.
>
> So this becomes:
>
>
>   (mlet %store-monad ((gtk+ (lookup-gtk+ manifest)))
> (define build
>   #~(...))
>
> ...)
>
> Could you send an updated patch?
Here it is:
>From 96381da9c8680e2060e1c13c59698c635498094b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Sat, 9 May 2015 12:45:39 +0800
Subject: [PATCH] profiles: Add gtk-icon-themes hook.

* guix/profiles.scm (gtk-icon-themes): New function.
  (%default-profile-hooks): Add it.
---
 guix/profiles.scm | 82 +--
 1 file changed, 80 insertions(+), 2 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 9cb226e..d386d80 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Nikita Karetnikov 
 ;;; Copyright © 2014 Alex Kost 
 ;;; Copyright © 2015 Mark H Weaver 
+;;; Copyright © 2015 Sou Bunnbu 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -586,12 +587,89 @@ MANIFEST.  Single-file bundles are required by programs such as Git and Lynx."
 #:modules '((guix build utils))
 #:local-build? #t))
 
+(define (gtk-icon-themes manifest)
+  "Return a derivation that unions all icon themes from manifest entries and
+creates the GTK+ 'icon-theme.cache' file for each icon theme."
+  ;; Return as a monadic value the GTK+ package or store path referenced by the
+  ;; manifest ENTRY, or #f if not referenced.
+  (define (entry-lookup-gtk+ entry)
+(define (find-among-packages packages)
+  (find (lambda (package)
+  (equal? "gtk+" (package-name package)))
+packages))
+
+(define (find-among-store-items items)
+  (find (lambda (item)
+  (equal? "gtk+"
+  (package-name->name+version
+   (store-path-package-name item
+items))
+
+;; XXX: put into (guix store).
+(define references*
+  (store-lift references))
+
+(with-monad %store-monad
+  (match (manifest-entry-item entry)
+((? package? package)
+ (match (package-transitive-inputs package)
+   (((labels packages . _) ...)
+(