Re: Graphical Installer - Call for Testing.

2017-01-14 Thread John Darrington
Hi Chris,

Thanks for this very comprehensive feedback.  I hope you will forgive
me if I don't respond to every point you have raised.  I have however read
them all, and they are all relevant and useful.  So thanks very much.

Some particular points however:

* Currently there is no mouse support at all.  I hope to add that later.
* It would be great if you could try to find out why your wireless failed.
* I hope, eventually, to remove the reliance on cfdisk.
* From your comments, and those from others it is clear to me that the
  part of the user interface involved with creating filesystems and allocaing
  mount points needs to be redesigned. - so after that, there will be a whole
  different set of issues!
* What would you suggest instead of the "Reboot" message?
 
On Sat, Jan 14, 2017 at 08:06:09PM -0800, Chris Marusich wrote:
 
 Hi!  I successfully installed GuixSD on my Libreboot laptop using the
 installer!  It's awesome to see some work in this area.  Thank you!
 
 I've got a lot of feedback.  Some is minor, some is less minor.  Even if
 you don't incorporate all of it, I hope that it will help make the
 installer better!
 
 * Left-clicking on buttons, entries, etc. had no effect.  I expected it
   to be equivalent to pressing enter or space.
 
 * Left-clicking leaves the clicked square (i.e., row+column
   intersection) highlighted, which is visually distracting.

 * The installer should either guide the user through a linear series of
   steps, or explain at the beginning what the user should do.  I wasn't
   sure what to do at first when I was dropped into the installer.  This
   doesn't preclude a non-linear path through the installation phases,
   but I do think a more guided path would be less confusing.

 * The installer begins with nothing selected.  This contributed to my
   initial confusion: what am I supposed to do?
 
 * The installer should display a keymap, or a hotkey which displays help
   info (like the help page in cfdisk, or top).
 
 * I think you made the first letter of some commands bold (like the "C"
   in "Continue"), but I didn't notice it until I tried the installation
   on a machine with a different monitor.  More contrast, or an
   underlined character, might help call that out more.
 
 * I'm not sure how, but I got stuck in a menu loop between "Partition
   the disks" and "Choose mount point".  Hitting "Continue" and "Go Back"
   in any order never took me to any other step, or back to the main
   menu.  I worked around the issue by getting a shell and rebooting.
 
 * Partition the disks: when launching cfdisk, consider explaining that
   we're going to launch cfdisk to do the actual partitioning, and the
   user needs to quit cfdisk to come back and continue the installation.
 
 * The interface was at times sluggish - there was a noticeable delay
   (hundreds of milliseconds) between pressing e.g. the left-arrow key
   and the next bottom-menu item being selected.
 
 * By default, this installer provides a lot of manual control over how
   the disks are partitioned, what file systems will be installed, and
   what their mount points will be.  Perhaps by default we should offer
   one or more common configurations - e.g., one partition, containing an
   ext4 file system, mounted at / - and move the finer-grained manual
   controls into a sub-menu of some kind.  For comparison, I've just
   installed Ubuntu and Debian today, and both of their installers offer
   such simplified paths for installation. - useful if someone does not
   know much about that stuff yet or they just want an easy default.
 
 * Following that note, if we presented pre-set combinations of
   partitions/file systems/mount points, I can imagine adding another
   "simple configuration" to that list, for encrypted home partition, or
   an entire encrypted disk.  For various use cases.
 
 * The installer contains various input text boxes (e.g., for file system
   label).  These boxes are invisible; a border would help call them out
   (I almost didn't realize they existed).  Also, left/right arrow keys
   did not scroll left/right, which surprised me, but backspace and
   delete worked well enough.
 
 * The generated operating system configuration should use file system
   UUID or label, if possible, rather than device path.
 
 * Choose mount point: since you can also set the label here, maybe
   change the title of the section to "Choose file system and mount
   point" or something?
 
 * The installer takes a "window within a window" approach for
   installation phases.  This conflicts with the "replace the whole
   window" behavior that occurs when running cfdisk.  I think that using
   a "replace the 

Re: [PATCH] gnu: Mark /gnu/store as needed for boot.

2017-01-14 Thread John Darrington
On Sat, Jan 14, 2017 at 10:30:43PM +0100, Ludovic Court??s wrote:
 
 > * gnu/system/file-systems.scm (all-subpaths): New procedure.
 > (file-system-needed-for-boot?): Use it to check for ancestors
 > of %store-directory.
 
 I guess the idea is to have ???needed-for-boot automatically set for
 users who store /gnu or /gnu/store on a separate partition, right?

Correct.
 
 The problem is that we need to exclude bind mounts, as done in
 ???store-file-system??? in (gnu system).

Thanks for pointing that out.
 
 What about:
 
   (define (file-system-needed-for-boot? fs)
 (or (%file-system-needed-for-boot? fs)
 (and (string-prefix? (file-system-mount-point fs) 
(%store-directory))
  (not (memq 'bind-mount (file-system-flags fs))
 

Perhaps I am misunderstanding something, but

 (string-prefix? (file-system-mount-point fs) (%store-directory))
 
will erroneously return #t when (file-system-mount-point fs) evaluates
to "/gn"  and (%store-directory) to "/gnu/store".  Will it not???

That is why I wrote a procedure to fix that problem.

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


Re: Graphical Installer - Call for Testing.

2017-01-14 Thread Chris Marusich
John Darrington  writes:

> On Thu, Jan 12, 2017 at 09:40:17PM -0800, Chris Marusich wrote:
>  John Darrington  writes:
>  
>  > The wip-installer branch is ready for testing and general review.
>  >
>  > This branch provides a curses based graphical interface to the disk
>  > images used for installing GuixSD. It is intended to allow users
>  > unfamiliar with bash and other aspects of unix-like operating systems
>  > to easily install GuixSD.   This means, it should allow you to install
>  > GuixSD on a bare PC, without ever touching a shell (whilst still
>  > providing that option for those who want it).
>  >
>  > Whilst it is still a work in progress it has, in my opinion, got to
>  > a stage where it is usable.  Before merging into master however, it
>  > would be great to get feedback from others.
>  >
>  > For those of you who don't wish to build a disk-image yourselves,
>  > Ludo has kindly made available pre-built images for x86_64 and
>  > i686-linux systems at http://web.fdn.fr/~lcourtes/software/guix/
>  >
>  > Please report coding and usability issues.
>  
>  I want to test this, but I've arrived late to the party.  Does the link
>  above contain the most recent round(s) of feedback?  I've tried to build
>  the wip-installer branch, but I found that the installation system tests
>  failed, so I thought I'd ask before trying to build it myself.
>  
>
> Nothing signficant has changed since this image was made.  So your comments 
> will
> still be valid and appreciated.

Hi!  I successfully installed GuixSD on my Libreboot laptop using the
installer!  It's awesome to see some work in this area.  Thank you!

I've got a lot of feedback.  Some is minor, some is less minor.  Even if
you don't incorporate all of it, I hope that it will help make the
installer better!

* Left-clicking on buttons, entries, etc. had no effect.  I expected it
  to be equivalent to pressing enter or space.

* Left-clicking leaves the clicked square (i.e., row+column
  intersection) highlighted, which is visually distracting.

* The installer should either guide the user through a linear series of
  steps, or explain at the beginning what the user should do.  I wasn't
  sure what to do at first when I was dropped into the installer.  This
  doesn't preclude a non-linear path through the installation phases,
  but I do think a more guided path would be less confusing.

* The installer begins with nothing selected.  This contributed to my
  initial confusion: what am I supposed to do?

* The installer should display a keymap, or a hotkey which displays help
  info (like the help page in cfdisk, or top).

* I think you made the first letter of some commands bold (like the "C"
  in "Continue"), but I didn't notice it until I tried the installation
  on a machine with a different monitor.  More contrast, or an
  underlined character, might help call that out more.

* I'm not sure how, but I got stuck in a menu loop between "Partition
  the disks" and "Choose mount point".  Hitting "Continue" and "Go Back"
  in any order never took me to any other step, or back to the main
  menu.  I worked around the issue by getting a shell and rebooting.

* Partition the disks: when launching cfdisk, consider explaining that
  we're going to launch cfdisk to do the actual partitioning, and the
  user needs to quit cfdisk to come back and continue the installation.

* The interface was at times sluggish - there was a noticeable delay
  (hundreds of milliseconds) between pressing e.g. the left-arrow key
  and the next bottom-menu item being selected.

* By default, this installer provides a lot of manual control over how
  the disks are partitioned, what file systems will be installed, and
  what their mount points will be.  Perhaps by default we should offer
  one or more common configurations - e.g., one partition, containing an
  ext4 file system, mounted at / - and move the finer-grained manual
  controls into a sub-menu of some kind.  For comparison, I've just
  installed Ubuntu and Debian today, and both of their installers offer
  such simplified paths for installation. - useful if someone does not
  know much about that stuff yet or they just want an easy default.

* Following that note, if we presented pre-set combinations of
  partitions/file systems/mount points, I can imagine adding another
  "simple configuration" to that list, for encrypted home partition, or
  an entire encrypted disk.  For various use cases.

* The installer contains various input text boxes (e.g., for file system
  label).  These boxes are invisible; a border would help call them out
  (I almost didn't realize they existed).  Also, left/right arrow keys
  did not scroll left/right, which surprised me, but backspace and
  delete worked well enough.

* The generated operating system configuration 

[PATCH] gnu: Add emacs-sx.

2017-01-14 Thread ng0
From: ng0 

* gnu/packages/emacs.scm (emacs-sx): New variable.
---
 gnu/packages/emacs.scm | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 50cea7685..2e04414b3 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -12,7 +12,7 @@
 ;;; Copyright © 2016 David Thompson 
 ;;; Copyright © 2016 Matthew Jordan 
 ;;; Copyright © 2016 Roel Janssen 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016, 2017 ng0 
 ;;; Copyright © 2016 Alex Griffin 
 ;;; Copyright © 2016 Nicolas Goaziou 
 ;;; Copyright © 2016 Alex Vong 
@@ -1391,6 +1391,30 @@ allows easily move between them.")
 strings.")
 (license license:gpl3+)))
 
+(define-public emacs-sx
+  (package
+(name "emacs-sx")
+(version "20161222.1205")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "https://melpa.org/packages/sx-;
+   version ".tar"))
+   (file-name (string-append name "-" version ".tar"))
+   (sha256
+(base32
+ "0alllpglv7v686ilg2dkncs0yf8g5rrgj17rx7qx9q81icwdcwxq"
+(build-system emacs-build-system)
+(inputs
+ `(("emacs-markdown-mode" ,emacs-markdown-mode)
+   ("let-alist" ,let-alist)))
+(home-page "https://github.com/vermiculus/sx.el/;)
+(synopsis "Emacs StackExchange client")
+(description
+ "Emacs StackExchange client.  Ask and answer questions on
+Stack Overflow, Super User, and other StackExchange sites.")
+(license license:gpl3+)))
+
 (define-public emacs-f
   (package
 (name "emacs-f")
-- 
2.11.0




Emacs SX (Stackexchange Mode)

2017-01-14 Thread ng0
[PATCH] gnu: Add emacs-sx.

I was wondering what the emacs/sx branch was I had... and it seems it was
functional since september, totally forgot about this :)
This patch adds an stack exchange mode for emacs, where you can browse
all of stackexchange with:

https://github.com/vermiculus/sx.el/blob/master/sx.org
https://github.com/vermiculus/sx.el



Re:Re: Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread tumashu
make check-system TESTS="separate-store-os" ?   build guix from sources?
在 2017-01-15 00:46:37,"David Craven"  写道:
Hi!

I cannot reproduce the issue on current master, sorry!

make check-system TESTS="separate-store-os" would show if there's a
problem with multiple file-systems using labels.

If you want more help with your issue please come and visit us on IRC...

David


[PATCH] gnu: gdk-pixbuf: Make it reproducible.

2017-01-14 Thread Danny Milosavljevic
* gnu/packages/gtk.scm (gdk-pixbuf): Make it reproducible.
---
 gnu/local.mk   |  1 +
 gnu/packages/gtk.scm   |  3 ++-
 gnu/packages/patches/gdk-pixbuf-list-dir.patch | 29 ++
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gdk-pixbuf-list-dir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d37887237..05e6d653f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -567,6 +567,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/gcc-6-arm-none-eabi-multilib.patch  \
   %D%/packages/patches/gcc-6-cross-environment-variables.patch \
   %D%/packages/patches/gcj-arm-mode.patch  \
+  %D%/packages/patches/gdk-pixbuf-list-dir.patch   \
   %D%/packages/patches/gd-CVE-2016-7568.patch  \
   %D%/packages/patches/gd-CVE-2016-8670.patch  \
   %D%/packages/patches/gd-fix-chunk-size-on-boundaries.patch   \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index b2882b5e9..c4c441f4c 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -434,7 +434,8 @@ highlighting and other features typical of a source code 
editor.")
 name "-" version ".tar.xz"))
 (sha256
  (base32
-  "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"
+  "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"))
+(patches (search-patches "gdk-pixbuf-list-dir.patch"
(build-system gnu-build-system)
(arguments
 '(#:configure-flags '("--with-x11")
diff --git a/gnu/packages/patches/gdk-pixbuf-list-dir.patch 
b/gnu/packages/patches/gdk-pixbuf-list-dir.patch
new file mode 100644
index 0..d1427cc38
--- /dev/null
+++ b/gnu/packages/patches/gdk-pixbuf-list-dir.patch
@@ -0,0 +1,29 @@
+--- gdk-pixbuf-2.34.0/gdk-pixbuf/queryloaders.c.orig  2017-01-11 
00:17:32.865843062 +0100
 gdk-pixbuf-2.34.0/gdk-pixbuf/queryloaders.c   2017-01-11 
00:31:29.428372177 +0100
+@@ -354,16 +354,25 @@
+ 
+ dir = g_dir_open (path, 0, NULL);
+ if (dir) {
++GList *entries = NULL;
+ const char *dent;
+ 
+ while ((dent = g_dir_read_name (dir))) {
+ gint len = strlen (dent);
+ if (len > SOEXT_LEN &&
+ strcmp (dent + len - SOEXT_LEN, SOEXT) == 
0) {
+-query_module (contents, path, dent);
++entries = g_list_append (entries, 
g_strdup (dent));
+ }
+ }
+ g_dir_close (dir);
++entries = g_list_sort (entries, strcmp);
++GList *xentries;
++for (xentries = entries; xentries; xentries = 
g_list_next (xentries)) {
++dent = xentries->data;
++query_module (contents, path, dent);
++g_free (xentries->data);
++}
++g_list_free (entries);
+ }
+ #else
+ g_string_append_printf (contents, "# dynamic loading of 
modules not supported\n");



Re: GuixSD + StumpWM

2017-01-14 Thread Daniel Pimentel (d4n1)
Yes, it's work now.

Thanks,On Jan 14, 2017 7:18 PM, Ricardo Wurmus  wrote:
>
>
> Daniel Pimentel (d4n1)  writes: 
>
> > Yes, it's works, thanks. 
> > 
> > I did install but now there's another problem: login. 
> > I did in my home following stumpwm docs: 
> > echo > "exec sbcl-stumpwm" > ~/.xinitrc 
>
> “~/.xinitrc” must be executable: 
>
>    chmod +x ~/.xinitrc 
>
> I just installed stumpwm and I’m currently trying to make hacking with 
> Emacs+SLIME work.  So far unsuccessfully. 
>
> -- 
> Ricardo 
>
> GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC 
> http://elephly.net 
>


Re:Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread tumashu
no ,i  use my-root as label before and cannot work
在 2017-01-15 01:29:26,"Ludovic Courtès"  写道:
tumashu   skribis:

> When I use (title 'device) instead of (title 'label), it works again, I don't 
> understand the reason.
>
> https://github.com/tumashu/guixsd-helper

This file has:

(define fs-home
  (file-system
   (device "/dev/sda7")
   (title 'device)
   (mount-point "/home")
   (type "ext4")))

… which is correct.

If you previously had 'label instead of 'device here, the file system
could not be found at boot time because GuixSD was searching for a file
system with “/dev/sda7” as its *label*.

See

for the meaning of ‘title’.

HTH!

Ludo’.


[PATCH: gnu: lua-lpeg: Update to 1.0.1.

2017-01-14 Thread Jose Miguel Sánchez García

--

José Miguel Sánchez García

From bead1655bc8c93d34196ba9b024c55058689cd59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 
Date: Sun, 15 Jan 2017 00:03:33 +0100
Subject: [PATCH] gnu: lua-lpeg: Update to 1.0.1.

* gnu/packages/lua.scm (lua-lpeg): Update to 1.0.1.
---
 gnu/packages/lua.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 65c335d37..721eceddf 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -371,13 +371,13 @@ Notable examples are GTK+, GStreamer and Webkit.")
 (define-public lua-lpeg
   (package
 (name "lua-lpeg")
-(version "1.0.0")
+(version "1.0.1")
 (source (origin
   (method url-fetch)
   (uri (string-append 
"http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-;
   version ".tar.gz"))
   (sha256
-   (base32 
"13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3khl68h"
+   (base32 
"0sq25z3r324a324ky73izgq9mbf66j2xvjp0fxf227rwxalzgnb2"
 (build-system gnu-build-system)
 (arguments
  `(#:phases
-- 
2.11.0



Re: GuixSD + StumpWM

2017-01-14 Thread Ricardo Wurmus

Daniel Pimentel (d4n1)  writes:

> Yes, it's works, thanks.
>
> I did install but now there's another problem: login.
> I did in my home following stumpwm docs:
> echo > "exec sbcl-stumpwm" > ~/.xinitrc

“~/.xinitrc” must be executable:

   chmod +x ~/.xinitrc

I just installed stumpwm and I’m currently trying to make hacking with
Emacs+SLIME work.  So far unsuccessfully.

--
Ricardo

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




[PATCH 2/2] gnu: services: web: Add support for NGinx location blocks

2017-01-14 Thread Christopher Baines
* gnu/services/web.scm (): Add field locations.
(): New record type.
(): New record type.
(nginx-location-config): New function.
(default-nginx-server-config): Inlcude locations.
* doc/guix.text (Web Services): Document the new nginx-location-configuration
and nginx-named-location-configuration data types, as well as the changes to
the nginx-server-configuration.
---
 doc/guix.texi| 43 +++
 gnu/services/web.scm | 38 ++
 2 files changed, 81 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 5603dd893..045dee76c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12339,6 +12339,11 @@ default server for connections matching no other 
server.
 @item @code{root} (default: @code{"/srv/http"})
 Root of the website nginx will serve.
 
+@item @code{locations} (default: @code{'()})
+A list of @dfn{nginx-location-configuration} or
+@dfn{nginx-named-location-configuration} records to use within this
+server block.
+
 @item @code{index} (default: @code{(list "index.html")})
 Index files to look for when clients ask for a directory.  If it cannot be 
found,
 Nginx will send the list of files in the directory.
@@ -12376,6 +12381,44 @@ explicitly.
 @end table
 @end deftp
 
+@deftp {Data Type} nginx-location-configuration
+Data type representing the configuration of an nginx location block.
+This type has the following parameters:
+
+@table @asis
+@item @code{uri}
+URI which this location block matches.
+
+@anchor{nginx-location-configuration body}
+@item @code{body}
+Body of the location block, specified as a string. This can contain many
+configuration directives. For example, to pass requests to a upstream
+server group defined using an @code{nginx-upstream-configuration} block,
+the following directive would be specified in the body @samp{proxy_pass
+http://upstream-name;}.
+
+@end table
+@end deftp
+
+@deftp {Data Type} nginx-named-location-configuration
+Data type representing the configuration of an nginx named location
+block.  Named location blocks are used for request redirection, and not
+used for regular request processing.  This type has the following
+parameters:
+
+@table @asis
+@item @code{name}
+Name to identify this location block.
+
+@item @code{body}
+@xref{nginx-location-configuration body}, as the body for named location
+blocks can be used in a similar way to the
+@code{nginx-location-configuration body}.  One restriction is that the
+body of a named location block cannot contain location blocks.
+
+@end table
+@end deftp
+
 @node Network File System
 @subsubsection Network File System
 @cindex NFS
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 2918c3832..8c6921622 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -35,6 +35,10 @@
 nginx-server-configuration?
 nginx-upstream-configuration
 nginx-upstream-configuration?
+nginx-location-configuration
+nginx-location-configuration?
+nginx-named-location-configuration
+nginx-named-location-configuration?
 nginx-service
 nginx-service-type))
 
@@ -55,6 +59,8 @@
(default (list 'default)))
   (rootnginx-server-configuration-root
(default "/srv/http"))
+  (locations   nginx-server-configuration-locations
+   (default '()))
   (index   nginx-server-configuration-index
(default (list "index.html")))
   (ssl-certificate nginx-server-configuration-ssl-certificate
@@ -70,6 +76,20 @@
   (namenginx-upstream-configuration-name)
   (servers nginx-upstream-configuration-servers))
 
+(define-record-type* 
+  nginx-location-configuration make-nginx-location-configuration
+  nginx-location-configuration?
+  (uri nginx-location-configuration-uri
+   (default #f))
+  (bodynginx-location-configuration-body))
+
+(define-record-type* 
+  nginx-named-location-configuration make-nginx-named-location-configuration
+  nginx-named-location-configuration?
+  (namenginx-named-location-configuration-name
+   (default #f))
+  (bodynginx-named-location-configuration-body))
+
 (define-record-type* 
   nginx-configuration make-nginx-configuration
   nginx-configuration?
@@ -97,6 +117,19 @@ of index files."
 ((? string? str) (string-append str " ")))
names)))
 
+(define nginx-location-config
+  (match-lambda
+(($  uri body)
+ (string-append
+  "location " uri " {\n"
+  "" (string-join body "\n")
+  "}\n"))
+(($  name body)
+ (string-append
+  "location @" name " {\n"
+  "" (string-join body "\n")
+  "}\n"
+
 (define (default-nginx-server-config server)
   (string-append
"server {\n"
@@ -125,6 +158,11 

[PATCH 1/2] gnu: services: web: Add support for NGinx upstream module

2017-01-14 Thread Christopher Baines
* gnu/services/web.scm (): New record type.
(): Add new field upstream-blocks.
(nginx-upstream): New function.
(default-nginx-config): Add upstream-list parameter.
(nginx-service): Add optional upstream list keyword argument.
* doc/guix.text (Web Services): Document the new nginx-upstream-configuration
data type and changes to the nginx function.
---
 doc/guix.texi| 26 --
 gnu/services/web.scm | 38 ++
 2 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index fa07aba5a..5603dd893 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12282,6 +12282,7 @@ The @code{(gnu services web)} module provides the 
following service:
[#:log-directory ``/var/log/nginx''] @
[#:run-directory ``/var/run/nginx''] @
[#:server-list '()] @
+   [#:upstream-list '()] @
[#:config-file @code{#f}]
 
 Return a service that runs @var{nginx}, the nginx web server.
@@ -12293,8 +12294,10 @@ arguments should match what is in @var{config-file} to 
ensure that the
 directories are created when the service is activated.
 
 As an alternative to using a @var{config-file}, @var{server-list} can be
-used to specify the list of @dfn{server blocks} required on the host.  For
-this to work, use the default value for @var{config-file}.
+used to specify the list of @dfn{server blocks} required on the host and
+@var{upstream-list} can be used to specify a list of @dfn{upstream
+blocks} to configure.  For this to work, use the default value for
+@var{config-file}.
 
 @end deffn
 
@@ -12354,6 +12357,25 @@ Whether the server should add its configuration to 
response.
 @end table
 @end deftp
 
+@deftp {Data Type} nginx-upstream-configuration
+Data type representing the configuration of an nginx upstream block.
+This type has the following parameters:
+
+@table @asis
+@item @code{name}
+Name for this group of servers.
+
+@item @code{servers}
+Specify the addresses of the servers in the group. The address can be
+specified as a IP address (e.g. @samp{127.0.0.1}), domain name
+(e.g. @samp{backend1.example.com}) or a path to a UNIX socket using the
+prefix @samp{unix:}. For addresses using an IP address or domain name,
+the default port is 80, and a different port can be specified
+explicitly.
+
+@end table
+@end deftp
+
 @node Network File System
 @subsubsection Network File System
 @cindex NFS
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index db895405a..2918c3832 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -33,6 +33,8 @@
 nginx-configuration?
 nginx-server-configuration
 nginx-server-configuration?
+nginx-upstream-configuration
+nginx-upstream-configuration?
 nginx-service
 nginx-service-type))
 
@@ -62,6 +64,12 @@
   (server-tokens?  nginx-server-configuration-server-tokens?
(default #f)))
 
+(define-record-type* 
+  nginx-upstream-configuration make-nginx-upstream-configuration
+  nginx-upstream-configuration?
+  (namenginx-upstream-configuration-name)
+  (servers nginx-upstream-configuration-servers))
+
 (define-record-type* 
   nginx-configuration make-nginx-configuration
   nginx-configuration?
@@ -69,6 +77,7 @@
   (log-directory nginx-configuration-log-directory) ;string
   (run-directory nginx-configuration-run-directory) ;string
   (server-blocks nginx-configuration-server-blocks) ;list
+  (upstream-blocks nginx-configuration-upstream-blocks) ;list
   (file  nginx-configuration-file)) ;string | file-like
 
 (define (config-domain-strings names)
@@ -116,11 +125,18 @@ of index files."
"  index " (config-index-strings (nginx-server-configuration-index 
server)) ";\n"
"  server_tokens " (if (nginx-server-configuration-server-tokens? 
server)
   "on" "off") ";\n"
+(define (nginx-upstream-config upstream)
+  (string-append
+   "upstream " (nginx-upstream-configuration-name upstream) " {\n"
+   (apply
+string-append
+(map (lambda (server)
+   "  server " server ";\n")
+ (nginx-upstream-configuration-servers upstream)))
"}\n"))
 
-(define (default-nginx-config log-directory run-directory server-list)
-  (plain-file "nginx.conf"
-  (string-append
+(define (default-nginx-config log-directory run-directory server-list 
upstream-list)
+  (mixed-text-file "nginx.conf"
"user nginx nginx;\n"
"pid " run-directory "/pid;\n"
"error_log " log-directory "/error.log info;\n"
@@ -131,12 +147,16 @@ of index files."
"uwsgi_temp_path " run-directory "/uwsgi_temp;\n"
"scgi_temp_path " run-directory "/scgi_temp;\n"
"access_log " log-directory "/access.log;\n"
+   (string-join
+(filter (lambda (section) (not (null? 

Re: [PATCH 2/2] gnu: Add openvpn service.

2017-01-14 Thread Hartmut Goebel
Am 12.01.2017 um 18:57 schrieb Julien Lepiller:
> * gnu/services/vpn.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * doc/guix.texi (VPN Services): N

Great! Thanks.

What about adding a system example with a openvpn configuration defining
one or two peers, an dummy "up" script? This would help understanding
the configuration and ease addition for novice users.

-- 
Regards
Hartmut Goebel

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




Re: Openbox: Add obconf.

2017-01-14 Thread ng0
ng0  writes:

> Marius Bakke  writes:
>
>> ng0  writes:
>>
>>> [PATCH] gnu: Add obconf.
>>>
>>> I noticed we don't have obconf, the configuration tool for openbox.
>>> Nix creates an wrapper for this application 
>>> (https://github.com/NixOS/nixpkgs/blob/56904d7c423f2b13b37fbd29f39bbb4b52bc7824/pkgs/tools/X11/obconf/default.nix#L18)
>>>  I don't know if we'll need this. Running from within openbox it seemed to 
>>> execute and go through the tabs without crashing.
>>> I haven't tried changing any settings so far.
>>
>> Could you try changing some stuff and make sure it works? IIRC obconf
>> does a lot of funky XML stuff which may require some patching or
>> wrapping.
>>
>> I don't want to add a package just to get a bug report about it not
>> working :-)
>
> Okay, I'm currently reconfiguring a system with this branch,
> might take a really long time.

Done, I can confirm that changing settings works.

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



Re: [PATCH] gnu: Mark /gnu/store as needed for boot.

2017-01-14 Thread Ludovic Courtès
Hi!

John Darrington  skribis:

> * gnu/system/file-systems.scm (all-subpaths): New procedure.
> (file-system-needed-for-boot?): Use it to check for ancestors
> of %store-directory.

I guess the idea is to have ‘needed-for-boot?’ automatically set for
users who store /gnu or /gnu/store on a separate partition, right?

In ‘%separate-store-os’ in (gnu tests install), it is set explicitly:

(file-systems (cons* (file-system
   (device "root-fs")
   (title 'label)
   (mount-point "/")
   (type "ext4"))
 (file-system
   (device "store-fs")
   (title 'label)
   (mount-point "/gnu")
   (type "ext4")
   (needed-for-boot? #t)) ;definitely!
 %base-file-systems))

Making it automatic can help though.

>  (define-inlinable (file-system-needed-for-boot? fs)
> -  "Return true if FS has the 'needed-for-boot?' flag set, or if it's the root
> -file system."
> +  "Return true if FS has the 'needed-for-boot?' flag set, or if it holds
> +the store directory."
>(or (%file-system-needed-for-boot? fs)
> -  (string=? "/" (file-system-mount-point fs
> +  (member (file-system-mount-point fs) (all-subpaths 
> (%store-directory)

The problem is that we need to exclude bind mounts, as done in
‘store-file-system’ in (gnu system).

What about:

  (define (file-system-needed-for-boot? fs)
(or (%file-system-needed-for-boot? fs)
(and (string-prefix? (file-system-mount-point fs) (%store-directory))
 (not (memq 'bind-mount (file-system-flags fs))

?

Thanks,
Ludo’.



Re: [PATCH 2/2] gnu: Add openvpn service.

2017-01-14 Thread Ludovic Courtès
Howdy,

Julien Lepiller  skribis:

>> Besides, could you think of a system test that would allow us to test
>> both services?  Perhaps a single config that has both the OpenVPN
>> server and client running?  Thoughts?
>
> I don't think you can connect a client to itself, but you could run two
> machines, one client and one server. Is it possible?

It’s possible to run two VMs and have one talk to the other, but there’s
currently no test that does that, so it’d be potentially a little bit
more work.

> From 8de1245e8887ae90d34e0262e1eadab091eda603 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller 
> Date: Sat, 7 Jan 2017 20:16:00 +0100
> Subject: [PATCH] gnu: Add openvpn service.
>
> * gnu/services/vpn.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * doc/guix.texi (VPN Services): New section.

[...]

> +@node VPN Services
> +@subsubsection VPN Services
> +@cindex VPN

Please make it:

   @cindex VPN (virtual private network)
   @cindex virtual private network (VPN)

Readers might be looking for either of these.

> +(define (uglify-field-name name)
> +  (match name
> + ('verbosity "verb")
> + (_ (let ((str (symbol->string name)))
> +  (if (string-suffix? "?" str)
> +  (substring str 0 (1- (string-length str)))
> +  str)

Not sure why but indent-code.el got ‘match’ indentation wrong, although
it works for me.  Alex, any ideas?

Anyway, please push, thank you!

Ludo’.



Re: guix build fails: can't change into `/var/tmp/guix-build-...drv-0'

2017-01-14 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Thu, Jan 12, 2017 at 03:02:30PM +0100, Ludovic Courtès wrote:
>> Leo Famulari  skribis:
>> 
>> > On Tue, Jan 03, 2017 at 05:43:36PM +0100, Hartmut Goebel wrote:
>> >> Am 02.01.2017 um 17:53 schrieb Leo Famulari:
>> >> > Could it be related to this bug?
>> >> >
>> >> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25242
>> >> Yes, this looks like my problem.
>> >> 
>> >> Now I just need to find out how to update. `guix pull` as of yesterday
>> >> still has version 0.12.0-2.b291.
>> >
>> > I think we need to make a new guix-devel snapshot.
>> 
>> I’ve just updated it in commit a91740655c8d18cd1b266d4d5719146cfeaf400d.
>
> Are there any special considerations to account for when updating the
> snapshot? Should I have just done it myself?

No special considerations: just make sure it builds and that’s fine.

Ludo’.



Anomalies in Python search-path (was: [PATCH] Update python-pip to 9.0.1)

2017-01-14 Thread Hartmut Goebel
Am 06.01.2017 um 19:41 schrieb Maxim Cournoyer:
> One thing which I discovered while testing pip on Guix was that
> depending on how you use Python on Guix the PYTHONPATH differs:

I analysed this problem and found set we have another serious problem
here. But good news: There is an easy solution for both problems.

Result of the analysis (as explained below): We must not extend
PYTHONPATH for adding the profile's site-packages directory.

Proposed solution: The standard library module "site" already contains a
place where we can hook in:

   # Prefixes for site-packages; add additional prefixes like /usr/local
here
PREFIXES = [sys.prefix, sys.exec_prefix]

So we simply prepend $GUIX_ENVIRONMENT to this list:

PREFIXES = [os.path.expandvar(GUIX_ENVIRONMENT), sys.prefix,
sys.exec_prefix]

Prepending to speed up searches, since within an environment almost all
site-packages will end in GUIX_ENVIRONMENT. There is no need to check if
$GUIX_ENVIRONMENT is set, since if it is not, it will be left unchanged
and the non-existing path will be skipped out automatically

This would solve both the problem Maxim described and the problem
described below, since the Guix site-packages behave exactly like any
other global site-packages directory.

When following this proposal, we *may* even remove some "wrapping" stuff
in the python-build-system. But this has to be investigated first.


Analysis (proof see below):

The python interpreter was two command line options, which are rarely
used, though:

-E ignores environment variables, esp. PYTHONPATH
-S Disable  the  import  of the module site and the site-dependent
manipulations of sys.path.

This means:
a) When passing -E, the Guix environment's site-packages are ignored
(together with PYTHONPATH), while they should not.
b) When passing -S, the Guix environment's site-packages should be
ignored, but is not (since it is specified in $PYTHONPATH, which is not
ignored)

Conclusion: We should must not use PYTHONPATH to specify the Guix's
environment's site-package directory.


Analysis details:

(guix)$ which python3
/gnu/store/zcnb…-profile/bin/python3


Without any options:

-> /home/USER/.local/lib/python3.5/site-packages and
   /gnu/store/zcnb…-profile/lib/python3.5/site-packages
   should be in sys.path

(base)$ python3 -c 'import sys ; print("\n".join(sys.path))'

/usr/lib64/python34.zip
/usr/lib64/python3.4
/usr/lib64/python3.4/plat-linux
/usr/lib64/python3.4/lib-dynload
/home/USER/.local/lib/python3.4/site-packages
/usr/lib64/python3.4/site-packages
/usr/lib/python3.4/site-packages

(guix)$ python3 -c 'import sys ; print("\n".join(sys.path))'

/gnu/store/zcnb…-profile/lib/python3.5/site-packages
/gnu/store/alk9…-python-3.5.2/lib/python35.zip
/gnu/store/alk9…-python-3.5.2/lib/python3.5
/gnu/store/alk9…-python-3.5.2/lib/python3.5/plat-linux
/gnu/store/alk9…-python-3.5.2/lib/python3.5/lib-dynload
/home/USER/.local/lib/python3.5/site-packages
/gnu/store/alk9…-python-3.5.2/lib/python3.5/site-packages


-E Ignore environment variables  like  PYTHONPATH  and  PYTHONHOME
   that modify the behavior of the interpreter.

-> /home/USER/.local/lib/python3.5/site-packages and
   /gnu/store/zcnb…-profile/lib/python3.5/site-packages
   should be in sys.path

(base)$ python3 -E -c 'import sys ; print("\n".join(sys.path))'

/usr/lib64/python34.zip
/usr/lib64/python3.4
/usr/lib64/python3.4/plat-linux
/usr/lib64/python3.4/lib-dynload
/home/USER/.local/lib/python3.4/site-packages
/usr/lib64/python3.4/site-packages
/usr/lib/python3.4/site-packages

(guix)$ python3 -E -c 'import sys ; print("\n".join(sys.path))'

/gnu/store/alk9…-python-3.5.2/lib/python35.zip
/gnu/store/alk9…-python-3.5.2/lib/python3.5
/gnu/store/alk9…-python-3.5.2/lib/python3.5/plat-linux
/gnu/store/alk9…-python-3.5.2/lib/python3.5/lib-dynload
/home/USER/.local/lib/python3.5/site-packages
/gnu/store/alk9…-python-3.5.2/lib/python3.5/site-packages



-S = Disable  the  import  of the module site and the site-dependent
 manipulations of sys.path that it entails.

-> /home/USER/.local/lib/python3.5/site-packages and
   /gnu/store/zcnb…-profile/lib/python3.5/site-packages
   sould *not* be in sys.path

(base)$ python3 -S -c 'import sys ; print("\n".join(sys.path))'

/usr/lib64/python34.zip
/usr/lib64/python3.4/
/usr/lib64/python3.4/plat-linux
/usr/lib64/python3.4/lib-dynload


(guix)$ python3 -S -c 'import sys ; print("\n".join(sys.path))'

/gnu/store/zcnb…-profile/lib/python3.5/site-packages
/gnu/store/alk9…-python-3.5.2/lib/python35.zip
/gnu/store/alk9…-python-3.5.2/lib/python3.5/
/gnu/store/alk9…-python-3.5.2/lib/python3.5/plat-linux
/gnu/store/alk9…-python-3.5.2/lib/python3.5/lib-dynload

-- 
Regards
Hartmut Goebel

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




Re: [PATCH] gnu: Add r-gmodels

2017-01-14 Thread Ra
Ouch ,
actually I just cut and pasted the text from a shell and sending it with
inbox. Sorry for that and thanks for spot it.

Ra

Il sab 14 gen 2017 18:19 Ludovic Courtès  ha scritto:

> Hi!
>
> Ricardo Wurmus  skribis:
>
> > Ra  writes:
> >
> >> * gnu/packages/statistics.scm (r-gmodels): New variable.
> >> ---
> >>  gnu/packages/statistics.scm | 19 +++
> >>  1 file changed, 19 insertions(+)
> >
> > Thanks for the patch, but I get the same problem as with your other
> > patch:
> >
> > error: corrupt patch at line 10
> >
> > I don’t know if this is a problem on my end or with your email.
>
> The message contains both a text/html and a text/plain version.
>
> Ra: Could you turn off HTML altogether, or use ‘git send-email’?  I
> think that’s the best way to make sure it works for everyone.
>
> Thanks,
> Ludo’.
>


Re: [PATCH 1/1] gnu: icestorm: Replace reference in icebox_vlog.

2017-01-14 Thread Danny Milosavljevic
Hi,

thanks for the patch!

On Sat, 14 Jan 2017 20:56:52 +0200
Theodoros Foradis  wrote:

> * gnu/packages/fpga.scm (icestorm)[arguments]: Modify phases
> "fix-usr-local" to replace reference to /usr/local/share.
> ---
>  gnu/packages/fpga.scm | 9 +
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
> index f65eae8..eb05a39 100644
> --- a/gnu/packages/fpga.scm
> +++ b/gnu/packages/fpga.scm
> @@ -225,11 +225,12 @@ For synthesis, the compiler generates netlists in the 
> desired format.")
>(string-append "PREFIX=" (assoc-ref %outputs 
> "out")))
> #:phases
>  (modify-phases %standard-phases
> -  (add-after 'unpack 'remove-usr-local
> -(lambda _
> -  (substitute* "iceprog/Makefile"
> +  (add-after 'unpack 'fix-usr-local
> +(lambda* (#:key outputs #:allow-other-keys)

> +  (substitute* '("iceprog/Makefile"

Patching this files changes nothing in the final result.

The package is built in an isolated container anyway - it's not like it can 
access /usr/local while it's building.

And if we did that everywhere we would have lots of substitution commands all 
over the place as noise - doing nothing useful, drowning out the important 
signal of actually useful substitutions. Therefore, I don't think we should do 
this.

What do the others think?

> "icebox/icebox_vlog.py")

... oops. This one I definitely agree with (the /usr/local/share one).



Re: [PATCH] gnu: Add tipp10 touch typing tutor.

2017-01-14 Thread Hartmut Goebel
Am 05.01.2017 um 11:56 schrieb Ludovic Courtès:
> Please remove “for Windows, Mac OS and Linux.”
>
> OK with this change!

Pushed with these changes b84257c0ffaa26b635f6a617d28da4b7edf26442

-- 
Regards
Hartmut Goebel

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




[PATCH 0/1] gnu: icestorm: Replace reference in icebox_vlog.

2017-01-14 Thread Theodoros Foradis
Hello guix,

This patch fixes a reference to  in
icebox_vlog tool.

Regards,
-- 
Theodoros Foradis



[PATCH 1/1] gnu: icestorm: Replace reference in icebox_vlog.

2017-01-14 Thread Theodoros Foradis
* gnu/packages/fpga.scm (icestorm)[arguments]: Modify phases
"fix-usr-local" to replace reference to /usr/local/share.
---
 gnu/packages/fpga.scm | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index f65eae8..eb05a39 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -225,11 +225,12 @@ For synthesis, the compiler generates netlists in the 
desired format.")
   (string-append "PREFIX=" (assoc-ref %outputs "out")))
#:phases
 (modify-phases %standard-phases
-  (add-after 'unpack 'remove-usr-local
-(lambda _
-  (substitute* "iceprog/Makefile"
+  (add-after 'unpack 'fix-usr-local
+(lambda* (#:key outputs #:allow-other-keys)
+  (substitute* '("iceprog/Makefile" "icebox/icebox_vlog.py")
 (("-I/usr/local/include") "")
-(("-L/usr/local/lib") ""))
+(("-L/usr/local/lib") "")
+(("/usr/local/share") (string-append (assoc-ref outputs "out") 
"/share")))
   #t))
   (delete 'configure
 (inputs
-- 
2.10.2




Re: Openbox: Add obconf.

2017-01-14 Thread ng0
Marius Bakke  writes:

> ng0  writes:
>
>> [PATCH] gnu: Add obconf.
>>
>> I noticed we don't have obconf, the configuration tool for openbox.
>> Nix creates an wrapper for this application 
>> (https://github.com/NixOS/nixpkgs/blob/56904d7c423f2b13b37fbd29f39bbb4b52bc7824/pkgs/tools/X11/obconf/default.nix#L18)
>>  I don't know if we'll need this. Running from within openbox it seemed to 
>> execute and go through the tabs without crashing.
>> I haven't tried changing any settings so far.
>
> Could you try changing some stuff and make sure it works? IIRC obconf
> does a lot of funky XML stuff which may require some patching or
> wrapping.
>
> I don't want to add a package just to get a bug report about it not
> working :-)

Okay, I'm currently reconfiguring a system with this branch,
might take a really long time.
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread ng0
Marius Bakke  writes:

> ng0  writes:
>
>> Marius Bakke  writes:
>>
>>> ng0  writes:
>>>
 * gnu/packages/mail.scm (notmuch-vim): New variable.
>>>
>>> I think vim plugins should go in vim.scm, even if it relates to a
>>> package residing elsewhere. Could you send an updated patch? TIA!
>>
>> I disagree. Then we should split up the notmuch emacs integration
>> and move it into emacs.scm by the same logic.
>
> The emacs files are installed with the 'notmuch' package. If they are
> split out, I would argue that they should go in emacs.scm as well.
>
> I don't see the point in that though, since they are less than 1MB and
> do not carry any extra dependencies.

With the vim removed from the inputs, I'd say this could be just
another output?

notmuch:vim
notmuch:emacs

If you use vim and try to install it you will soon realize that
you need vim-full, but then we haven't fixed the ruby-mail
dependency. So possibly moving it to vim is good? I have no
preference I just think it's an mail application just as
python-notmuch is in mail because it has something to do with
notmuch and mail. But I also put ruby-mail into ruby.scm and not
mail.scm and after all, does it even matter? mail.scm isn't so
long that we should be bothered by one more package.
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread ng0
Marius Bakke  writes:

> ng0  writes:
>
>> * gnu/packages/mail.scm (notmuch-vim): New variable.
>> ---
>>  gnu/packages/mail.scm | 37 -
>>  1 file changed, 36 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
>> index 206055751..89aa2444d 100644
>> --- a/gnu/packages/mail.scm
>> +++ b/gnu/packages/mail.scm
>> @@ -15,7 +15,7 @@
>>  ;;; Copyright © 2016 Lukas Gradl 
>>  ;;; Copyright © 2016 Alex Kost 
>>  ;;; Copyright © 2016 Troy Sankey 
>> -;;; Copyright © 2016 ng0 
>> +;;; Copyright © 2016, 2017 ng0 
>>  ;;; Copyright © 2016 Clément Lassieur 
>>  ;;; Copyright © 2016 Arun Isaac 
>>  ;;; Copyright © 2016 John Darrington 
>> @@ -71,6 +71,7 @@
>>#:use-module (gnu packages perl)
>>#:use-module (gnu packages python)
>>#:use-module (gnu packages readline)
>> +  #:use-module (gnu packages ruby)
>>#:use-module (gnu packages search)
>>#:use-module (gnu packages texinfo)
>>#:use-module (gnu packages compression)
>> @@ -83,6 +84,7 @@
>>#:use-module (gnu packages screen)
>>#:use-module (gnu packages tls)
>>#:use-module (gnu packages networking)
>> +  #:use-module (gnu packages vim)
>>#:use-module (gnu packages web)
>>#:use-module (gnu packages xml)
>>#:use-module (gnu packages xorg)
>> @@ -587,6 +589,39 @@ invoking @command{notifymuch} from the post-new hook.")
>>  ing, and tagging large collections of email messages.")
>>  (license gpl3+)))
>>  
>> +(define-public notmuch-vim
>> +  (package
>> +(name "notmuch-vim")
>> +(version (package-version notmuch))
>> +;; The vim plugin is distributed via the notmuch release tarball.
>> +(source (package-source notmuch))
>> +(build-system gnu-build-system)
>> +(propagated-inputs
>> + ;; XXX: This is a plugin, it will not be functional without
>> + ;; vim-full (ruby), ruby-mail, and notmuch.
>> + `(("notmuch" ,notmuch)
>> +   ("vim-full" ,vim-full)
>
> I think if someone installs this plugin, they already have vim and
> notmuch, and may want to use other versions etc. So those can be
> omitted.
>
>> +   ("ruby-mail" ,ruby-mail)))
>> +(arguments
>> + `(#:tests? #f  ; no "test" target
>> +   ;; XXX: Replace the "vim80" folder with a dynamic name.
>> +   #:make-flags (list (string-append "prefix="
>> + (assoc-ref %outputs "out")
>> + "/share/vim/vim80"))
>^^
> You can use (version-major+minor (package-version vim)) here.

That's not the same as vim80 though... resulting structure:

.
└── share
└── vim
└── 8.0
├── doc
│   └── notmuch.txt
├── plugin
│  
└── notmuch.vim
└── syntax
├── notmuch-compose.vim
├── notmuch-folders.vim
├── notmuch-git-diff.vim
├── notmuch-search.vim
└── notmuch-show.vim

vim itself uses the share/vim/vim80 directory.

>> +   #:phases
>> +   (modify-phases %standard-phases
>> + (delete 'configure)
>> + ;; This package lives in a subdirectory of the notmuch source
>> + ;; tree, so chdir into it before building.
>> + (add-after 'unpack 'enter-vim-dir
>> +   (lambda _ (chdir "vim") #t)
>> +(home-page (package-home-page notmuch))
>> +(synopsis "Vim plugin of the Notmuch mail indexing library")
>> +(description
>> + "This package provides the Vim plugin to enable access to the
>^^^
> s/the/a

Okay

> Otherwise LGTM.
>
>> +Notmuch mail indexing and search library in Vim.")
>> +(license gpl3+)))
>> +
>>  (define-public notmuch-addrlookup-c
>>(package
>>  (name "notmuch-addrlookup-c")
>> -- 
>> 2.11.0

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



Re: Packaging IceCat extensions with Guix

2017-01-14 Thread Ludovic Courtès
Mark H Weaver  skribis:

> I wrote:
>
>> Marius Bakke  writes:
>>
>>> I read somewhere that Debian packages certain Firefox extensions. I
>>> tried doing the same with Guix, but haven't been able to get IceCat to
>>> load extensions from a directory.
>>>
>>> The attached (outdated!) patch adds the "uBlock" XPI to
>>> /lib/icecat/extensions. I've tried symlinking this to
>>> "standard" system folders (from IceCat source code), and disabled
>>> unsigned extensions, but no luck so far. Maybe someone more familiar
>>> with IceCat internals can try it?
>>
>> The relevant code is in toolkit/xre/nsXREDirProvider.cpp.  It looks to
>> me like the functions to patch are GetSystemExtensionsDirectory and
>> AppendSysUserExtensionPath.
>>
>> In GetSystemExtensionsDirectory, I guess the strings
>> "/usr/lib/mozilla/extensions" and "/usr/lib64/mozilla/extensions" should
>> both be changed to "/run/current-system/profile/lib/mozilla/extensions".
>
> Also, in GetFile, "/usr/share/mozilla/extensions" should be changed to
> "/run/current-system/profile/share/mozilla/extensions".
>
> Here's another file that needs patching:
>
>   xpcom/io/nsAppFileLocationProvider.cpp
>
> In nsAppFileLocationProvider::GetFile, "/usr/lib/mozilla/plugins" and
> "/usr/lib64/mozilla/plugins" should be changed to
> "/run/current-system/profile/lib/mozilla/plugins".  Note that the
> MOZ_PLUGIN_PATH environment variable is consulted here.

This sounds like the right approach, and I agree that it’d be nice if
Guix could provide extensions!

Ludo’.



Re: [PATCH] Update python-pip to 9.0.1

2017-01-14 Thread Ludovic Courtès
Hello!

Maxim Cournoyer  skribis:

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

[...]

>> ‘guix environment’ without --pure adds its own entries to the front of
>> the search paths, which is why we observe this behavior.
>>
>
> Is this specific to 'guix environment' with --pure vs without --pure?

Without ‘--pure’.  Conversely, ‘--pure’ clears the environment
variables altogether:

  
https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-environment.html

> Also, would this behavior be observed for any 3rd
> party package management system, say, the one for ruby, or 
> language? If so maybe we could document this behavior somewhere.

What would you add to the document of ‘guix environment’?  It seems
quite clear to me at first sight.

>> In most cases this is what we want (we want to create an environment
>> that prevails over the user’s profile), but I can see why this is
>> problematic here.
>>
>> I would argue that using ‘pip’ in ‘guix environment’ is a bit convoluted
>> anyway, but then again I’m no Python expert.  :-)
>>
>
> Yes, it is a bit convoluted. But with environments being so convenient,
> I can think that people other than me would attempt this ;)

Yes I can imagine.  :-)

Thanks,
Ludo’.



Re: [PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread Marius Bakke
ng0  writes:

> Marius Bakke  writes:
>
>> ng0  writes:
>>
>>> * gnu/packages/mail.scm (notmuch-vim): New variable.
>>
>> I think vim plugins should go in vim.scm, even if it relates to a
>> package residing elsewhere. Could you send an updated patch? TIA!
>
> I disagree. Then we should split up the notmuch emacs integration
> and move it into emacs.scm by the same logic.

The emacs files are installed with the 'notmuch' package. If they are
split out, I would argue that they should go in emacs.scm as well.

I don't see the point in that though, since they are less than 1MB and
do not carry any extra dependencies.


signature.asc
Description: PGP signature


Re: [PATCH 1/2] system: Rename grub to bootloader.

2017-01-14 Thread Ludovic Courtès
David Craven  skribis:

> I need to study for my exams the next week or two, but my current
> thinking on the next steps to accomplish the goal of being bootloader
> agnostic are:
>
> 1. discard  in gnu/system/grub in favor of
>  from gnu/system - small api changes

Not sure what you mean.   is an internal things,
whereas  is what users manipulate.

> 2. focus on the code in gnu/system/vm.scm and gnu/build/vm.scm. A lot
> of decisions are being made about the qemu package, the qemu flags,
> the file-system, the bootloader, the architecture and the kernel etc.
> that should be moved elsewhere. - will affect guix/scripts/system and
> probably the system tests infrastructure, the existing api should be
> kept to avoid breakage in those parts.

Agreed.

Ludo’.



Re: [PATCH shepherd] Fix typo in Documentation

2017-01-14 Thread Ludovic Courtès
Benz Schenk  skribis:

> From b535f4b4fdb5c004dcff4ae91ac25f9e931df326 Mon Sep 17 00:00:00 2001
> From: Benz Schenk 
> Date: Fri, 13 Jan 2017 14:07:24 +0100
> Subject: [PATCH] Fix typo in Documentation
>
> * doc/shepherd.texi: Fix typo

Pushed, thanks!

Ludo’.



Re: gnunet (again)

2017-01-14 Thread ng0
FYI, current HEAD of gnunet git just fails with 2 tests in the
testbed api, so my old bug is closed.

You can reproduce this new bug by:

git clone https://pagure.io/packages.git
export GUIX_PACKAGE_PATH=/path/to/packages
guix build gnunet-git-full-tests

ps: not everyone on the internet uses/has the pronoun "he" :)
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread Ludovic Courtès
tumashu   skribis:

> When I use (title 'device) instead of (title 'label), it works again, I don't 
> understand the reason.
>
> https://github.com/tumashu/guixsd-helper

This file has:

(define fs-home
  (file-system
   (device "/dev/sda7")
   (title 'device)
   (mount-point "/home")
   (type "ext4")))

… which is correct.

If you previously had 'label instead of 'device here, the file system
could not be found at boot time because GuixSD was searching for a file
system with “/dev/sda7” as its *label*.

See

for the meaning of ‘title’.

HTH!

Ludo’.



Re: [PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread ng0
Marius Bakke  writes:

> ng0  writes:
>
>> * gnu/packages/mail.scm (notmuch-vim): New variable.
>
> I think vim plugins should go in vim.scm, even if it relates to a
> package residing elsewhere. Could you send an updated patch? TIA!

I disagree. Then we should split up the notmuch emacs integration
and move it into emacs.scm by the same logic.
I find mail.scm the best location.
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



Re: [PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread Marius Bakke
ng0  writes:

> * gnu/packages/mail.scm (notmuch-vim): New variable.
> ---
>  gnu/packages/mail.scm | 37 -
>  1 file changed, 36 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index 206055751..89aa2444d 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -15,7 +15,7 @@
>  ;;; Copyright © 2016 Lukas Gradl 
>  ;;; Copyright © 2016 Alex Kost 
>  ;;; Copyright © 2016 Troy Sankey 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016, 2017 ng0 
>  ;;; Copyright © 2016 Clément Lassieur 
>  ;;; Copyright © 2016 Arun Isaac 
>  ;;; Copyright © 2016 John Darrington 
> @@ -71,6 +71,7 @@
>#:use-module (gnu packages perl)
>#:use-module (gnu packages python)
>#:use-module (gnu packages readline)
> +  #:use-module (gnu packages ruby)
>#:use-module (gnu packages search)
>#:use-module (gnu packages texinfo)
>#:use-module (gnu packages compression)
> @@ -83,6 +84,7 @@
>#:use-module (gnu packages screen)
>#:use-module (gnu packages tls)
>#:use-module (gnu packages networking)
> +  #:use-module (gnu packages vim)
>#:use-module (gnu packages web)
>#:use-module (gnu packages xml)
>#:use-module (gnu packages xorg)
> @@ -587,6 +589,39 @@ invoking @command{notifymuch} from the post-new hook.")
>  ing, and tagging large collections of email messages.")
>  (license gpl3+)))
>  
> +(define-public notmuch-vim
> +  (package
> +(name "notmuch-vim")
> +(version (package-version notmuch))
> +;; The vim plugin is distributed via the notmuch release tarball.
> +(source (package-source notmuch))
> +(build-system gnu-build-system)
> +(propagated-inputs
> + ;; XXX: This is a plugin, it will not be functional without
> + ;; vim-full (ruby), ruby-mail, and notmuch.
> + `(("notmuch" ,notmuch)
> +   ("vim-full" ,vim-full)

I think if someone installs this plugin, they already have vim and
notmuch, and may want to use other versions etc. So those can be
omitted.

> +   ("ruby-mail" ,ruby-mail)))
> +(arguments
> + `(#:tests? #f  ; no "test" target
> +   ;; XXX: Replace the "vim80" folder with a dynamic name.
> +   #:make-flags (list (string-append "prefix="
> + (assoc-ref %outputs "out")
> + "/share/vim/vim80"))
   ^^
You can use (version-major+minor (package-version vim)) here.

> +   #:phases
> +   (modify-phases %standard-phases
> + (delete 'configure)
> + ;; This package lives in a subdirectory of the notmuch source
> + ;; tree, so chdir into it before building.
> + (add-after 'unpack 'enter-vim-dir
> +   (lambda _ (chdir "vim") #t)
> +(home-page (package-home-page notmuch))
> +(synopsis "Vim plugin of the Notmuch mail indexing library")
> +(description
> + "This package provides the Vim plugin to enable access to the
   ^^^
s/the/a

Otherwise LGTM.

> +Notmuch mail indexing and search library in Vim.")
> +(license gpl3+)))
> +
>  (define-public notmuch-addrlookup-c
>(package
>  (name "notmuch-addrlookup-c")
> -- 
> 2.11.0


signature.asc
Description: PGP signature


Re: guix system reconfigure can not work.

2017-01-14 Thread Ludovic Courtès
tumashu   skribis:

> real0m11.824s
> user0m14.604s
> sys0m0.404s

Not fast but not as bad as you initially reported.  So it seems to me
that the only problem left is the one I mentioned earlier:
.

Ludo’.



[PATCH] gnu: Add unetbootin.

2017-01-14 Thread Jan Nieuwenhuizen
Hi,

Needed this to flash BIOS (ugh).

Greetings,
Jan

>From 5aa1cad5c06dc62f477318f0a40aaf9608672b3b Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen 
Date: Sat, 14 Jan 2017 18:23:57 +0100
Subject: [PATCH] gnu: Add unetbootin.

* gnu/packages/disk.scm (unetbootin): New variable.
---
 gnu/packages/disk.scm | 41 -
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index a4bb0be13..71595bf3c 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2015 Mark H Weaver 
 ;;; Copyright © 2016 Tobias Geerinckx-Rice 
 ;;; Copyright © 2016 Efraim Flashner 
-;;; Copyright © 2016 Jan Nieuwenhuizen 
+;;; Copyright © 2016,2017 Jan Nieuwenhuizen 
 ;;; Copyright © 2016 Roel Janssen 
 ;;; Copyright © 2016 Marius Bakke 
 ;;;
@@ -45,6 +45,7 @@
   #:use-module (gnu packages readline)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages xml))
 
 (define-public parted
@@ -329,3 +330,41 @@ project to detect and manipulate partition tables.  Optional file system tools
 permit managing file systems not included in libparted.")
 ;; The home page says GPLv2, but the source code says GPLv2+.
 (license license:gpl2+)))
+
+(define-public unetbootin
+  (package
+(name "unetbootin")
+(version "625")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/unetbootin/unetbootin/archive/;
+  version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"18857mq8a5wwacwb9a6nzm06znzw6md27rbqb72b1kzcpdf2cqqw"
+(build-system gnu-build-system)
+(arguments
+ `(#:tests? #f ; no tests exist
+   #:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+   (lambda* (#:key make-flags #:allow-other-keys)
+ (chdir "src/unetbootin")
+ (system* "lupdate" "unetbootin.pro")
+ (system* "lrelease" "unetbootin.pro")
+ (system* "qmake")))
+ (replace 'install
+  (lambda* (#:key outputs #:allow-other-keys)
+(let* ((out (assoc-ref outputs "out"))
+   (bin (string-append out "/bin")))
+  (mkdir-p bin)
+  (copy-file "unetbootin"
+ (string-append bin "/unetbootin"
+(inputs
+ `(("qt-4" ,qt-4)))
+(home-page "https://unetbootin.github.io/;)
+(synopsis "Create bootable live USB images")
+(description
+ "UNetbootin creates bootable Live USB images.")
+(license license:gpl2+)))
-- 
2.11.0


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


Re: gnunet (again)

2017-01-14 Thread Ludovic Courtès
Hi!

Catonano  skribis:

> In a phase of such instructions I should attach the gdb to a core dump file.
>
> Such file should be "src/util/.libs/lt-test_foo", sometimes wiithout the lt-
>
> Now in src/util/.libs there is no file with a name starting with lt- and
> there are a ton of test_foo files.

This is really a Libtool question, but the solution is that, to debug
‘util/foo’ without having to worry about whether there’s an ‘lt-’ prefix
or not, just run:

  ./libtool --mode=execute gdb src/util/foo core

HTH!

Ludo’.



Re: Openbox: Add obconf.

2017-01-14 Thread Marius Bakke
ng0  writes:

> [PATCH] gnu: Add obconf.
>
> I noticed we don't have obconf, the configuration tool for openbox.
> Nix creates an wrapper for this application 
> (https://github.com/NixOS/nixpkgs/blob/56904d7c423f2b13b37fbd29f39bbb4b52bc7824/pkgs/tools/X11/obconf/default.nix#L18)
>  I don't know if we'll need this. Running from within openbox it seemed to 
> execute and go through the tabs without crashing.
> I haven't tried changing any settings so far.

Could you try changing some stuff and make sure it works? IIRC obconf
does a lot of funky XML stuff which may require some patching or
wrapping.

I don't want to add a package just to get a bug report about it not
working :-)


signature.asc
Description: PGP signature


Re: [PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread Marius Bakke
ng0  writes:

> * gnu/packages/mail.scm (notmuch-vim): New variable.

I think vim plugins should go in vim.scm, even if it relates to a
package residing elsewhere. Could you send an updated patch? TIA!


signature.asc
Description: PGP signature


Re: [PATCH 1/2] gnu: Add ruby-mail.

2017-01-14 Thread Marius Bakke
ng0  writes:

> * gnu/packages/ruby.scm (ruby-mail): New variable.

Applied, thanks! I added a note about enabling tests for the next
version which only has a single dependency on a different mime gem.


signature.asc
Description: PGP signature


Re: Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread David Craven
Hi!

I cannot reproduce the issue on current master, sorry!

make check-system TESTS="separate-store-os" would show if there's a
problem with multiple file-systems using labels.

If you want more help with your issue please come and visit us on IRC...

David



[PATCH] gnu: Add bbs100.

2017-01-14 Thread ng0
From: ng0 

* gnu/packages/bbs.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add bbs.scm.
---
 gnu/local.mk |  1 +
 gnu/packages/bbs.scm | 73 
 2 files changed, 74 insertions(+)
 create mode 100644 gnu/packages/bbs.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 21580a387..fed1b9b2c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -58,6 +58,7 @@ GNU_SYSTEM_MODULES =  \
   %D%/packages/backup.scm  \
   %D%/packages/base.scm\
   %D%/packages/bash.scm\
+  %D%/packages/bbs.scm  \
   %D%/packages/bdw-gc.scm  \
   %D%/packages/benchmark.scm   \
   %D%/packages/bioinformatics.scm  \
diff --git a/gnu/packages/bbs.scm b/gnu/packages/bbs.scm
new file mode 100644
index 0..e20e7d35d
--- /dev/null
+++ b/gnu/packages/bbs.scm
@@ -0,0 +1,73 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 ng0 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages bbs)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages perl)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public bbs100
+  (package
+   (name "bbs100")
+   (version "3.3.1")
+   (source (origin
+(method url-fetch)
+(uri (string-append "http://www.heiho.net/bbs100/;
+name "-" version ".tar.gz"))
+(sha256
+ (base32
+  "1wjqyxw5wpxgzwx83vx2c56v0jjq62bsj1xn4livm0crjbi4mdqb"
+   (build-system gnu-build-system)
+   (arguments
+`(#:test-target "test"
+  #:parallel-build? #f
+  #:phases
+  (modify-phases %standard-phases
+(add-before 'configure 'patch-param-file
+  (lambda _
+(substitute* "etc/param"
+  (("/usr/share/zoneinfo/") "")
+  (("^zoneinfodir")
+   (string-append "zoneinfodir "
+  (assoc-ref %build-inputs "tzdata")
+  "/share/zoneinfo")))
+#t))
+(add-before 'configure 'chdir
+  (lambda _
+(chdir "src")
+#t)
+   (inputs
+`(("perl" ,perl)))
+   (native-inputs
+`(("tzdata" ,tzdata)
+  ("inetutils" ,inetutils)))
+   (synopsis "DOC style telnet BBS")
+   (description
+"@code{bbs100} is a @dfn{Bulletin Board System} (BBS) in the style of
+DOC (which remotely resembles 'Citadel').
+It is a single process daemon that handles all connections at once, while
+consuming very low cpu resources (< 1%).  Bbs100 can handle over a thousand
+simultaneous users, is highly customizable, easy to setup, and has
+many configurable features.")
+   (license license:gpl2+)
+   (home-page "http://www.heiho.net/bbs100/;)))
-- 
2.11.0




Add: bbs100.

2017-01-14 Thread ng0
This patch adds bbs100. It is still maintained, the release intervals are just 
very long.
It will need a service to be fully functional, but that service looks like it 
will be small.
The build runs a test and does not follow 100% the INSTALL file in the source 
of bbs100, for the reason that when you do as they recommend you will sent the 
build system into a loop. Funny bug.

I hope this build also terminates the "bbs" process after the check phase, 
because when I wanted to start it I was told it already runs (but I saw no bbs 
or its pid in my joblist).
The check phase says it is working, so I trust it.




[PATCH 1/2] gnu: Add ruby-mail.

2017-01-14 Thread ng0
* gnu/packages/ruby.scm (ruby-mail): New variable.
---
 gnu/packages/ruby.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8fb22d006..eae83f1ac 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014, 2015 David Thompson 
 ;;; Copyright © 2015 Ricardo Wurmus 
 ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft 
+;;; Copyright © 2017 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4198,3 +4199,34 @@ RFC 2617.  This enables the use of the digest 
authentication scheme instead
 of the more insecure basic authentication scheme.")
 (home-page "http://github.com/drbrain/net-http-digest_auth;)
 (license license:expat)))
+
+(define-public ruby-mail
+  (package
+(name "ruby-mail")
+(version "2.6.4")
+(source
+ (origin
+   (method url-fetch)
+   (uri (rubygems-uri "mail" version))
+   (sha256
+(base32
+ "0c9vqfy0na9b5096i5i4qvrvhwamjnmajhgqi3kdsdfl8l6agmkp"
+(build-system ruby-build-system)
+(propagated-inputs
+ `(("ruby-mime-types" ,ruby-mime-types)))
+(arguments
+ ;; Tests require extra gems not included in the Gemfile.
+ `(#:tests? #f))
+(synopsis "Mail library for Ruby")
+(description
+ "Mail is an internet library for Ruby that is designed to handle email
+generation, parsing and sending.  The purpose of this library is to provide
+a single point of access to handle all email functions, including sending
+and receiving emails.  All network type actions are done through proxy
+methods to @code{Net::SMTP}, @code{Net::POP3} etc.
+
+Mail has been designed with a very simple object oriented system that
+really opens up the email messages you are parsing, if you know what you
+are doing, you can fiddle with every last bit of your email directly.")
+(home-page "https://github.com/mikel/mail;)
+(license license:expat)))
-- 
2.11.0




Add: notmuch-vim

2017-01-14 Thread ng0
[PATCH 1/2] gnu: Add ruby-mail.

A gem needed at runtime for notmuch-vim.

[PATCH 2/2] gnu: Add notmuch-vim.

I'm not sure about the propagation:
Without vim-full (ruby enabled), notmuch and ruby-mail this vim plugin will not 
work. Propagation seems like the way to go here, but I'm open to suggestions. 
All this build system does is copy some files around.



[PATCH 2/2] gnu: Add notmuch-vim.

2017-01-14 Thread ng0
* gnu/packages/mail.scm (notmuch-vim): New variable.
---
 gnu/packages/mail.scm | 37 -
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 206055751..89aa2444d 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2016 Lukas Gradl 
 ;;; Copyright © 2016 Alex Kost 
 ;;; Copyright © 2016 Troy Sankey 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016, 2017 ng0 
 ;;; Copyright © 2016 Clément Lassieur 
 ;;; Copyright © 2016 Arun Isaac 
 ;;; Copyright © 2016 John Darrington 
@@ -71,6 +71,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages search)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
@@ -83,6 +84,7 @@
   #:use-module (gnu packages screen)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages networking)
+  #:use-module (gnu packages vim)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -587,6 +589,39 @@ invoking @command{notifymuch} from the post-new hook.")
 ing, and tagging large collections of email messages.")
 (license gpl3+)))
 
+(define-public notmuch-vim
+  (package
+(name "notmuch-vim")
+(version (package-version notmuch))
+;; The vim plugin is distributed via the notmuch release tarball.
+(source (package-source notmuch))
+(build-system gnu-build-system)
+(propagated-inputs
+ ;; XXX: This is a plugin, it will not be functional without
+ ;; vim-full (ruby), ruby-mail, and notmuch.
+ `(("notmuch" ,notmuch)
+   ("vim-full" ,vim-full)
+   ("ruby-mail" ,ruby-mail)))
+(arguments
+ `(#:tests? #f  ; no "test" target
+   ;; XXX: Replace the "vim80" folder with a dynamic name.
+   #:make-flags (list (string-append "prefix="
+ (assoc-ref %outputs "out")
+ "/share/vim/vim80"))
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ ;; This package lives in a subdirectory of the notmuch source
+ ;; tree, so chdir into it before building.
+ (add-after 'unpack 'enter-vim-dir
+   (lambda _ (chdir "vim") #t)
+(home-page (package-home-page notmuch))
+(synopsis "Vim plugin of the Notmuch mail indexing library")
+(description
+ "This package provides the Vim plugin to enable access to the
+Notmuch mail indexing and search library in Vim.")
+(license gpl3+)))
+
 (define-public notmuch-addrlookup-c
   (package
 (name "notmuch-addrlookup-c")
-- 
2.11.0




guix environment & Ctrl-C

2017-01-14 Thread Danny Milosavljevic
Hi,

could it be that we broke Ctrl-C in guix environment when we fixed Ctrl-C 
within guix build?

When I press Ctrl-C anywhen (for example on the shell) while in a guix 
environment [env] it will hang...



Re:Re: Suggest add font: font-wqy-microhei

2017-01-14 Thread ng0
Hi,

tumashu  writes:

> If we need to use "fc-cache -f", suggest add it to document.

Maybe we finally have enough fonts to justify a
font-build-system, which would run "fc-cache -f" at the end of
it, or do something similar?
I have often seen this (and done this) when I used Gentoo.

> At 2017-01-14 05:23:55, "Danny Milosavljevic"  wrote:
>>Hi,
>>
>>On Fri, 13 Jan 2017 23:16:53 +0800 (CST)
>>tumashu   wrote:
>>
>>> When I install a font with a non-root account,  the font just can't be 
>>> found by "fc-list",
>>> and run "fc-cache" is useless too, But run "fc-cache -f" can cache the 
>>> installed font,
>>> it it a bug or just my machine problom?
>>
>>I don't know, sorry. It may be that fc-cache uses timestamps (mtime) to 
>>figure out whether a directory changed or not and that won't work for us 
>>since we always use the same mtime (for reproducibility). But that's just a 
>>guess - I hope someone else knows it...
>>

What do you think?
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



Re:Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread tumashu
When I use (title 'device) instead of (title 'label), it works again, I don't 
understand the reason.

https://github.com/tumashu/guixsd-helper






At 2017-01-14 19:00:35, "David Craven"  wrote:
>Hi!
>
>> 
>> [   12.079023] [drm] Initialized radeon 2.48.0 20080528 for :01:00.0 on
>> minor 0
>> [   13.253525] input: HDA Intel MID Mic as
>> /devices/pci:00/:00:1b.0/sound/card0/input18
>> [   13.253746] input: HDA Intel MID Headphone as
>> /devices/pci:00/:00:1b.0/sound/card0/input19
>> [   13.253983] input: HDA ATI HDMI HDMI/DP,pcm=3 as
>> /devices/pci:00/:00:01.0/:01:00.1/sound/card1/input17
>> [   13.326750] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
>> [   13.327259] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xf8b2, irq=19
>> [   13.446723] ath9k :44:00.0 wlo1: renamed from wlan0
>> **Get stuck at this point.**
>> -
>
>These are generated by the kernel. There must be some stacktrace or
>errors from guixsd missing somewhere, maybe when running guix system
>reconfigure?
>
>I don't see how an error in the guixsd configuration or a bug in
>guixsd would cause the kernel to hang during boot, before entering the
>initrd.
>
>The recommended way of adding file-systems to an operating-system
>definition according to the guix manual is:
>
>(file-systems (cons* fs-root fs-home fs-backup1 fs-backup2 %base-file-systems))
>
>Can you verify that the working setup kernel is the same one as the
>non working setup kernel?
>
>Possibly a relevant commit is 37203715805335131d18ac05ecb0367f222cd065.
>
>HTH!
>
>David


Re:Re: guix system reconfigure can not work.

2017-01-14 Thread tumashu
root@tumashu /home/feng/project/guixsd-helper# time guix system reconfigure 
./guixsd-helper.scm -n
The following derivations would be built:
   /gnu/store/m25mz3h7zfp427a5l8h2h5g7rvy61s91-system.drv
   /gnu/store/lwpxcgq4r01vjfd08gd96ljsdf5ksina-grub.cfg.drv
   /gnu/store/xxb2cyhv8j0zcgf5s70j8pf0v64df7yw-elogind-program-wrapper.drv
   /gnu/store/iq9q86rhigdccc1y4r50smll0wly68ys-dbus-system-services.drv
   /gnu/store/jkr6m5k8bzc2dy3b16b40mr40bnm1rja-elogind-wrapper.drv
   /gnu/store/31c2mpbyvlkvcfp1j3drpj2cayxvys7z-groupmod.drv
   /gnu/store/42z16f1s7i85ncdgzxhsircgvjlc7000-su.drv
   /gnu/store/9v3vgfcad7zki615h1dk44jq0aj093yl-userdel.drv
   /gnu/store/a7wi0006l4abhzp2rqq0dwdygpmjqa0r-passwd.drv
   /gnu/store/ag3fa7qjpnxf3wqn243sw0i2b0mwd7wy-groupadd.drv
   /gnu/store/c69bgzbf39xryfr7ialr1p1x8hx0rswa-useradd.drv
   /gnu/store/h52hxfl649yqgwdlx32r4skziqp1ws3a-slock.drv
   /gnu/store/pmidsz4prmp1hgla3xlxh5k9q0l0rllm-groupdel.drv
   /gnu/store/qk83kjvvvpn8c2481jjaxbdjznjxp76x-polkit-1.drv
   /gnu/store/qv4ppq0vbjfx18j3ka55paa3zyvc1bzg-slim.drv
   /gnu/store/qvv8w6kbvk7dy1rz20k32h8cxw256nzj-usermod.drv
   /gnu/store/sn9i1gnqwrx5av9pn5hvxqbkp00dyd9y-sudo.drv
   /gnu/store/v5pyy9bm63vqfamyzmc8b60ys23yq0pc-other.drv
   /gnu/store/xlvww8mfscn6m2mqc8xcmgcki8ln6xac-xlock.drv
   /gnu/store/zqjj1s3bpnj3ifrirr9n6b6v44j4iwxr-login.drv
   /gnu/store/6591iwpq8k0znbp6y2qabklhwkcs9j3c-pam.d.drv
   /gnu/store/vsx316bnp86f5gih8w6xgw2n2slzawn2-dbus-configuration.drv
   /gnu/store/yamb522xilb9w73s5qsyhws37ah70z0l-etc-polkit-1.drv
   /gnu/store/459rdbdah0xjg0v9cqp909hrq1hiss0s-udev.conf.drv
   /gnu/store/4ypbcp9fdrqh374i0havj742vw9albm5-udev-rules.drv
   /gnu/store/r1rv37gsszmw8smdz9rbdvnv10b434nh-shepherd-udev.scm.drv
   /gnu/store/7dq2nrc973rzvla8wgl3dhfcv8mfyy25-xserver.conf.drv
   /gnu/store/xxq7a85gcvv7sayplsxks8s9ps7g9ydz-xorg.conf.d.drv
   /gnu/store/rq7g8rcrlap1iivlgqdlmcz716cl5wl5-xinitrc.drv
   /gnu/store/xbpxfrn3ivh7qn0mwgfq7cagirzpz026-start-xorg.drv
   /gnu/store/c8qxivbagzx4q9vy6b75820p1js7ffdh-slim.cfg.drv
   /gnu/store/jlnzk3aklqgjy4gpqdj874igggmmvh9y-shepherd-xorg-server.scm.drv
   /gnu/store/cqnv80bifqwywpb1wlfpk9ghsz2jzkpn-shepherd-networking.scm.drv
   /gnu/store/i5wxw155vgjp88anx2bw01m617q6mr1d-shepherd.conf.drv
   /gnu/store/rldyywasz0all02299bihlgc2p9w8ly1-activate-service.drv
   /gnu/store/jpfy7rgyh551q13lkk9q7293j47r16qc-activate-service.drv
   /gnu/store/dyxjca8ryrnyy2rdh1dh624nylv96nxn-activate-service.drv
   /gnu/store/8mlhp3h3m086kwarl4w2p846swirh00m-activate.drv
   /gnu/store/ki6y8xhi7aclgryha6xz31bbg5p61v50-boot.drv
   /gnu/store/zbl1bbfnplnlkxr5ckixf3p0zz977z6m-fonts-dir.drv
   /gnu/store/n25k94bgijhi4iv6rkhdvlhxbh0x8j40-gtk-im-modules.drv
   /gnu/store/jgaav8vjlv2sbvhhdy3pzfx95w4nn781-info-dir.drv
   /gnu/store/drfmgbpd33rsapdqvk39scdkj54a9ad5-xdg-mime-database.drv
   /gnu/store/95pyjljcy572542xqfdgi6hazah442h0-gtk-icon-themes.drv
   /gnu/store/1ffq0q9m513pl5w25pjbzc68dgv7g3yr-ca-certificate-bundle.drv
   /gnu/store/7vypc27nsr00phh4iaszqhcvih2xawh4-profile.drv
   /gnu/store/n3p1b7wr5syf1c4wxsjak0a8ns1lzyck-etc.drv
The following files would be downloaded:
   /gnu/store/lylrqspx2sl6jq3dh8hig3ss46a2nqgf-skel
   /gnu/store/dw1px9d01fq3xxd055ayfk45p3xc48xi-shepherd-guix-daemon.scm
   /gnu/store/xw052i9yf6flcwwhp6r0q3lldyqzxhs6-activate-service
   /gnu/store/mhxmr8zc4dajf1wnv6ssb6bf1cyam214-grub-image.png

real0m11.824s
user0m14.604s
sys0m0.404s
root@tumashu /home/feng/project/guixsd-helper# time guix system reconfigure 
./guixsd-helper.scm -n --no-substitutes
The following derivations would be built:
   /gnu/store/m25mz3h7zfp427a5l8h2h5g7rvy61s91-system.drv
   /gnu/store/lwpxcgq4r01vjfd08gd96ljsdf5ksina-grub.cfg.drv
   /gnu/store/xxb2cyhv8j0zcgf5s70j8pf0v64df7yw-elogind-program-wrapper.drv
   /gnu/store/iq9q86rhigdccc1y4r50smll0wly68ys-dbus-system-services.drv
   /gnu/store/jkr6m5k8bzc2dy3b16b40mr40bnm1rja-elogind-wrapper.drv
   /gnu/store/31c2mpbyvlkvcfp1j3drpj2cayxvys7z-groupmod.drv
   /gnu/store/42z16f1s7i85ncdgzxhsircgvjlc7000-su.drv
   /gnu/store/9v3vgfcad7zki615h1dk44jq0aj093yl-userdel.drv
   /gnu/store/a7wi0006l4abhzp2rqq0dwdygpmjqa0r-passwd.drv
   /gnu/store/ag3fa7qjpnxf3wqn243sw0i2b0mwd7wy-groupadd.drv
   /gnu/store/c69bgzbf39xryfr7ialr1p1x8hx0rswa-useradd.drv
   /gnu/store/h52hxfl649yqgwdlx32r4skziqp1ws3a-slock.drv
   /gnu/store/pmidsz4prmp1hgla3xlxh5k9q0l0rllm-groupdel.drv
   /gnu/store/qk83kjvvvpn8c2481jjaxbdjznjxp76x-polkit-1.drv
   /gnu/store/qv4ppq0vbjfx18j3ka55paa3zyvc1bzg-slim.drv
   /gnu/store/qvv8w6kbvk7dy1rz20k32h8cxw256nzj-usermod.drv
   /gnu/store/sn9i1gnqwrx5av9pn5hvxqbkp00dyd9y-sudo.drv
   /gnu/store/v5pyy9bm63vqfamyzmc8b60ys23yq0pc-other.drv
   /gnu/store/xlvww8mfscn6m2mqc8xcmgcki8ln6xac-xlock.drv
   /gnu/store/zqjj1s3bpnj3ifrirr9n6b6v44j4iwxr-login.drv
   /gnu/store/8ifi9gvhwfr0spa6h4wvr7y0jj3ggbvc-Python-3.5.2.tar.xz.drv
   /gnu/store/m64s3wdxcdl4b1pid1lnz5mdmvpr80nh-Python-3.5.2.tar.xz.drv
   

Re: guix system reconfigure can not work.

2017-01-14 Thread Ludovic Courtès
tumashu   skribis:

> I don't think it is a networking issue, when I run:
>
> sudo guix system --verbosity=100 reconfigure ./guixsd-helper.scm

And what does:

  time guix system reconfigure ./guixsd-helper.scm -n

report?  As well as:

  time guix system reconfigure ./guixsd-helper.scm -n --no-substitutes

TIA,
Ludo’.



Re: [PATCH] gnu: services: Add redis-service

2017-01-14 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Thompson, David  writes:
>
>> I'm seeing a trend where people write services with configuration
>> types that don't cover nearly the amount of configuration options to
>> make the service useful.  MySQL, and now this Redis server, are
>> examples of this.  There are many more configuration options in Redis
>> than this service exposes.
>>
>> What do we do?
>
> Since there is no automated way to cover all options (or even the most
> useful subset) for all possible services I think it’s okay to start with
> a minimally useful service definition.
>
> We can extend them later as people see the need for better coverage.
> One thing I’d always like to see, though, is an escape hatch that allows
> users to extend the service with plain text configuration snippets.

Agreed.  I like it when people submit full-featured services, like the
OpenVPN services that were posted recently, but I think it’s also
valuable to have first stabs at services like this Redis server.  It
is functional and useful, lowers the barrier for the initial submitter
as well as for people who want to improve it.

Ludo’.



Re: [PATCH 2/2] gnu: Add openvpn service.

2017-01-14 Thread Julien Lepiller
On Fri, 13 Jan 2017 18:58:18 +0100
l...@gnu.org (Ludovic Courtès) wrote:

> Julien Lepiller  skribis:
> 
> > * gnu/services/vpn.scm: New file.
> > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> > * doc/guix.texi (VPN Services): New section.  
> 
> Woow, neat!
> 
> Overall LGTM!  The following comments are about cosmetic issues, but I
> think it’s best to get them right.
> 
> > +@node VPN Services
> > +@subsubsection VPN Services
> > +@cindex VPN
> > +
> > +The @code{(gnu services vpn)} module provides the following
> > sevices:  
> 
> Please provide a few sentences of context and index entries, like:
> 
>   @cindex VPN (virtual private network)
>   @cindex virtual private network (VPN)
>   The @code{(gnu services vpn)} module provides services related to
>   @dfn{virtual private networks} (VPNs).  It provides a @emph{client}
>   service---allowing your machine to connect to a VPN, as well as
>   @emph{server} functionality---where your machine hosts a VPN.  Both
>   use @uref{https://openvpn.net/, OpenVPN}.
> 
> > +@deffn {Scheme Procedure} openvpn-client-service @
> > +   [#:config (openvpn-client-configuration)]
> > +
> > +Return a service that runs @var{openvpn}, a VPN daemon, as a
> > client.  
> 
> @command{openvpn} (or @command{openvpnd}, whatever it’s called), or
> OpenVPN.  @var is for variables.
> 
> > +@deffn {Scheme Procedure} openvpn-server-service @
> > +   [#:config (openvpn-server-configuration)]
> > +
> > +Return a service that runs @var{openvpn}, a VPN daemon, as a
> > server.  
> 
> Ditto.
> 
> > +openvpn-ccd-configuration
> > +generate-openvpn-client-documentation
> > +generate-openvpn-server-documentation
> > +))  
> 
> No hanging parens please.  :-)
> 
> > +(define (uglify-field-name name)
> > +  (match name
> > + ('verbosity "verb")
> > + (_ (let ((str (symbol->string name)))
> > +  (if (string-suffix? "?" str)
> > +  (substring str 0 (1- (string-length str)))
> > +  str)  
> 
> The indentation is off in several places.  Could you run:
> 
>   ./etc/indent-code.el gnu/services/vpn.scm
> 
> (You need to have ‘emacs’ or ‘emacs-minimal’ installed but this is
> non-interactive.)
> 
> > +(define (create-ccd-directory val)
> > +  (let ((files (map (lambda (ccd)
> > +  (list (openvpn-ccd-configuration-name ccd)
> > +(with-output-to-string
> > +  (lambda ()
> > +(serialize-configuration
> > +  ccd
> > openvpn-ccd-configuration-fields)  
> 
> Please add a docstring.  It’s not obvious what’s happening here.
> 
> > +val)))
> > +(computed-file "ccd"
> > +  (with-imported-modules '((guix build utils))
> > +#~(begin
> > +  (use-modules (guix build utils))
> > +  (mkdir-p #$output)
> > +(for-each
> > +  (lambda (ccd)
> > +(call-with-output-file (string-append #$output
> > "/" (car ccd))
> > +  (lambda (port) (display (car (cdr ccd)) port
> > +  '#$files))  
> 
> Please use ‘match’ instead of (car (cdr ccd)):
> 
>   (lambda (port)
> (match ccd
>   ((_ (thing _ ...))
>(display thing port
> 
> Of course you can use an identifier more descriptive than
> ‘thing’.  ;-)
> 
> > +   (server-ipv6
> > + (cidr6 #f)
> > + "A CIDR notation specifying the ipv6 subnet inside the
> > virtual network.")  
> 
> It would be ideal if you could expand “CIDR” the first type.
> 
> Also, in comments and docstrings in the whole file (and thus in
> guix.texi):
> 
>   s/ipv6/IPv6/
>   s/udp/UDP/
>   s/tcp/TCP/
>   s/diffie-hellman/Diffie-Hellman/
>   s/Openvpn/OpenVPN/
> 
> > +(define (openvpn-shepherd-service role)
> > +  (lambda (config)
> > +(let* ((config-file (openvpn-config-file role config))
> > +   ;#$(serialize-configuration config
> > +   ;(match role
> > +   ;  ('server
> > openvpn-server-configuration-fields)
> > +   ;  ('client
> > openvpn-client-configuration-fields)  
> 
> Please remove the comment.
> 
> > +  (start #~(make-forkexec-constructor
> > + (list (string-append #$openvpn
> > "/sbin/openvpn")
> > +   "--writepid" #$pid-file "--config"
> > #$config-file
> > +   "--daemon")))  
> 
> Add #:pid-file #$pid-file, so that shepherd does the right thing.
> 
> > +(define %openvpn-activation
> > +  #~(begin
> > +  (mkdir-p "/var/run/openvpn")))  
> 
> ‘begin’ can be omitted.
> 
> Could you send an updated patch?

This should correct everything you reported.

> 
> Besides, could you think of a system test that would allow us to test
> both services?  Perhaps a single config that has both the OpenVPN
> 

Re: Hacker Public Radio (podcast) interview about Guix

2017-01-14 Thread Ludovic Courtès
Hello Guix!

Christopher Allan Webber  skribis:

> Hello!  In late 2015 I was interviewed about Guix for Hacker Public
> Radio.  Obviously, a lot has happened since then, but the ideas are
> still relevant.  This is mainly aimed at people who are interested in
> what Guix is and have maybe never even heard of what functional package
> management is, and I think it covers that well enough.  But I think it
> will still also be fun for seasoned Guix hackers who like to hear people
> talk about Guix. ;)
>
>   http://hackerpublicradio.org/eps.php?id=2198

I listened to it the other day and found it super interesting and fun!
I like the description of how you came to Guile and Guix, the intro to
functional programming, and the great overview of Guix.

Recommended!  :-)

Ludo’.



Re: Graphical Installer - Call for Testing.

2017-01-14 Thread David Craven
Hi John,

I looked at adding btrfs support, and noticed that there was a lot of
trailing white space. Please remove trailing whitespace before
pushing...

Looks really nice!

David



[PATCH] gnu: Add obconf.

2017-01-14 Thread ng0
* gnu/packages/openbox.scm (obconf): New variable.
---
 gnu/packages/openbox.scm | 39 ++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/openbox.scm b/gnu/packages/openbox.scm
index 36e39d826..c92f6f834 100644
--- a/gnu/packages/openbox.scm
+++ b/gnu/packages/openbox.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Julien Lepiller 
 ;;; Copyright © 2016 Efraim Flashner 
+;;; Copyright © 2017 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +30,9 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages gettext))
 
 (define-public openbox
   (package
@@ -67,4 +70,38 @@ implementations.")
 (home-page "http://openbox.org/wiki/Main_Page;)
 (license gpl2+)))
 
+(define-public obconf
+  (package
+(name "obconf")
+(version "2.0.4")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "http://openbox.org/dist/; name
+   "/" name "-" version ".tar.gz"))
+   (sha256
+(base32
+ "1fanjdmd8727kk74x5404vi8v7s4kpq48l583d12fsi4xvsfb8vi"
+(inputs
+ `(("gtk+-2" ,gtk+-2)
+   ("imlib2" ,imlib2)
+   ("libglade" ,libglade)
+   ("openbox" ,openbox)
+   ("startup-notification" ,startup-notification)
+   ("libsm" ,libsm)
+   ("librsvg" ,librsvg)
+   ("libxft" ,libxft)))
+(native-inputs
+ `(("gettext" ,gettext-minimal)
+   ("pkg-config" ,pkg-config)))
+(build-system gnu-build-system)
+(arguments
+ `(#:configure-flags (list "--enable-nls")))
+(home-page "http://openbox.org/wiki/ObConf:About;)
+(synopsis "Openbox configuration tool")
+(description
+ "Obconf is a tool for configuring the Openbox window manager.
+You can configure its appearance, themes, and much more.")
+(license gpl2+)))
+
 ;;; openbox.scm ends here
-- 
2.11.0




Openbox: Add obconf.

2017-01-14 Thread ng0
[PATCH] gnu: Add obconf.

I noticed we don't have obconf, the configuration tool for openbox.
Nix creates an wrapper for this application 
(https://github.com/NixOS/nixpkgs/blob/56904d7c423f2b13b37fbd29f39bbb4b52bc7824/pkgs/tools/X11/obconf/default.nix#L18)
 I don't know if we'll need this. Running from within openbox it seemed to 
execute and go through the tabs without crashing.
I haven't tried changing any settings so far.



Re:Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread tumashu
(file-systems (cons fs-root %fs-base-file-systems))

can work
在 2017-01-14 19:00:35,"David Craven"  写道:
Hi!

> 
> [   12.079023] [drm] Initialized radeon 2.48.0 20080528 for :01:00.0 on
> minor 0
> [   13.253525] input: HDA Intel MID Mic as
> /devices/pci:00/:00:1b.0/sound/card0/input18
> [   13.253746] input: HDA Intel MID Headphone as
> /devices/pci:00/:00:1b.0/sound/card0/input19
> [   13.253983] input: HDA ATI HDMI HDMI/DP,pcm=3 as
> /devices/pci:00/:00:01.0/:01:00.1/sound/card1/input17
> [   13.326750] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [   13.327259] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xf8b2, irq=19
> [   13.446723] ath9k :44:00.0 wlo1: renamed from wlan0
> **Get stuck at this point.**
> -

These are generated by the kernel. There must be some stacktrace or
errors from guixsd missing somewhere, maybe when running guix system
reconfigure?

I don't see how an error in the guixsd configuration or a bug in
guixsd would cause the kernel to hang during boot, before entering the
initrd.

The recommended way of adding file-systems to an operating-system
definition according to the guix manual is:

(file-systems (cons* fs-root fs-home fs-backup1 fs-backup2 %base-file-systems))

Can you verify that the working setup kernel is the same one as the
non working setup kernel?

Possibly a relevant commit is 37203715805335131d18ac05ecb0367f222cd065.

HTH!

David


Re:Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread tumashu
(file-systems (cons* fs-root fs-home fs-backup1 fs-backup2 %base-file-systems))

cannot work !
在 2017-01-14 19:00:35,"David Craven"  写道:
Hi!

> 
> [   12.079023] [drm] Initialized radeon 2.48.0 20080528 for :01:00.0 on
> minor 0
> [   13.253525] input: HDA Intel MID Mic as
> /devices/pci:00/:00:1b.0/sound/card0/input18
> [   13.253746] input: HDA Intel MID Headphone as
> /devices/pci:00/:00:1b.0/sound/card0/input19
> [   13.253983] input: HDA ATI HDMI HDMI/DP,pcm=3 as
> /devices/pci:00/:00:01.0/:01:00.1/sound/card1/input17
> [   13.326750] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [   13.327259] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xf8b2, irq=19
> [   13.446723] ath9k :44:00.0 wlo1: renamed from wlan0
> **Get stuck at this point.**
> -

These are generated by the kernel. There must be some stacktrace or
errors from guixsd missing somewhere, maybe when running guix system
reconfigure?

I don't see how an error in the guixsd configuration or a bug in
guixsd would cause the kernel to hang during boot, before entering the
initrd.

The recommended way of adding file-systems to an operating-system
definition according to the guix manual is:

(file-systems (cons* fs-root fs-home fs-backup1 fs-backup2 %base-file-systems))

Can you verify that the working setup kernel is the same one as the
non working setup kernel?

Possibly a relevant commit is 37203715805335131d18ac05ecb0367f222cd065.

HTH!

David


Re: mounting "my-home" to /home cannot work again.

2017-01-14 Thread David Craven
Hi!

> 
> [   12.079023] [drm] Initialized radeon 2.48.0 20080528 for :01:00.0 on
> minor 0
> [   13.253525] input: HDA Intel MID Mic as
> /devices/pci:00/:00:1b.0/sound/card0/input18
> [   13.253746] input: HDA Intel MID Headphone as
> /devices/pci:00/:00:1b.0/sound/card0/input19
> [   13.253983] input: HDA ATI HDMI HDMI/DP,pcm=3 as
> /devices/pci:00/:00:01.0/:01:00.1/sound/card1/input17
> [   13.326750] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [   13.327259] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xf8b2, irq=19
> [   13.446723] ath9k :44:00.0 wlo1: renamed from wlan0
> **Get stuck at this point.**
> -

These are generated by the kernel. There must be some stacktrace or
errors from guixsd missing somewhere, maybe when running guix system
reconfigure?

I don't see how an error in the guixsd configuration or a bug in
guixsd would cause the kernel to hang during boot, before entering the
initrd.

The recommended way of adding file-systems to an operating-system
definition according to the guix manual is:

(file-systems (cons* fs-root fs-home fs-backup1 fs-backup2 %base-file-systems))

Can you verify that the working setup kernel is the same one as the
non working setup kernel?

Possibly a relevant commit is 37203715805335131d18ac05ecb0367f222cd065.

HTH!

David



Re: [PATCH] gnu: services: Add redis-service

2017-01-14 Thread Hartmut Goebel
Am 13.01.2017 um 23:01 schrieb Ricardo Wurmus:
> We can extend them later as people see the need for better coverage.
> One thing I’d always like to see, though, is an escape hatch that allows
> users to extend the service with plain text configuration snippets.

+1

-- 
Regards
Hartmut Goebel

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



0xBF773B65.asc
Description: application/pgp-keys


Re: [PATCH] gnu: Add r-sva

2017-01-14 Thread Ricardo Wurmus

Ra  writes:

> follows the patch with the reduced description, sorry for the long version.
> I do not know why you get the "corrupt" message, I hope that attaching the
> patch file could solve the issue.

The inline patch didn’t work, but the attached version was fine.  Don’t
know what went wrong here.  Thanks for your patience!

I made a few minor changes:

* added a trailing period to the commit summary line
* converted the description to use two spaced between sentences
* slightly reworded the second sentence

Thanks again for the patch!  I pushed it to master as dd42a330d.

I’m looking forward to more of your contributions to the statistics and
bioinformatics modules!

--
Ricardo

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




Re: [PATCH] gnu: Add r-gmodels

2017-01-14 Thread Ricardo Wurmus

Leo Famulari  writes:

> On Fri, Jan 13, 2017 at 10:55:29PM +0100, Ricardo Wurmus wrote:
>> 
>> Ra  writes:
>> 
>> > * gnu/packages/statistics.scm (r-gmodels): New variable.
>> > ---
>> >  gnu/packages/statistics.scm | 19 +++
>> >  1 file changed, 19 insertions(+)
>> 
>> Thanks for the patch, but I get the same problem as with your other
>> patch:
>> 
>> error: corrupt patch at line 10
>> 
>> I don’t know if this is a problem on my end or with your email.
>
> It works for me.

How odd.  Could you please apply it then?  Thanks in advance!

-- 
Ricardo

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