[PATCH] tk: Hardcode path to TK_LIBRARY.

2015-11-11 Thread 宋文武

I did it for nixpkgs too :-)From 6c9ea521e88d36bd1ce990a561477ec0e2950017 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Thu, 12 Nov 2015 13:31:19 +0800
Subject: [PATCH] tk: Hardcode path to TK_LIBRARY.

Fixes .

* gnu/packages/patches/tk-find-library.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/tcl.scm (tk)[source]: Add patch.
---
 gnu-system.am  |  1 +
 gnu/packages/patches/tk-find-library.patch | 30 ++
 gnu/packages/tcl.scm   |  3 ++-
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/tk-find-library.patch

diff --git a/gnu-system.am b/gnu-system.am
index 0b716c7..e7c1b7f 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -662,6 +662,7 @@ dist_patch_DATA =		\
   gnu/packages/patches/texi2html-document-encoding.patch	\
   gnu/packages/patches/texi2html-i18n.patch			\
   gnu/packages/patches/tidy-CVE-2015-5522+5523.patch		\
+  gnu/packages/patches/tk-find-library.patch			\
   gnu/packages/patches/torsocks-dns-test.patch			\
   gnu/packages/patches/tvtime-gcc41.patch			\
   gnu/packages/patches/tvtime-pngoutput.patch			\
diff --git a/gnu/packages/patches/tk-find-library.patch b/gnu/packages/patches/tk-find-library.patch
new file mode 100644
index 000..89c4781
--- /dev/null
+++ b/gnu/packages/patches/tk-find-library.patch
@@ -0,0 +1,30 @@
+This patch hardcode where Tk found its script library during package
+initialization.
+
+See .
+
+diff --git a/generic/tkWindow.c b/generic/tkWindow.c
+index b5cbbab..96b5501 100644
+--- a/generic/tkWindow.c
 b/generic/tkWindow.c
