[DMD] [PATCH] service: Export provided-by procedure.

2015-09-03 Thread David Thompson
>From 1d1ffe513750d040ddde68c1baa0a5c59fb6b679 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Thu, 3 Sep 2015 22:46:57 -0400
Subject: [PATCH] service: Export provided-by procedure.

* modules/dmd/service.scm: Export provided-by.
---
 modules/dmd/service.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/dmd/service.scm b/modules/dmd/service.scm
index 67156dd..aece069 100644
--- a/modules/dmd/service.scm
+++ b/modules/dmd/service.scm
@@ -56,6 +56,7 @@
 lookup-services
 respawn-service
 register-services
+provided-by
 required-by
 handle-unknown
 make-forkexec-constructor
-- 
2.5.0


-- 
David Thompson
GPG Key: 0FF1D807


Re: Hack the (init) system!

2015-09-03 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes:

> We’ve all been talking about it for some time: a REPL server in dmd!
>
> This can be done by changing zero lines in dmd:

Cool hack!

> I’m tempted to just commit that.  There are shortcomings: (1) the REPL
> server runs in a thread and threads + fork don’t go together well
> (although in practice dmd only does fork followed by exec, so it’s OK),

Unfortunately, it's only okay if the code between fork and exec in the
child process is carefully written to execute only "async-signal-safe"
operations.

  http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html

I don't think we can ensure this unless the fork, exec, and everything
in between is carefully written in C.  This is not currently the case in
dmd.

So, I think we have two choices:

1. Avoid threads in dmd, i.e. either refrain from adding this REPL
   server feature, or re-implement it in a way that avoids threads.

2. Avoid 'primitive-fork' in dmd, which means reimplementing
   'fork+exec-command' in C; reimplementing the code where we currently
   use 'primitive-fork' within various guix service definitions; and
   documenting that users should never use 'primitive-fork' in their
   services.  If we choose this route, we should probably disable
   'primitive-fork' somehow, or at least have it issue a stern warning.

I don't think that we should add a set of features to dmd that will make
it fundamentally unreliable in a way that cannot be fixed.

What do you think?

  Mark



Re: Hack the (init) system!

2015-09-03 Thread Thompson, David
Hi there, me again.

On Thu, Sep 3, 2015 at 5:02 PM, Ludovic Courtès  wrote:
> Howdy Guix!
>
> We’ve all been talking about it for some time: a REPL server in dmd!
>
> This can be done by changing zero lines in dmd:
>
>
>
> Then you can do:
>
>   deco start dmd-repl
>   socat unix-connect:/var/run/dmd/repl stdio

I tried to use 'geiser-connect-local' to connect to the REPL and it
seems that Geiser just breaks when using a UNIX domain socket.  Can
anyone else reproduce this?

- Dave



Re: Hack the (init) system!

2015-09-03 Thread Thompson, David
On Thu, Sep 3, 2015 at 5:02 PM, Ludovic Courtès  wrote:
> Howdy Guix!
>
> We’ve all been talking about it for some time: a REPL server in dmd!
>
> This can be done by changing zero lines in dmd:
>
>
>
> Then you can do:
>
>   deco start dmd-repl
>   socat unix-connect:/var/run/dmd/repl stdio
>
> and tinker from there.  New ways to cra^W experiment with your system!
>
> I’m tempted to just commit that.  There are shortcomings: (1) the REPL
> server runs in a thread and threads + fork don’t go together well
> (although in practice dmd only does fork followed by exec, so it’s OK),
> and (2) for some reason ‘stop-server-and-clients!’ seems to leave open
> sockets behind it, so if you restart the REPL on the same socket, it
> fails with EADDRINUSE.
>
> Thoughts?

Awesome little hack.  Thanks!  I probably won't use this for PID 1,
but I will use something similar for my userspace dmd process.