+@@ -988,6 +988,7 @@ TkCreateMainWindow(
+ 
+ Tcl_SetVar2(interp, "tk_patchLevel", NULL, TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "tk_version",NULL, TK_VERSION, TCL_GLOBAL_ONLY);
++Tcl_SetVar2(interp, "tk_library",NULL, TK_LIBRARY, TCL_GLOBAL_ONLY);
+ 
+ tsdPtr->numMainWindows++;
+ return tkwin;
+diff --git a/unix/Makefile.in b/unix/Makefile.in
+index f21fdbb..c61b0df 100644
+--- a/unix/Makefile.in
 b/unix/Makefile.in
+@@ -1029,7 +1029,7 @@ tkVisual.o: $(GENERIC_DIR)/tkVisual.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
+ 
+ tkWindow.o: $(GENERIC_DIR)/tkWindow.c
+-	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c
++	$(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" $(GENERIC_DIR)/tkWindow.c
+ 
+ tkButton.o: $(GENERIC_DIR)/tkButton.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index 5b55ccc..c18b8b5 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -140,7 +140,8 @@ X11 GUIs.")
  version "/tk" version "-src.tar.gz"))
  (sha256
   (base32
-   "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"
+   "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"))
+ (patches (list (search-patch "tk-find-library.patch")
 (build-system gnu-build-system)
 (arguments
  '(#:phases (modify-phases %standard-phases
-- 
2.6.2



The problem of "guix build emacs --with-source=./emacs"

2015-11-11 Thread tumashu
When I use the below command to build emacs from emacs.git

guix build emacs --with-source=./emacs   (emacs dir is git repo)

Build fail, after i remove the .git, build success.

The repo of emacs.git is 1.5G, is it the reason?




emacs.scm: Suggest add emacs-next or emacs-snapshot

2015-11-11 Thread tumashu
Suggest add emacs-next or emacs-snapshot and let guile-emacs inherit it, The 
reason is that
user can use it build emacs from emacs.git conveniently, for example:

guix build emacs-snapshot --with-source=./emacs-snapshot-2015.tar.gz



Re: [PATCH] edit: Friendlier error message.

2015-11-11 Thread Ludovic Courtès
Mathieu Lirzin  skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>
>> Andreas Enge  skribis:
>>
>>> On Thu, Nov 05, 2015 at 12:08:35PM +0100, Ludovic Courtès wrote:
 > +(unless (search-path (parse-path (getenv "PATH")) (%editor))
 > +  (leave (_ "Couldn't find editor '~a'. Please check $EDITOR and 
 > $PATH.")
 > + (%editor)))
>>>
>>> An additional, heterodox suggestion: Maybe also test for $VISUAL.
>>
>> AIUI, $VISUAL is for visualizing files, not for editing, no?
>
> I can't remember where I have read this, but I think this 2 variables
> exist to distinguish between line editing à la Ed, and visual editing
> à la VI.

SUS mentions ‘VISUAL’ but without saying what it’s for:

  http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08

But

says something that seems to make sense, like what you wrote.

I’ve committed a change that honors $VISUAL first, $EDITOR second.

Thanks,
Ludo’.



Re: [bug-womb] Texinfo markup in package blurbs

2015-11-11 Thread Ludovic Courtès
Hey Brandon,

Brandon Invergo  skribis:

>> Guix has gained the possibility to have Texinfo markup in package
>> descriptions¹, which is properly rendered by user interfaces and at
>> .  Often we just limit
>> ourselves to ornaments such as @dfn, @code, or @uref.
>> 
>> Perhaps we could consider using it in pkgblurbs.txt if the needed for
>> enriched text arises?
>
> pkgblurbs.txt is also used in GSRC and for generating
> https://gnu.org/manual/blurbs.html and the "featured package" blurb on
> the gnu.org front page.  So with Make, we would have to strip the markup
> while for the web we would have to convert it to HTML.  I guess we could
> do an intermediate solution, like some m4 macros, to output the desired
> format for each target, but that might be a bit over-engineered.  Ideas?

ISTR that Karl had implemented a script that converts sequences like:

  `[^ ]+'

to:

  \1

for the HTML output.

You could do something like that for “@code{foo}”.  However, that
wouldn’t scale well to other tags.

So I would suggest using Guile as well, along the lines of:

  http://git.savannah.gnu.org/cgit/guix.git/tree/guix/ui.scm#n816

and with ‘recutils->alist’ to extract the text from pkgblurbs.txt:

  http://git.savannah.gnu.org/cgit/guix.git/tree/guix/records.scm#n328

Now, I would understand if you think this is going too far in the Guile
direction, however pleasing that may be.  ;-)

> A more pertinent question: are there any blurbs in particular that you
> think should have some text marked up?

No, no particular example in mind, rather forward-looking.  I guess
those that use the `foo' sequences could be changed to @code{foo} to
begin with.

Cheers,
Ludo’.



Re: [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support.

2015-11-11 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Sun, Nov 8, 2015, at 16:08, Ludovic Courtès wrote:
>> Leo Famulari  skribis:

[...]

>> How can I test whether this works as expected?  I tried this, but I’m
>> unsure whether it’s supposed to load OpenSSL’s libssl.so directly or
>> not:
>
> There is a Lua library named luasec that provides SSL. Luasec only
> supports lua-5.1 except in an alpha release (luasec-0.6). [1]

Okay.

> I am able to load luasec by telling Lua where to look. I have lua-5.1
> and luasec in my profile:
>
> $ LUA_PATH=~/.guix-profile/share/lua/5.1/\?.lua
> LUA_CPATH=~/.guix-profile/lib/lua/5.1/\?.so lua -lssl
> Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
>> 
> ^ That is the Lua prompt, indicating that the Lua interpreter has
> successfully imported the SSL libraries. The '?' character is replaced
> by the component that Lua is currently searching for. So, if you invoke
> `lua -ssl`,  the "?.so" in LUA_CPATH is replaced by ssl.so.

OK.  So in LUA_PATH you need to list the actual .lua files (not just
their dirname), and in LUA_CPATH the .so files (not just their dirname),
right?

>> Besides, it would be nice to get rid of these hard-coded /usr/local in a
>> subsequent patch.
>
> This is related to my next step and I need some advice.
>
> We need to set LUA_PATH and LUA_CPATH properly in order for programs to
> load external Lua libraries. I have been installing Lua libraries into
> ${out}/lib/lua/${LUA_VERSION} and ${out}/share/lua/${LUA_VERSION}, so
> that they end up at, for example, ~/.guix-profile/lib/lua/5.1/ssl.so [2]

It seems we need a ‘native-search-paths’ thingie here, along these
lines:

  (search-path-specification
(variable "LUA_PATH")
(files '("share/lua/5.1"))
(file-pattern "\\.lua$")
(file-type 'regular))

See the ‘libxml2’ package for an example of how this works.

Something similar is needed for ‘LUA_CPATH’.  And then we need to make
sure to replace “5.1” with the actual version number.

That way, when Lua and luasec are in the same profile, ‘guix package
--search-paths’ will suggest the right environment variable settings
(and likewise within build environments.)

> Nixpkgs makes it all work by setting the paths in wrappers around
> programs that need to find Lua libraries. I don't fully understand how
> they generate the paths but I get the idea. Some examples:
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/xmpp/prosody/default.nix
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/quvi/tool.nix
>
> What do you think?

That sounds like the right thing.  In Guix this is achieved with
‘wrap-program’; there are several examples of packages doing that.

HTH!

Ludo’.



Re: [PATCH] Add microscheme.

2015-11-11 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Ludovic Courtès  writes:
>
>>> From 1900f3015162cc777ee79883a0cae2a21216d99c Mon Sep 17 00:00:00 2001
>>> From: Ricardo Wurmus 
>>> Date: Fri, 6 Nov 2015 22:37:40 +0100
>>> Subject: [PATCH 2/2] gnu: Add microscheme.
>>>
>>> * gnu/packages/avr.scm (microscheme): New variable.
>>
>> [...]
>>
>>> +(home-page "http://microscheme.org/";)
>>> +(synopsis "Scheme subset for Atmel microcontrollers")
>>
>> “Small Scheme implementation targeting microcontrollers”?  (“Scheme
>> subset” is vague; “Scheme” alone is already quite vague.  ;-))
>>
>> I would tend to put it in scheme.scm.  Also, it apparently builds on all
>> the CPUs that we use, so I’m not sure if it’s worth mentioning Atmel
>> here?
>
> I placed it in ‘scheme.scm’ before, but then noticed that we have an
> AVR-specific module and moved it there.  It’s not a general purpose
> implementation of Scheme.
>
> Microscheme invokes avr-gcc and needs avrdude to upload the binary to
> the target.  While it can be used on any of the CPUs for which we offer
> support, its purpose is to generate binary code for a subset of the
> Atmel AVRs: Atmega168/328, Atmega2560, Atmega32u4.
>
> You can run programmes written in microscheme on something that’s not a
> microcontroller by loading up ‘emulator.scm’ first, but that’s just
> intended as a development tool.

Ah OK, then indeed, avr.scm is a good choice.

> I don’t mind changing the synopsis, though, as the description is pretty
> clear on what targets are supported.

OK!

Thanks,
Ludo’.



Re: [PATCH 5/5] gnu: Add gnome-shell.

2015-11-11 Thread Ludovic Courtès
iyzs...@member.fsf.org (宋文武) skribis:

> WIP, gdm and gnome-shell won't start.
>
> I haven't look much about gdm.
>
> gnome-shell still missing some runtime depends (as typelib) like
> network-manager, etc.
>
> I post those patches to ML to track the process, let's package GNOME :-)

Ah OK, makes sense.  :-)

Thanks for working on it!

Ludo’.



Re: [PATCH 4/5] gnu: Add gdm.

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

> * gnu/packages/gnome.scm (gdm): New variable.

[...]

> + '(#:configure-flags
> +   '("--without-plymouth")

Should be on a single line.

> +   (modify-phases %standard-phases
> + (add-before
> +  'configure 'pre-configure

Could use the indentation suggested by Alex, but no big deal.

> +;; Use elogind for sd-login.
> +(substitute* '("common/gdm-common.c"
> +   "daemon/gdm-manager.c"
> +   "libgdm/gdm-user-switching.c")
> +  (("#include ")
> +   "#include "))
> +;; Avoid checking SYSTEMD using pkg-config.

That’s cool.

The rest LGTM.

So…  Next step is to have a GDM service in GuixSD.  :-)

Thanks,
Ludo’.



Re: [PATCH 3/5] gnu: Add caribou.

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

> * gnu/packages/gnome.scm (caribou): New variable.

LGTM, thanks.

Ludo’.



Re: [PATCH 1/5] gnu: Add gnome-online-accounts.

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

> * gnu/packages/gnome.scm (gnome-online-accounts): New variable.

LGTM.

Ludo'.



Re: [PATCH 2/5] gnu: Add evolution-data-server.

2015-11-11 Thread Ludovic Courtès
Alex Kost  skribis:

>> +(synopsis "Libraries and services for storing addressbooks and 
>> calendars")
>
> I think it's better to use "address books".

Yes.  It could even be simply: “Store address books and calendars.”

Ludo’.



Re: Change Log's style nitpicking!

2015-11-11 Thread Ludovic Courtès
Mathieu Lirzin  skribis:

> For example with:
>
>   gnu: Add python-oslo.log.
>   * gnu/packages/openstack.scm (python-oslo.log,
> python2-oslo.log): New variables.
>
> Change Log mode requires a parenthese as a first character with only a
> tabulation before (no extra space) to fontify the ‘python2-oslo.log’
> with the same style as ‘python-oslo.log’. In fact it imposes precisely
> what is documented in GNU Standards:
>
>   https://www.gnu.org/prep/standards/standards.html#Style-of-Change-Logs
>
> I will not claim that this is a major issue, but since we try to use GNU
> Change Log's format, let's conform to it. ;)
>
> Let me precise that my point is not about personnal preference (I prefer
> the current format), but it is about consistency within the GNU project.
>
> What do people think?

I think you’re right, let’s try to follow that (I’m the guilty party
here, having used the more “natural” variant for a long time.)

Thanks for nitpicking.  ;-)

Ludo’.



Re: guix/scripts/refresh.scm:331:14: warning: non-literal format string.

2015-11-11 Thread Ludovic Courtès
Mathieu Lirzin  skribis:

> Here is the snippet of the code producing this warning:
>
>   (format (current-output-port)
>   (N_ (N_ "A single dependent package: ~2*~{~a~}~%"
>   "Building the following package would ensure ~d 
> \
> dependent packages are rebuilt; ~*~{~a~^ ~}~%"
>   total-dependents)
>   "Building the following ~d packages would ensure ~d 
> \
> dependent packages are rebuilt: ~{~a~^ ~}~%"
>   (length rebuilds))
>   (length rebuilds) total-dependents rebuilds)
>
> I'm not sure how Gettext plural forms should be used so:
>
> - If the code is correct, I think we should provide a comment announcing
>   the warning and explaining why this is OK.
>
> - else, how can we fix it?

I believe commit 14649b8 fixes it.  It was not obvious at first sight
how to untangle this, but making it two separate ‘format’ calls does the
trick.

Thanks,
Ludo’.



python-matplotlib: should it propagate numpy?

2015-11-11 Thread Federico Beffa
Ricardo Wurmus  writes:

> Hi Guix,
>
> with a profile containing python-2.7.10 and python2-matplotlib I did
> this:
>
> 
> [rwurmus@guix-builder:~] $ export
> GI_TYPELIB_PATH="$HOME/.guix-profile/lib/girepository-1.0"
> [rwurmus@guix-builder:~] $ export
> PYTHONPATH=$HOME/.guix-profile/lib/python2.7/site-packages
> [rwurmus@guix-builder:~] $ python
> Python 2.7.10 (default, Oct  9 2015, 22:48:33)
> [GCC 4.9.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
 import matplotlib.pyplot as plt
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/__init__.py",
>  line 180, in 
> from matplotlib.cbook import is_string_like
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/cbook.py",
>  line 33, in 
> import numpy as np
> ImportError: No module named numpy

> 

Yeah, we should propagate numpy really.

>
>
> So I installed python2-numpy into the same profile and tried again.
> This time the import statement did pass, but I cannot actually plot
> anything.
>
>
> 
 import matplotlib.pyplot as plt
 import numpy as np
 t = np.r_[0:5]
 plt.plot(t, t)
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
>  line 3092, in plot
> ax = gca()
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
>  line 828, in gca
> ax =  gcf().gca(**kwargs)
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
>  line 462, in gcf
> return figure()
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
>  line 435, in figure
> **kwargs)
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
>  line 110, in new_figure_manager
> return new_figure_manager_given_figure(num, thisFig)
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
>  line 117, in new_figure_manager_given_figure
> canvas = FigureCanvasGTK3Agg(figure)
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
>  line 25, in __init__
> backend_gtk3.FigureCanvasGTK3.__init__(self, figure)
>   File 
> "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3.py",
>  line 210, in __init__
> self._idle_event_id = GLib.idle_add(self.idle_event)
>   File "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/gi/types.py", 
> line 44, in function
> return info.invoke(*args)
> TypeError: Error invoking GLib.idle_add: Unexpected value for argument 
> 'function'

> 
>
>
> Does anyone know how to make this work?  Is this related to bug #20888?

Yes, it looks like it is related to bug #20888. You may wont to try the
'magic' command '%matplotlib' before importing it.

Matplotlib supports several back-ends, some of them like 'Agg' can only
be used to generate files, while others like 'GTK3Agg' do support
interactive operation. Of all the interactive ones, 'GTK3Agg' was the
only one where we had all the pieces to make it work. Unfortunately an
upgrade of GTK+ did break interoperability with matplotlib.

I tried several times to fix the 'GTK3Agg' back-end without success. So,
after a while I started asking to include the library 'tkinter' in our
python (see bug #20889). This would allows us to use another interactive
back-end. We are almost there, but not quite yet.

In the mean time I discovered and packaged 'emacs-ob-ipython' which
allows one to use ipython, including plotting with maptlotlib, inside of
an org-mode buffer.

Regards,
Fede



python-matplotlib: should it propagate numpy?

2015-11-11 Thread Ricardo Wurmus
Hi Guix,

with a profile containing python-2.7.10 and python2-matplotlib I did
this:


[rwurmus@guix-builder:~] $ export 
GI_TYPELIB_PATH="$HOME/.guix-profile/lib/girepository-1.0"
[rwurmus@guix-builder:~] $ export 
PYTHONPATH=$HOME/.guix-profile/lib/python2.7/site-packages
[rwurmus@guix-builder:~] $ python
Python 2.7.10 (default, Oct  9 2015, 22:48:33) 
[GCC 4.9.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/__init__.py",
 line 180, in 
from matplotlib.cbook import is_string_like
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/cbook.py",
 line 33, in 
import numpy as np
ImportError: No module named numpy
>>> 



So I installed python2-numpy into the same profile and tried again.
This time the import statement did pass, but I cannot actually plot
anything.



>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> t = np.r_[0:5]
>>> plt.plot(t, t)
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 3092, in plot
ax = gca()
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 828, in gca
ax =  gcf().gca(**kwargs)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 462, in gcf
return figure()
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 435, in figure
**kwargs)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
 line 110, in new_figure_manager
return new_figure_manager_given_figure(num, thisFig)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
 line 117, in new_figure_manager_given_figure
canvas = FigureCanvasGTK3Agg(figure)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
 line 25, in __init__
backend_gtk3.FigureCanvasGTK3.__init__(self, figure)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3.py",
 line 210, in __init__
self._idle_event_id = GLib.idle_add(self.idle_event)
  File "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/gi/types.py", 
line 44, in function
return info.invoke(*args)
TypeError: Error invoking GLib.idle_add: Unexpected value for argument 
'function'
>>> 



Does anyone know how to make this work?  Is this related to bug #20888?

~~ Ricardo



Re: Weechat doesn't start

2015-11-11 Thread Luis Felipe López Acevedo
El lun, 09-11-2015 a las 16:56 +, Andy Wingo escribió:
> On Mon 09 Nov 2015 16:27, Luis Felipe López Acevedo 
>  writes:
> 
> > I don't understand why is it looking for Python stuff in "/usr" instead
> > of using my .guix-profile. Although "guix package -I" tells me Python is
> > not installed. And so "guix package --search-paths" does not show any
> > Python variables to set.
> 
> Probably weechat needs a wrapper script installed around it that will
> set the PYTHONPATH to what it needs.
> 
> Sometimes Guix people don't experience this problem because they have
> Python installed in their profile and thus they have a PYTHONPATH set
> that happens to work.  That seems to be what has happened in this case.
> 
> Making the wrapper script is the job of python-build-system.  Weechat
> appears to be built with gnu-build-system.  Not sure what the right
> thing to do to fix this is :)
> 
> Andy

Thanks, Andy.

I reported this as a bug.


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




Reproducible builds: a means to an end

2015-11-11 Thread Ludovic Courtès
Hello!

I published a note on how I think reproducible builds fit in the bigger
picture of user freedom and user autonomy, and what role Guix can play:

  https://savannah.gnu.org/forum/forum.php?forum_id=8407

Feedback welcome!

Ludo’.


signature.asc
Description: PGP signature


GNU Guix 0.9.0 released

2015-11-11 Thread Vicente Vera
Congratulations!



Re: [PATCH] build: pull: Compile .scm files in one process.

2015-11-11 Thread Ludovic Courtès
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

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

[...]

>> (gnu scripts environment) imports (gnu packages bash), so we end up
>> loading a big bunch of (gnu packages …) modules.
>>
>> The problem is that (gnu packages commencement) refers to (gnu packages
>> bash) from its top-level.  But here, we are loading (gnu packages bash)
>> first, which somehow entails loading (gnu packages cross-base), which
>> loads (gnu packages commencement), which sees a (gnu packages bash)
>> module containing zero bindings.
>>
>> What’s unclear to me though is why (gnu packages cross-base) gets loaded
>> in the first place.
>>
>> Could you investigate in that direction?
>
> It seems to be
>
> (guix scripts environment) -> (gnu system linux-container) ->
> (gnu system) -> (gnu packages firmware) -> (gnu packages cross-base)

Good catch.

I’m not sure how to address that.  We could introduce lazy references
with ‘module-ref’ at any of these stages.  That would work but sounds
like a hack.  Hmm.  Ideas?  :-)

> It would be amazing if we could easily create graphs of Guile modules...

We can do it with ‘guild use2dot’ (with the caveat that we need to
explicitly load (guix gexp) before because otherwise it borks when it
sees #~ and the likes.)  However the resulting graph is pretty much
intractable.

That said, it may be nice to have a similar tool that we could also use
to build Makefile rules or to make a topological sort so ‘guix pull’
builds files in topological order.  But that’s more of an optimization,
I think.

Ludo’.



[PATCH] Add r-devtools.

2015-11-11 Thread Ricardo Wurmus
Hi Guix,

here’s the second batch of R packages to give us “devtools”.  I noticed
that “git2r” contains *modified* sources of libgit2, so we cannot link
it against libgit2 itself.

The git2r README says this:

  The libgit2 library has been modified, e.g. to use the R printing and
  error routines, and to use runif instead of rand.

In other places it says that libgit2 was modified to build it as an R
package.  As I don’t know what this means I’ve submitted a bug report to
ask if linking against an external libgit2 would be possible:

  https://github.com/ropensci/git2r/issues/187

I also added a note to the package recipe stating that the package
contains modified sources of libgit2.

~~ Ricardo

>From 853cd47952dad86f69d7ed9389174cc77eed17e9 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Wed, 11 Nov 2015 14:07:24 +0100
Subject: [PATCH 1/3] gnu: Add r-git2r.

* gnu/packages/statistics.scm (r-git2r): New variable.
---
 gnu/packages/statistics.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 9c277b4..870e41a 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -38,8 +38,10 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ssh)
   #:use-module (gnu packages texlive)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages base)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -1189,3 +1191,29 @@ demands of modern web APIs.  It provides useful tools for working with HTTP
 organised by HTTP verbs (@code{GET()}, @code{POST()}, etc).  Configuration
 functions make it easy to control additional request components.")
 (license license:expat)))
+
+(define-public r-git2r
+  (package
+(name "r-git2r")
+(version "0.11.0")
+(source (origin
+  (method url-fetch)
+  (uri (cran-uri "git2r" version))
+  (sha256
+   (base32
+"1h5ag8sm512jsn2sp4yhiqspc7hjq5y8z0kqz24sdznxa3b7rpn9"
+(build-system r-build-system)
+;; This R package contains modified sources of libgit2.  This modified
+;; version of libgit2 is built as the package is built.  Hence libgit2 is
+;; not among the inputs of this package.
+(inputs
+ `(("libssh2" ,libssh2)
+   ("openssl" ,openssl)
+   ("zlib" ,zlib)))
+(home-page "https://github.com/ropensci/git2r";)
+(synopsis "Access git repositories with R")
+(description
+ "This package provides an R interface to the libgit2 library, which is a
+pure C implementation of the Git core methods.")
+;; GPLv2 only with linking exception.
+(license license:gpl2)))
-- 
2.1.0

>From a8df74bb8cfc34b5ea0f62b56f8fa9ede46c622c Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Wed, 11 Nov 2015 14:07:47 +0100
Subject: [PATCH 2/3] gnu: Add r-rstudioapi.

* gnu/packages/statistics.scm (r-rstudioapi): New variable.
---
 gnu/packages/statistics.scm | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 870e41a..fd0434d 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -1217,3 +1217,21 @@ functions make it easy to control additional request components.")
 pure C implementation of the Git core methods.")
 ;; GPLv2 only with linking exception.
 (license license:gpl2)))
+
+(define-public r-rstudioapi
+  (package
+(name "r-rstudioapi")
+(version "0.3.1")
+(source (origin
+  (method url-fetch)
+  (uri (cran-uri "rstudioapi" version))
+  (sha256
+   (base32
+"0q7671d924nzqsqhs8d9p7l907bcam56wjwm7vvz44xgj0saj8bs"
+(build-system r-build-system)
+(home-page "http://cran.r-project.org/web/packages/rstudioapi";)
+(synopsis "Safely access the RStudio API")
+(description
+ "This package provides functions to access the RStudio API and provide
+informative error messages when it's not available.")
+(license license:expat)))
-- 
2.1.0

>From 9491af491f85afe7f317309946cea34f63af8221 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Wed, 11 Nov 2015 14:08:46 +0100
Subject: [PATCH 3/3] gnu: Add r-devtools.

* gnu/packages/statistics.scm (r-devtools): New variable.
---
 gnu/packages/statistics.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index fd0434d..478338f 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -1235,3 +1235,32 @@ pure C implementation of the Git core methods.")
  "This package provides functions to access the RStudio API and provide
 informative error messages when it's not available.")
 (license license:expat)))
+
+(define-public r-devtools
+ 

Re: [PATCH] build: pull: Compile .scm files in one process.

2015-11-11 Thread Taylan Ulrich Bayırlı/Kammer
l...@gnu.org (Ludovic Courtès) writes:

> taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> compiling 
>> '/gnu/store/dbkpm8rqjz096w0bchmnlj8gw15q2riy-guix-latest/guix/scripts/environment.scm'...
>> Backtrace:
>> In ice-9/boot-9.scm:
>> 2401: 19 [save-module-excursion #> ice-9/boot-9.scm:3066:17 ()>]
>> 3085: 18 [#]
>> In unknown file:
>>?: 17 [primitive-load-path "gnu/packages/cross-base" ...]
>> In ice-9/eval.scm:
>>  505: 16 [# (define-module # 
>> # ...)]
>> In ice-9/psyntax.scm:
>> 1106: 15 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...]
>>  989: 14 [scan ((define-module (gnu packages cross-base) #:use-module ...)) 
>> () ...]
>>  279: 13 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
>> In ice-9/eval.scm:
>>  411: 12 [eval # ()]
>> In ice-9/boot-9.scm:
>> 2951: 11 [define-module* (gnu packages cross-base) #:filename ...]
>> 2926: 10 [resolve-imports ((#) (#) (#) (#) ...)]
>> 2864: 9 [resolve-interface (gnu packages commencement) #:select ...]
>> 2789: 8 [#> autoload version #:key ensure)> # ...]
>> 3065: 7 [try-module-autoload (gnu packages commencement) #f]
>> 2401: 6 [save-module-excursion #> ice-9/boot-9.scm:3066:17 ()>]
>> 3085: 5 [#]
>> In unknown file:
>>?: 4 [primitive-load-path "gnu/packages/commencement" ...]
>> In ice-9/eval.scm:
>>  432: 3 Exception thrown while printing backtrace:
>> ERROR: In procedure package-location: Wrong type argument: Error while 
>> printing exception.
>
> (gnu scripts environment) imports (gnu packages bash), so we end up
> loading a big bunch of (gnu packages …) modules.
>
> The problem is that (gnu packages commencement) refers to (gnu packages
> bash) from its top-level.  But here, we are loading (gnu packages bash)
> first, which somehow entails loading (gnu packages cross-base), which
> loads (gnu packages commencement), which sees a (gnu packages bash)
> module containing zero bindings.
>
> What’s unclear to me though is why (gnu packages cross-base) gets loaded
> in the first place.
>
> Could you investigate in that direction?

It seems to be

(guix scripts environment) -> (gnu system linux-container) ->
(gnu system) -> (gnu packages firmware) -> (gnu packages cross-base)

It would be amazing if we could easily create graphs of Guile modules...

Taylan



[PATCH] Update biopython to 1.66.

2015-11-11 Thread Ben Woodcroft
I also figure with the shiny new updaters it might make things easier if 
pypi is used instead of the biopython site.


thanks.
>From bb6e9ba482ea8602afafd9f6a310a8053544bd80 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft 
Date: Wed, 11 Nov 2015 21:27:02 +1000
Subject: [PATCH] gnu: python-biopython, python2-biopython: Update to 1.66.

* gnu/packages/bioinformatics.scm (python-biopython, python2-biopython): Update to 1.66.
[source]: Use PyPi instead of biopython.org.
---
 gnu/packages/bioinformatics.scm | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f13e405..706a871 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -348,15 +348,14 @@ provide a coordinated and extensible framework to do computational biology.")
 (define-public python-biopython
   (package
 (name "python-biopython")
-(version "1.65")
+(version "1.66")
 (source (origin
   (method url-fetch)
-  (uri (string-append
-"http://biopython.org/DIST/biopython-";
-version ".tar.gz"))
+  ;; use PyPi rather than biopython.org to ease updating
+  (uri (pypi-uri "biopython" version))
   (sha256
(base32
-"13m8s9jkrw40zvdp1rl709n6lmgdh4f52aann7gzr6sfp0fwhg26"
+"1gdv92593klimg22icf5j9by7xiq86jnwzkpz4abaa05ylkdf6hp"
 (build-system python-build-system)
 (inputs
  `(("python-numpy" ,python-numpy)))
-- 
2.5.0