Now, I think this solves the immediate need of being able to live hack
dmd, but I'd like to note an additional shortcoming: Thread
synchronization isssues.  As you know, there's potential for the main
dmd thread and a REPL thread to write to the same memory and blow
things up.  In practice, this would be unlikely, but it shouldn't even
be a possibility.  To accommodate programs that run in an event loop
(though I know dmd doesn't truly have this yet), Mark and I developed
the (system repl coop-server) module available in Guile 2.0.11.  This
"cooperative" REPL server can be integrated into an event loop and
guarantee that expressions are only evaluated in the context of a
single thread, in this case the main thread.  I think that this should
be the approach taken in the not-so-long term, which will require
modifying dmd itself.  I have been using the cooperative REPL server
for my game engine since Guile 2.0.11 was released and I've been able
to comfortably live hack games without fear.  Problem (1) still exists
because threads are  used for each client, but the real magic happens
via coroutines.  Not sure if we can reasonably get rid of threads
altogether and uses a non-blocking I/O model.  Might be worth looking
into, but I'm getting off-topic.

Now that we can live hack dmd, we'll need some things to help make it
pleasant.  Most of the time I am tweaking service definitions until
they are just right.  Currently, that means calling a procedure to
unload the version that exists, and then registering a new one.  I'd
like to reduce that to a single step to tighten the feedback loop.
What do you think about adding a 'register-services*' procedure, or
maybe a 'define-service' form, that first unregisters the old service
before registering the new one?

If we can achieve a safe live hacking environment, then we'll have one
hell of an init system, I say.  Thanks!

- Dave



Re: Texinfo in descriptions?

2015-09-03 Thread Ludovic Courtès
Mathieu Lirzin  skribis:

> From e691c2080929dd1390184ab4669de8b2695a237f Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin 
> Date: Fri, 7 Aug 2015 00:10:43 +0200
> Subject: [PATCH] ui: Add package-description-string.
>
> Provide support for Texinfo's markup in package description.
>
> * guix/ui.scm (%text-width, %initial-indent): New parameters.
>   (package-description-string): New variable.
>   (package->recutils): Use them.
> * emacs/guix-main.scm (%package-param-alist): Use it.
> * gnu/packages/databases.scm (perl-dbd-pg): Adapt to Texinfo's markup.
> * gnu/packages/perl.scm (perl-devel-globaldestruction)
>   (perl-devel-lexalias, perl-exporter-lite): Likewise.
> * gnu/packages/python.scm (python2-empy): Likewise.

[...]

> +++ b/gnu/packages/databases.scm
> @@ -578,7 +578,7 @@ columns, primary keys, unique constraints and 
> relationships.")
> ("postgresql" ,postgresql)))
>  (home-page "http://search.cpan.org/dist/DBD-Pg";)
>  (synopsis "DBI PostgreSQL interface")
> -(description "")
> +(description #f)

Weird, and doesn’t really match the commit log.  Maybe this hunk can be
removed?

> +(set! (@@ (texinfo plain-text) wrap*)
> +  ;; Monkey patch this private procedure to let 'package->recutils'
   ^
Please prepend “XXX” here to make the kludge more visible.  (Eventually
we should fix it in Guile.)

I tried adding an @itemize list in a description and noticed that the
initial indent is not working the way I thought:

--8<---cut here---start->8---
$ ./pre-inst-env guix package --show=emacs-let-alist
name: emacs-let-alist
version: 1.0.4
outputs: out
systems: x86_64-linux i686-linux armhf-linux mips64el-linux
dependencies: emacs-no-x-24.5
location: gnu/packages/emacs.scm:491:2
homepage: http://elpa.gnu.org/packages/let-alist.html
license: GPL 3+
synopsis: Easily let-bind values of an assoc-list by their names
description: This package offers a single Emacs Lisp macro, `let-alist'.  This
+ macro takes a first argument, whose value must be an alist (association list),
+ and a body.
+ 
+ des* iption: one
+ 
+ des* iption: two
+ 
+ des* iption: three
+ 
+ description: The macro expands to a let form containing the body, where each
+ dotted symbol inside body is let-bound to their cdrs in the alist.  Only those
+ present in the body are let-bound and this search is done at compile time.
--8<---cut here---end--->8---

Notice how “description:” is repeated for each @item and for the next
paragraph.

I wonder if using ‘fill-paragraph’ instead of ‘fill-string’ would solve
this.

Could you look into it?

Sorry for not noticing earlier!

Thanks,
Ludo’.



Re: [PATCH] gnu: ratpoison: Add multiple monitors support.

2015-09-03 Thread Ludovic Courtès
Mark H Weaver  skribis:

> Perhaps we should add a separate 'ratpoison-without-xinerama' package?
> Or maybe there's a way to configure ratpoison at run-time to do what
> Ludovic wants, even when it was compiled with xinerama support?

If the problem turns out to be on my side (i.e., between keyboard and
chair), no need for a separate package.

Ludo’.



Re: [PATCH] gnu: ratpoison: Add multiple monitors support.

2015-09-03 Thread Ludovic Courtès
Mathieu Lirzin  skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>
>> Mathieu Lirzin  skribis:
>>
>>> * gnu/packages/ratpoison.scm (ratpoison)[inputs]: Add "libxinerama".
>>
>> I found out that with this change, Ratpoison no longer works on my
>> multi-monitor setup: When it starts, windows created from my ~/.xsession
>> occupy just a subset of the screen, and as soon as I try to move things
>> around, C-t stops responding and I have to kill it.
>
> [...]
> emacs &
> exec ratpoison
>
> I've tried with this in my ~/.xsession with guix on top of
> Debian testing without any issue.

As an additional data point, my external screen is rotated by 90° and
has a higher resolution than the laptop’s screen.

I actually run the following sequence of commands *after* the WM has
started, which perhaps confuses it?

--8<---cut here---start->8---
xrandr --output "$out" --mode 1920x1200
xrandr --output "$out" --rotate left
xrandr --output "$out" --above LVDS1
--8<---cut here---end--->8---

Thanks,
Ludo’.



[PATCH 1/1] gnu: Add Anonymous Pro fonts.

2015-09-03 Thread Leo Famulari
* gnu/packages/fonts.scm (font-anonymous-pro): New variable.
---
 gnu/packages/fonts.scm | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index a78995c..75e6fe8 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -524,3 +524,45 @@ distributed with Ghostscript version 4.00.  The collection 
contains the
 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
 Heros, Pagella, Schola, Termes.")
 (license license:gfl1.0)))
+
+(define-public font-anonymous-pro
+  (package
+(name "font-anonymous-pro")
+(version "1.002")
+(source (origin
+ (method url-fetch)
+ (uri (string-append 
"http://www.marksimonson.com/assets/content/fonts/";
+ "AnonymousPro-" version ".zip"))
+ (sha256
+  (base32 
"1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"
+(build-system trivial-build-system)
+(arguments
+ `(#:modules ((guix build utils))
+   #:builder
+   (begin
+ (use-modules (guix build utils))
+ (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip"))
+   (font-dir (string-append %output "/share/fonts/truetype"))
+   (doc-dir  (string-append %output "/share/doc/" ,name)))
+   (system* unzip (assoc-ref %build-inputs "source"))
+   (mkdir-p font-dir)
+   (mkdir-p doc-dir)
+   (chdir (string-append "AnonymousPro-" ,version ".001"))
+   (for-each (lambda (ttf)
+   (copy-file ttf
+  (string-append font-dir "/" ttf)))
+ (find-files "." "\\.ttf$"))
+   (for-each (lambda (doc)
+   (copy-file doc
+  (string-append doc-dir "/" doc)))
+   (find-files "." "\\.txt$"))
+(native-inputs
+ `(("unzip" ,unzip)))
+(home-page "http://www.marksimonson.com/fonts/view/anonymous-pro";)
+(synopsis "Fixed-width fonts designed with coding in mind")
+(description "Anonymous Pro is a family of four fixed-width fonts designed
+with coding in mind.  Anonymous Pro features an international, Unicode-based
+character set, with support for most Western and Central European Latin-based
+languages, plus Greek and Cyrillic.")
+(license license:silofl1.1)))
-- 
2.4.3




[PATCH 0/1] Add Anonymous Pro fonts

2015-09-03 Thread Leo Famulari
This patch adds the Anonymous Pro fonts [1].

Your comments are requested!

I am not sure about the module name. The guidelines require placing the name
of the foundry between "font-" and "anonymous-pro". In this case, that would
result in "font-mark-simonson-studio-anonymous-pro". Seems long. And the rule
is not applied consistently to the fonts already packaged.

Suggestions?

[1] http://www.marksimonson.com/fonts/view/anonymous-pro
[2] http://www.gnu.org/software/guix/manual/html_node/Fonts.html

Leo Famulari (1):
  gnu: Add Anonymous Pro fonts.

 gnu/packages/fonts.scm | 42 ++
 1 file changed, 42 insertions(+)

-- 
2.4.3




Re: [PATCH] Build tarballs with deterministic file ordering

2015-09-03 Thread Ludovic Courtès
Mark H Weaver  skribis:

> From 92226a470ddc980e54863632e5b179bf40444bd7 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver 
> Date: Thu, 3 Sep 2015 12:51:47 -0400
> Subject: [PATCH] Build tarballs with deterministic file ordering.
>
> * guix/packages.scm (patch-and-repack)[build],
>   gnu/system/install.scm (self-contained-tarball)[build],
>   gnu/packages/make-bootstrap.scm (tarball-package),
>   gnu/packages/admin.scm (isc-dhcp),
>   gnu/packages/video.scm (avidemux): Pass "--sort=name" to 'tar'.

Good catch, OK for ‘core-updates’.

Thanks,
Ludo’.



Re: [PATCH] R dependencies

2015-09-03 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From 11e8a484733b492ff5ecd6119b9bdef238be6e67 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 3 Sep 2015 11:41:07 +0200
> Subject: [PATCH 1/3] gnu: r: Drop IcedTea from inputs.
>
> * gnu/packages/statistics.scm (r)[inputs]: Remove "icedtea6".

[...]

> From 17f4d01ce2b7bb4b41e565ac43463425e79b6c30 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 3 Sep 2015 11:41:36 +0200
> Subject: [PATCH 2/3] gnu: r: Install info documentation.
>
> * gnu/packages/statistics.scm (r)[arguments]: Add phases "make-info" and
>   "install-info" to build and install info documentation.

[...]

> From d4982f4574579fe60e005807aace966279824f01 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 3 Sep 2015 12:09:47 +0200
> Subject: [PATCH 3/3] gnu: r: Drop texlive from native-inputs.
>
> * gnu/packages/statistics.scm (r)[native-inputs]: Remove "texlive".

OK for all three.  Thanks for taking the time to investigate!

Ludo’.



[PATCHES] Get elogind-service working as intended

2015-09-03 Thread Mark H Weaver
These patches are needed to get Andy's elogind-service working as
intended, e.g. to allow things like suspend-on-lid-close and various
hot keys to work.

I'm not really happy with any of these, so if someone wants to solve
these problems in a better way, please don't hesitate to do so :)

Comments and suggestions welcome.

  Mark


>From 34d9f68b886fe590ff0efcd33d54e5d2f487ff70 Mon Sep 17 00:00:00 2001
From: Mark H Weaver 
Date: Thu, 3 Sep 2015 16:58:08 -0400
Subject: [PATCH 1/3] file-systems: Add %systemd-file-systems; add it to
 %base-file-systems.

* gnu/system/file-systems.scm (%systemd-file-systems): New variable.
  (%base-file-systems): Add %systemd-file-systems.
---
 gnu/system/file-systems.scm | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 003eb44..d03dcff 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -50,6 +50,7 @@
 %devtmpfs-file-system
 %immutable-store
 %control-groups
+%systemd-file-systems
 
 %base-file-systems
 %container-file-systems
@@ -258,6 +259,26 @@ UUID representation."
'("cpuset" "cpu" "cpuacct" "memory" "devices" "freezer"
  "blkio" "perf_event" "hugetlb")
 
+(define %systemd-file-systems
+  ;; We don't use systemd, but these file systems are needed for elogind,
+  ;; which was extracted from systemd.
+  (list (file-system
+  (device "systemd")
+  (mount-point "/run/systemd")
+  (type "tmpfs")
+  (check? #f)
+  (flags '(no-suid no-dev no-exec))
+  (options "mode=0755")
+  (create-mount-point? #t))
+(file-system
+  (device "systemd")
+  (mount-point "/run/user")
+  (type "tmpfs")
+  (check? #f)
+  (flags '(no-suid no-dev no-exec))
+  (options "mode=0755")
+  (create-mount-point? #t
+
 (define %base-file-systems
   ;; List of basic file systems to be mounted.  Note that /proc and /sys are
   ;; currently mounted by the initrd.
@@ -265,6 +286,7 @@ UUID representation."
 %pseudo-terminal-file-system
 %shared-memory-file-system
 %immutable-store)
+  %systemd-file-systems
   %control-groups))
 
 ;; File systems for Linux containers differ from %base-file-systems in that
-- 
2.4.3

>From 59921d5bd704b07d25104b7a1921380892f60a80 Mon Sep 17 00:00:00 2001
From: Mark H Weaver 
Date: Thu, 3 Sep 2015 17:12:38 -0400
Subject: [PATCH 2/3] services: Add udev rules for (upower colord elogind) to
 %desktop-services.

* gnu/services/desktop.scm (%desktop-services): Replace the 'udev-service'
  from %base-services.
* gnu/services/base.scm (%base-services): Add a comment to keep them in sync.
---
 gnu/services/base.scm|  4 
 gnu/services/desktop.scm | 25 -
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 888e446..7f37b3d 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès 
 ;;; Copyright © 2015 Alex Kost 
+;;; Copyright © 2015 Mark H Weaver 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -884,6 +885,9 @@ This is the GNU operating system, welcome!\n\n")))
   ;; The LVM2 rules are needed as soon as LVM2 or the device-mapper is
   ;; used, so enable them by default.  The FUSE and ALSA rules are
   ;; less critical, but handy.
+  ;;
+  ;; XXX Keep this in sync with the 'udev-service' call in
+  ;; %desktop-services.
   (udev-service #:rules (list lvm2 fuse alsa-utils crda)
 
 ;;; base.scm ends here
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 1bf3db0..6017449 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Ludovic Courtès 
 ;;; Copyright © 2015 Andy Wingo 
+;;; Copyright © 2015 Mark H Weaver 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,8 @@
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages wicd)
   #:use-module (gnu packages polkit)
+  #:use-module ((gnu packages linux)
+#:select (lvm2 fuse alsa-utils crda))
   #:use-module (guix monads)
   #:use-module (guix records)
   #:use-module (guix store)
@@ -593,12 +596,24 @@ when they log out."
  (ntp-service)
 
  (map (lambda (mservice)
-;; Provide an nscd ready to use nss-mdns.
 (mlet %store-monad ((service mservice))
-  (if (memq 'nscd (service-provision service))
-  (nscd-service (nscd-configuration)
-#:name-services (list nss-mdns))
-   

Re: '-light' vs. '-minimal' packages

2015-09-03 Thread Ludovic Courtès
Alex Kost  skribis:

> From e040b70e23f04fca1c91123751ce8b6e28719bb8 Mon Sep 17 00:00:00 2001
> From: Alex Kost 
> Date: Thu, 3 Sep 2015 11:12:28 +0300
> Subject: [PATCH] gnu: bash-light: Rename to bash-minimal.
>
> * gnu/packages/bash.scm (bash-light): Rename to ...
>   (bash-minimal): ...this.
>   (static-bash): Use it.
> * gnu/packages/make-bootstrap.scm (%bash-static): Use it.

This should go to ‘core-updates’, where there’s an additional reference
to update in commencement.scm.  OK with this change.

> From 3deea5ea0cc104993ab665863105d7ad672f5ea0 Mon Sep 17 00:00:00 2001
> From: Alex Kost 
> Date: Thu, 3 Sep 2015 11:23:30 +0300
> Subject: [PATCH] gnu: wpa-supplicant-light: Rename to wpa-supplicant-minimal.
>
> * gnu/packages/admin.scm (wpa-supplicant-light): Rename to ...
>   (wpa-supplicant-minimal): ...this.
>   (wpa-supplicant): Use it.
> * gnu/system/install.scm (installation-os): Use it.

OK for ‘master’.

Thanks,
Ludo’.



Hack the (init) system!

2015-09-03 Thread Ludovic Courtès
Howdy Guix!

We’ve all been talking about it for some time: a REPL server in dmd!

This can be done by changing zero lines in dmd:

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 888e446..f39a0a4 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -46,6 +46,7 @@
 device-mapping-service
 swap-service
 user-processes-service
+dmd-repl-service
 host-name-service
 console-keymap-service
 console-font-service
@@ -287,6 +288,34 @@ stopped before 'kill' is called."
#f))
  (respawn? #f)
 
+
+(define* (dmd-repl-service #:optional (file-name "/var/run/dmd/repl")
+   #:key (dmd dmd))
+  "Return a service that opens a REPL for dmd.  Authorized users can connect
+to the REPL at @var{file-name}, which points to a Unix-domain socket.  This
+may be done from the command using @command{socat unix-connect:@var{file-name}
+stdio}, or from Emacs using @code{M-x geiser-connect-local}."
+  (with-monad %store-monad
+(return (service
+ (documentation "Run a REPL service inside dmd.")
+ (provision '(dmd-repl))
+ (requirement '(root-file-system))
+ (start #~(begin
+(use-modules (system repl server))
+
+(lambda* (#:optional (file-name #$file-name))
+  (let ((socket (make-unix-domain-server-socket
+ #:path file-name)))
+(spawn-server socket)
+#t
+ (stop #~(begin
+   (use-modules (system repl server))
+
+   (lambda _
+ (stop-server-and-clients!)
+ #f)))
+ (auto-start? #f)
+
 (define (host-name-service name)
   "Return a service that sets the host name to @var{name}."
   (with-monad %store-monad

Then you can do:

  deco start dmd-repl
  socat unix-connect:/var/run/dmd/repl stdio

and tinker from there.  New ways to cra^W experiment with your system!

I’m tempted to just commit that.  There are shortcomings: (1) the REPL
server runs in a thread and threads + fork don’t go together well
(although in practice dmd only does fork followed by exec, so it’s OK),
and (2) for some reason ‘stop-server-and-clients!’ seems to leave open
sockets behind it, so if you restart the REPL on the same socket, it
fails with EADDRINUSE.

Thoughts?

Ludo’.


RE: New ‘guix graph’ command

2015-09-03 Thread Cook, Malcolm
Hi,

I like the request.

I think the dependent packages should be pointed to.

In this way, each node in the graph and its outgoing arrows reflect the 
contents of a single package.

~Malco

 > -Original Message-
 > From: guix-devel-bounces+mec=stowers@gnu.org [mailto:guix-devel-
 > bounces+mec=stowers@gnu.org] On Behalf Of Ludovic Courtès
 > Sent: Thursday, September 03, 2015 3:47 PM
 > To: Andreas Enge 
 > Cc: Guix-devel 
 > Subject: Re: New ‘guix graph’ command
 > 
 > Hey!
 > 
 > Andreas Enge  skribis:
 > 
 > > Very neat indeed! A tiny bit of nitpicking: Would it not be preferable
 > > if the arrows were reversed, from the inputs to the dependent packages?
 > 
 > Dunno, maybe the graph people would choose the other direction but I like it
 > this way, looks more “intuitive” to me.  What do people think?
 > 
 > Ludo’.



Re: New ‘guix graph’ command

2015-09-03 Thread Thompson, David
On Thu, Sep 3, 2015 at 4:46 PM, Ludovic Courtès  wrote:
> Hey!
>
> Andreas Enge  skribis:
>
>> Very neat indeed! A tiny bit of nitpicking: Would it not be preferable if
>> the arrows were reversed, from the inputs to the dependent packages?
>
> Dunno, maybe the graph people would choose the other direction but I
> like it this way, looks more “intuitive” to me.  What do people think?

I prefer it the way that it is because it reflects the actual data
structure.  It's intuitive because I often ask "what does this
software depend on?", not "what depends on this software?"

- Dave



Re: New ‘guix graph’ command

2015-09-03 Thread Ludovic Courtès
Hey!

Andreas Enge  skribis:

> Very neat indeed! A tiny bit of nitpicking: Would it not be preferable if
> the arrows were reversed, from the inputs to the dependent packages?

Dunno, maybe the graph people would choose the other direction but I
like it this way, looks more “intuitive” to me.  What do people think?

Ludo’.



Re: New ‘guix graph’ command

2015-09-03 Thread Andreas Enge
Hello!

On Thu, Aug 27, 2015 at 12:53:03AM +0200, Ludovic Courtès wrote:
> Here’s a long overdue ‘guix graph’ command (documentation below.)
> Comments welcome!

Very neat indeed! A tiny bit of nitpicking: Would it not be preferable if
the arrows were reversed, from the inputs to the dependent packages?

Andreas




[PATCH] Build tarballs with deterministic file ordering

2015-09-03 Thread Mark H Weaver
This is for core-updates.

Mark


>From 92226a470ddc980e54863632e5b179bf40444bd7 Mon Sep 17 00:00:00 2001
From: Mark H Weaver 
Date: Thu, 3 Sep 2015 12:51:47 -0400
Subject: [PATCH] Build tarballs with deterministic file ordering.

* guix/packages.scm (patch-and-repack)[build],
  gnu/system/install.scm (self-contained-tarball)[build],
  gnu/packages/make-bootstrap.scm (tarball-package),
  gnu/packages/admin.scm (isc-dhcp),
  gnu/packages/video.scm (avidemux): Pass "--sort=name" to 'tar'.
---
 gnu/packages/admin.scm  | 1 +
 gnu/packages/make-bootstrap.scm | 3 ++-
 gnu/packages/video.scm  | 3 ++-
 gnu/system/install.scm  | 7 ++-
 guix/packages.scm   | 1 +
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 53cf65e..512d604 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -428,6 +428,7 @@ connection alive.")
  (zero? (system* "tar" "cf" "bind.tar.gz"
  "bind-9.9.5-P1"
  ;; avoid non-determinism in the archive
+ "--sort=name"
  "--mtime=@0"
  "--owner=root:0"
  "--group=root:0"
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 904aaed..d215a02 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -629,7 +629,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
   ".tar.xz")
"."
;; avoid non-determinism in the archive
-   "--mtime=@0" "--owner=root:0" "--group=root:0"))
+   "--sort=name" "--mtime=@0"
+   "--owner=root:0" "--group=root:0"))
 
 (define %bootstrap-binaries-tarball
   ;; A tarball with the statically-linked bootstrap binaries.
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 79119ef..c2f88e2 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1015,7 +1015,8 @@ for use with HTML5 video.")
(("#! /bin/sh") (string-append "#!" (which "bash"
  (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1"
   ;; avoid non-determinism in the archive
-  "--mtime=@0" "--owner=root:0" "--group=root:0")
+  "--sort=name" "--mtime=@0"
+  "--owner=root:0" "--group=root:0")
  (delete-file-recursively "ffmpeg-2.6.1")))
  (alist-replace 'configure
   (lambda _
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index e7e5d4a..8802368 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -74,8 +74,13 @@ under /root/.guix-profile where GUIX is installed."
   ;; length limitation.
   (with-directory-excursion %root
 (zero? (system* "tar" "--xz" "--format=gnu"
-"--owner=root:0" "--group=root:0"
+
+;; avoid non-determinism in the archive
+"--sort=name"
 "--mtime=@0"  ;for files in /var/guix
+"--owner=root:0"
+"--group=root:0"
+
 "--check-links"
 "-cvf" #$output
 ;; Avoid adding / and /var to the tarball,
diff --git a/guix/packages.scm b/guix/packages.scm
index d338ad2..d73e6b0 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -482,6 +482,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
   (zero? (system* (string-append #+tar "/bin/tar")
   "cvfa" #$output directory
   ;; avoid non-determinism in the archive
+  "--sort=name"
   "--mtime=@0"
   "--owner=root:0"
   "--group=root:0")))
-- 
2.5.0



Re: [PATCH] gnu: ratpoison: Add multiple monitors support.

2015-09-03 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin  skribis:
>
>> l...@gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>>> Removing the dependency on libxinerama solves the problem for me.
>>>
>>> Am I missing something?  Should we revert it?
>>
>> On my setup it's the opposite.  Without this dependency, the two
>> monitors i have are seen by ratpoison as one "screen" So I'm not able to
>> use the commands described here (info "(ratpoison) Multiple Monitors")
>> and the display of windows is divided across the monitors.
>
> Well yes, that’s actually what I’m used to: rp sees one screen and I
> simply arrange to have one frame on one screen and a second frame on the
> second screen.

I tend to agree with Mathieu that our default ratpoison package should
include xinerama support.  Admittedly, I've not been using ratpoison
much lately, but Ludovic's method of treating multiple monitors as a
single screen would not work well in my multi-monitor use cases,
e.g. when attaching to a television to watch a video on one screen while
working on another screen, or when the two screens together do not form
a rectangle because they're not the same height.

Perhaps we should add a separate 'ratpoison-without-xinerama' package?
Or maybe there's a way to configure ratpoison at run-time to do what
Ludovic wants, even when it was compiled with xinerama support?

  Mark



Re: R dependencies

2015-09-03 Thread Vicente Vera
Hi,

Sure. The error message is this:

X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 5 at size
15 could not be loaded

No plot is being drawn; only a blank window appears.

The code:

ggplot(data = fig1, aes(x = Var1, y = Freq, fill =
brewer.pal(length(levels(the_data$VARIABLE1)), "Set3"))) +
geom_bar(stat = "identity") +
scale_fill_identity() +
labs(x = "x", y = "y") +
geom_text(aes(label = perc), vjust = 2, size = 4, colour =
"black", fontface = "bold") +
scale_x_discrete(labels = c("a", "b", "c")) +
theme(panel.background = element_blank(),
  line = element_blank(),
  axis.text.y = element_blank())

On my base system, R 3.2.1 + ggplot2 draws the plot with no problem.

It might be related to a missing font or font alias in the Guix store
(not familiar enough with it to catch the issue).

Now, I didn't installed ggplot2 through Guix, so that could be a problem.

2015-09-03 3:29 GMT-03:00 Ricardo Wurmus :
> Hi Vicente,
>
>> Going back to the R dependencies topic, I ran across an issue when
>> trying to draw a plot (with ggplot2). But first some context:
>>
>> - I'm not using GuixSD but a binary installation over Manjaro OpenRC;
>> several base packages missing on Guix
>> - I only have other two Guix packages installed: xpdf & abbaye
>
> All Guix packages capture the complete graph of dependencies, so you’ll
> always end up with the dependent packages in ‘/gnu/store’ even if only
> those packages appear in your profile that have been explicitly
> installed.
>
>> - I installed ggplot2 through install.packages("ggplot2") in R (Guix package)
>
> Note that ggplot2 has been packaged for Guix:
>
> guix package -i r-ggplot2
>
>> R complained about some fonts missing, but I think it could be related
>> to a missing X11 dependency (complete Xorg maybe?). What could it be?
>
> What is the exact error message you get?  Is any plot drawn at all?
> What is the code you use to draw the plot?
>
> ~~ Ricardo
>



Re: [PATCH] emacs-build-system: Fix a file name of info directory.

2015-09-03 Thread Thompson, David
On Thu, Sep 3, 2015 at 10:02 AM, Alex Kost  wrote:
> Currently emacs-build-system moves info files to "share/info/"
> directories (as can be seen with ‘emacs-flycheck’ package, for example).
> So "info" command (in console or emacs) can't find such manuals.  I
> think it should be changed.

LGTM.

- Dave



[PATCH] emacs-build-system: Fix a file name of info directory.

2015-09-03 Thread Alex Kost
Currently emacs-build-system moves info files to "share/info/"
directories (as can be seen with ‘emacs-flycheck’ package, for example).
So "info" command (in console or emacs) can't find such manuals.  I
think it should be changed.

>From 72a10f97a6ffd8a70fcea079a0be6a365a45b1b9 Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Thu, 3 Sep 2015 10:35:19 +0300
Subject: [PATCH] emacs-build-system: Fix a file name of info directory.

* guix/build/emacs-build-system.scm (move-doc): Adjust to use
  "/share/info" instead of its sub-directory.
---
 guix/build/emacs-build-system.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index f18db0a..c01b24f 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -83,8 +83,7 @@ store in '.el' files."
   (let* ((out (assoc-ref outputs "out"))
  (elpa-name-ver (store-directory->elpa-name-version out))
  (el-dir (string-append out %install-suffix "/" elpa-name-ver))
- (name-ver (store-directory->name-version out))
- (info-dir (string-append out "/share/info/" name-ver))
+ (info-dir (string-append out "/share/info"))
  (info-files (find-files el-dir "\\.info$")))
 (unless (null? info-files)
   (mkdir-p info-dir)
-- 
2.5.1



[PATCH] R dependencies

2015-09-03 Thread Ricardo Wurmus

Ludovic Courtès  writes:

> Speaking of which: should we get rid of icedtea6:jdk in the default R
> package (closure size: 1GiB), and maybe of TeX Live (4GiB)?  Or should
> we provide, say, ‘r-light’ with the definition above?
>
> I’m afraid having these two dependencies by default makes it
> prohibitively expensive.

I investigated this a bit and found that the JDK is not really needed at
build time.  The first patch includes a comment explaining why we
dropped the JDK from the inputs.

The second patch adds build phases to install the info documentation.

Removing texlive is possible as well, but it results in the loss of the
following files:

./lib/R/library/grid
  /doc
displaylist.R
displaylist.Rnw
frame.R
frame.Rnw
grid.R
grid.Rnw
grobs.R
grobs.Rnw
index.html
interactive.R
interactive.Rnw
locndimn.R
locndimn.Rnw
moveline.R
moveline.Rnw
nonfinite.R
nonfinite.Rnw
plotexample.R
plotexample.Rnw
rotated.R
rotated.Rnw
saveload.R
saveload.Rnw
sharing.R
sharing.Rnw
viewports.R
viewports.Rnw
  /Meta
vignette.rds

./lib/R/library/parallel
  /doc
index.html
parallel.R
parallel.Rnw
  /Meta
vignette.rds

./lib/R/library/utils
  /doc
index.html
Sweave.R
Sweave.Rnw
  /Meta
vignette.rds

Note that these Rnw files are all literate programming sources
containing the sources that are untangled to .R files and the PDF
documentation.  Interestingly, the source tarball already contains the
PDF files (e.g. the one installed to
“lib/R/library/grid/doc/viewports.pdf”), so we don’t need texlive to
generate them.

Attached are the three patches.

~~ Ricardo

>From 11e8a484733b492ff5ecd6119b9bdef238be6e67 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 3 Sep 2015 11:41:07 +0200
Subject: [PATCH 1/3] gnu: r: Drop IcedTea from inputs.

* gnu/packages/statistics.scm (r)[inputs]: Remove "icedtea6".
---
 gnu/packages/statistics.scm | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index b84c48d..b1cc5cf 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -84,6 +84,16 @@
  "--with-system-pcre"
  "--with-system-tre"
  "--with-system-xz")))
+;; R has some support for Java.  When the JDK is available at configure
+;; time environment variables pointing to the JDK will be recorded under
+;; $R_HOME/etc and ./tools/getsp.java will be compiled which is used by "R
+;; CMD javareconf".  "R CMD javareconf" appears to only be used to update
+;; the recorded environment variables in $R_HOME/etc.  Refer to
+;; https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Java-support
+;; for additional information.
+
+;; As the JDK is a rather large input with only very limited effects on R,
+;; we decided to drop it.
 (native-inputs
  `(("bzip2" ,bzip2)
("perl" ,perl)
@@ -97,7 +107,6 @@
("cairo" ,cairo)
("gfortran" ,gfortran)
("icu4c" ,icu4c)
-   ("icedtea6" ,icedtea6 "jdk")
("lapack" ,lapack)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
-- 
2.1.0

>From 17f4d01ce2b7bb4b41e565ac43463425e79b6c30 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 3 Sep 2015 11:41:36 +0200
Subject: [PATCH 2/3] gnu: r: Install info documentation.

* gnu/packages/statistics.scm (r)[arguments]: Add phases "make-info" and
  "install-info" to build and install info documentation.
---
 gnu/packages/statistics.scm | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index b1cc5cf..ec705c2 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -68,7 +68,11 @@
  (add-before
   'check 'set-timezone
   ;; Some tests require the timezone to be set.
-  (lambda _ (setenv "TZ" "UTC") #t)))
+  (lambda _ (setenv "TZ" "UTC") #t))
+ (add-after 'build 'make-info
+  (lambda _ (zero? (system* "make" "info"
+ (add-after 'build 'install-info
+  (lambda _ (zero? (system* "make" "install-info")
#:configure-flags
'("--with-blas=openblas"
  "--with-lapack"
-- 
2.1.0

>From d4982f4574579fe60e005807aace966279824f01 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 3 Sep 2015 12:09:47 +0200
Subject: [PATCH 3/3] gnu: r: Drop texlive from native-inputs.

* gnu/packages/statistics.scm (r)[native-inputs]: Remove "texlive".
---
 gnu/packages/statistics.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index ec705c2..7cb61c9 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -102,7 +102,6 @@
  `(("bzip2" ,bzip2)
("perl" ,perl)
("pkg-config" ,pkg-config)
-   ("texlive" ,texlive) ; needed to 

Re: '-light' vs. '-minimal' packages

2015-09-03 Thread Alex Kost
Ludovic Courtès (2015-09-02 23:18 +0300) wrote:

> Alex Kost  skribis:
[...]
>> We have ‘bash-light’ and ‘wpa-supplicant-light’; ‘bioperl-minimal’ and
>> ‘cups-minimal’.  I think we should stick to a single name for such
>> light/minimal packages.  (I prefer "…-minimal")
>
> Right, I realized I hadn’t made up my mind.  “Minimal” is probably
> preferable, indeed.  Let’s rename and bash-light in core-updates, and
> wpa-supplicant-light in master.

OK, the patches for both are attached.

>From e040b70e23f04fca1c91123751ce8b6e28719bb8 Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Thu, 3 Sep 2015 11:12:28 +0300
Subject: [PATCH] gnu: bash-light: Rename to bash-minimal.

* gnu/packages/bash.scm (bash-light): Rename to ...
  (bash-minimal): ...this.
  (static-bash): Use it.
* gnu/packages/make-bootstrap.scm (%bash-static): Use it.
---
 gnu/packages/bash.scm   | 6 +++---
 gnu/packages/make-bootstrap.scm | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index fcfa337..180c64e 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -214,10 +214,10 @@ without modification.")
  (license gpl3+)
  (home-page "http://www.gnu.org/software/bash/";
 
-(define-public bash-light
+(define-public bash-minimal
   ;; A stripped-down Bash for non-interactive use.
   (package (inherit bash)
-(name "bash-light")
+(name "bash-minimal")
 (inputs '()); no readline, no curses
 (arguments
  (let ((args `(#:modules ((guix build gnu-build-system)
@@ -242,7 +242,7 @@ without modification.")
 (define-public static-bash
   ;; Statically-linked Bash that contains nothing but the 'bash' binary and
   ;; 'sh' symlink, without any reference.
-  (let ((bash (static-package bash-light)))
+  (let ((bash (static-package bash-minimal)))
 (package
   (inherit bash)
   (name "bash-static")
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 904aaed..8923faf 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -115,7 +115,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
 #:native-inputs native-inputs))
 
 (define %bash-static
-  (static-package bash-light))
+  (static-package bash-minimal))
 
 (define %static-inputs
   ;; Packages that are to be used as %BOOTSTRAP-INPUTS.
-- 
2.5.1

>From 3deea5ea0cc104993ab665863105d7ad672f5ea0 Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Thu, 3 Sep 2015 11:23:30 +0300
Subject: [PATCH] gnu: wpa-supplicant-light: Rename to wpa-supplicant-minimal.

* gnu/packages/admin.scm (wpa-supplicant-light): Rename to ...
  (wpa-supplicant-minimal): ...this.
  (wpa-supplicant): Use it.
* gnu/system/install.scm (installation-os): Use it.
---
 gnu/packages/admin.scm | 10 +-
 gnu/system/install.scm |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 53cf65e..70b2bb2 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -703,9 +703,9 @@ commands and their arguments.")
 ;; See .
 (license license:x11)))
 
-(define-public wpa-supplicant-light
+(define-public wpa-supplicant-minimal
   (package
-(name "wpa-supplicant-light")
+(name "wpa-supplicant-minimal")
 (version "2.4")
 (source (origin
   (method url-fetch)
@@ -795,12 +795,12 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
 (license license:bsd-3)))
 
 (define-public wpa-supplicant
-  (package (inherit wpa-supplicant-light)
+  (package (inherit wpa-supplicant-minimal)
 (name "wpa-supplicant")
 (inputs `(("dbus" ,dbus)
-  ,@(package-inputs wpa-supplicant-light)))
+  ,@(package-inputs wpa-supplicant-minimal)))
 (arguments
- (substitute-keyword-arguments (package-arguments wpa-supplicant-light)
+ (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
((#:phases phases)
 `(alist-cons-after
   'configure 'configure-for-dbus
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index e7e5d4a..9314462 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -344,7 +344,7 @@ Use Alt-F2 for documentation.
  parted ddrescue
  grub  ;mostly so xrefs to its manual work
  cryptsetup
- wireless-tools iw wpa-supplicant-light iproute
+ wireless-tools iw wpa-supplicant-minimal iproute
  ;; XXX: We used to have GNU fdisk here, but as of version
  ;; 2.0.0a, that pulls Guile 1.8, which takes unreasonable
  ;; space; furthermore util-linux's fdisk is already
-- 
2.5.1