New Spanish PO file for 'guix-manual' (version 1.0.0-pre2)

2019-04-27 Thread Translation Project Robot
Hello, gentle maintainer.

This is a message from the Translation Project robot.

A revised PO file for textual domain 'guix-manual' has been submitted
by the Spanish team of translators.  The file is available at:

https://translationproject.org/latest/guix-manual/es.po

(We can arrange things so that in the future such files are automatically
e-mailed to you when they arrive.  Ask at the address below if you want this.)

All other PO files for your package are available in:

https://translationproject.org/latest/guix-manual/

Please consider including all of these in your next release, whether
official or a pretest.

Whenever you have a new distribution with a new version number ready,
containing a newer POT file, please send the URL of that distribution
tarball to the address below.  The tarball may be just a pretest or a
snapshot, it does not even have to compile.  It is just used by the
translators when they need some extra translation context.

The following HTML page has been updated:

https://translationproject.org/domain/guix-manual.html

If any question arises, please contact the translation coordinator.

Thank you for all your work,

The Translation Project robot, in the
name of your translation coordinator.





Re: Last translation round on Monday?

2019-04-27 Thread Julien Lepiller
Le Sat, 27 Apr 2019 19:13:32 +0200,
Ludovic Courtès  a écrit :

> Saluton brave translators!
> 
> To account for the latest changes to the manual and to the code
> (notably  :-)), I think we
> should do a last translation round via the Translation Project on
> Monday.
> 
> Julien, WDYT?  Could you take care of it?  We can synchronize on IRC.
> 
> Thanks,
> Ludo’.

saluton!

unfortunately I won't be available sunday and monday, so I can only
take care of it on tuesday. Ludo, can you do it instead? For the last
two times I only had to: change the version in config.ac, configure and
"make dist". Then I posted the tarball on my website and the link to
Benno.



Re: ABI and emacs-guix

2019-04-27 Thread Brett Gilio


Ludovic Courtès writes:

> Hi Brett,
>
> Brett Gilio  skribis:
>
>> Was there another ABI change to Guix? The last time this happened
>> emacs-guix began behaving improperly and spitting out unresolvable error
>> messages in the *Messages* buffer. This is happening again, and Ludo
>> fixed it by rebuilding it I think?
>
> Can you share those terrible error messages?
>
> As I write this, Emacs-Guix works awesomely fine for me.  :-)
>
>> If this is the case, is there a consistent way to have emacs-guix be
>> rebuilt after these changes?
>
> I haven’t checked how Emacs-Guix spawns its REPL server, but I think
> that to be safe, it should spawn it via ‘guix repl’, which is
> guaranteed to be using the right APIs and all.
>
> Thanks,
> Ludo’.

After pulling updates today, the issue is fixed on my end.



Last translation round on Monday?

2019-04-27 Thread Ludovic Courtès
Saluton brave translators!

To account for the latest changes to the manual and to the code (notably
 :-)), I think we should do a last
translation round via the Translation Project on Monday.

Julien, WDYT?  Could you take care of it?  We can synchronize on IRC.

Thanks,
Ludo’.



Re: ISO installer image: GPT versus MBR partitions

2019-04-27 Thread Thomas Schmitt
Hi,

Ludovic Courtès wrote:
> I don’t feel like distributing two variants of the ISO per architecture.

Then i guess the most early opportunity for my proposal to get
into production is after the upcomming Guix release.


> It’s also something other distros don’t do: you get only one
> ISO per architecture.

Not really. :))
Debian offers a wide range of sizes from mini.iso (32 MB) to BDDL (50 GB)
and two flavors for x86: Installer and Live (with several desktop flavors).
I have to acknowledge, though, that their boot equipment at most differs by
lagging behind debian-cd evolution.

If it's about what other distros do: They do MBR partition table.


Have a nice day :)

Thomas




Additional system fonts - Feature request/help request

2019-04-27 Thread John Soo
Hi Guix!

I have been looking into a different TTY font both for fancy glyphs and
unicode support.  I also looked into kmscon for keybindings and additional
fonts, too. I like being able to specify a console font as a service. I
can't use Tamzen, for instance, though, since the console font directory is
only pointing to the store location for the kbd package's fonts (I found
that under man setfont).  Similarly, for kmscon, trying to provide an
additional font for the service fails because no system fonts are
configured for the system profile.  I would like to be able to:
 - provide extra user defined fonts as part of the operating system
configuration, or
 - somehow be able to use more fonts than those that come with kbd and
 - Be able to configure additional fonts for kmscon

How would that be done?

Thanks!

John


Re: [PySide] Packaging for guix

2019-04-27 Thread John Soo
Hi Cristián and Ricardo,

A quick update: Shiboken2 builds! Thanks for your guidance!  I may have
more questions when building freecad itself, but this was very helpful.
Thanks again!

- John

On Fri, Apr 19, 2019 at 1:06 PM John Soo  wrote:

> Hi Cristián,
>
> Thank you! I have been following the cmake path and it seems to be working
> better than before. If I find more issues, I will ask.  Thanks again!
>
> - John
>
> On Wed, Apr 10, 2019 at 9:47 AM Cristián Maureira-Fredes <
> cristian.maureira-fre...@qt.io> wrote:
>
>> Hello John,
>>
>> I'm not familiar with guix, but if the CMake approach doesn't work [1]
>> and the setuptools also doesn't work [2],
>> maybe you can share some of the logs related the build errors
>> so we can see how what's precisely the issue.
>>
>> Cheers
>>
>> [1]
>> https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/shiboken2
>> [2] https://wiki.qt.io/Qt_for_Python/GettingStarted/X11
>> 
>> From: PySide  on behalf of John Soo <
>> js...@asu.edu>
>> Sent: Thursday, March 28, 2019 06:21
>> To: pys...@qt-project.org
>> Cc: guix-devel@gnu.org
>> Subject: [PySide] Packaging for guix
>>
>> Hello pyside maintainers,
>>
>> Hope you are all well.  I am looking to package freecad for the guix
>> package manager for which pyside is a dependency. I’m having some trouble
>> packaging pyside as the build and environment for guix (like nix) are quite
>> different from a Debian style system. There a quite a few differences:
>>
>>  -  the prefix for installation directories is in a unique directory
>> specific to the package
>>  - cmake and python require many particular environment variables and
>> flags
>> - library and linking paths are very different and often source shebangs
>> and linking paths need to be patched to point to the correct paths
>>  - the build process happens in an isolated build environment apart from
>> any system directories
>>  - probably more that I haven’t come across yet
>>
>> I’ve tried using the provided python build process but I get several
>> build errors, let alone runtime issues. Would anyone be able to point me in
>> a direction to patch pyside for such a packaging system? Currently I’m
>> stuck building Shiboken. I’d particularly like guidance on how to setup
>> cmake to build it correctly (mostly the ability to provide our particular
>> flags and variables). Any help would be greatly appreciated.
>>
>> Thank you,
>>
>> John
>> ___
>> PySide mailing list
>> pys...@qt-project.org
>> https://lists.qt-project.org/listinfo/pyside
>>
>


Re: [PATCH 1/2] bootstrap: Break automake dependency on generated files. (was Re: Let’s translate!)

2019-04-27 Thread Ludovic Courtès
Hi,

Julien Lepiller  scribes:

> From 77c33ee55115475f582eb49da8dc045432fbdb3b Mon Sep 17 00:00:00 2001
> From: Julien Lepiller 
> Date: Fri, 26 Apr 2019 14:54:52 +0200
> Subject: [PATCH] self: Rebuild translated manuals.
>
> * guix/self.scm (info-manual): Run po4a and related commands to generate
> translated texi files before building translated manuals.
> * guix/build/po.scm: New file.
> * Makefile.am (MODULES): Add it.

I would put po.scm in MODULES_NOT_COMPILED.

> +(define (read-po-file port)
> +  "Read a .po file from PORT and returns an alist of msgid and msgstr."
  ^
“return”

> +(define (translate-texi-manuals source)
> +  "Retrun the translated texinfo manuals built from SOURCE"
 ^   ^
Typos.  :-)

> +  (define (translate-tmp-texi po source tmp-name)
> +(invoke #+(file-append po4a "/bin/po4a-translate")
> +  "-M" "UTF-8" "-L" "UTF-8" "-k" "0" "-f" "texinfo"
> +  "-m" source "-p" po "-l" tmp-name))

I’d remove all the ‘tmp-’ in here since they don’t add anything, and I’d
suggest adding a comment below the ‘define’, like:

  ;; Translate Texinfo file SOURCE using messages from PO, and write the
  ;; result to OUTPUT.

> +  (define (make-ref-regex msgid end)
> +(make-regexp (string-append
> +   "ref\\{" (string-join (string-split msgid #\ ) "[ 
> \n]+")
> +   end)))

The thing in the middle should be wrapped like this:

  (regexp-quote (string-join (string-split …)))

> +  (define (translate-cross-reference content translations)
> +"Take CONTENT, a string representing a .texi file and translate 
> any
> +croos-reference in it (@ref, @xref and @pxref) that have a translation in
 ^^
Typo.

Should be ‘translate-cross-references’ (plural), no?

> +TRANSLATIONS, an alist of msgid and msgstr."
> +   (if (or (equal? msgstr "")
> +   (string-any (lambda (chr)
> + (member chr '(#\{ #\} #\( #\) 
> #\newline #\,)))
> +   msgid))
> + content
> + ;; Otherwise, they might be the name of a section, so we
> + ;; need to translate any occurence in @(p?x?)ref{...}.
> + (let ((regexp1 (make-ref-regex msgid ","))
> +   (regexp2 (make-ref-regex msgid "\\}")))
> +   (regexp-substitute/global
> + #f regexp2
> + (regexp-substitute/global
> +   #f regexp1 content 'pre "ref{" msgstr "," 'post)
> + 'pre "ref{" msgstr "}" 'post))
> +  content translations))

Please align ‘if’ like so:

  (if condition
  then
  else)

You probably need something like this to add (guix build po) to the
result of ‘guix pull’:

diff --git a/guix/self.scm b/guix/self.scm
index 2a10d1d25f..12bc816fa8 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -578,6 +578,7 @@ Info manual."
  ;; us to avoid an extra dependency on guile-gdbm-ffi.
  #:extra-files
  `(("guix/man-db.scm" ,(local-file "../guix/man-db.scm"))
+   ("guix/build/po.scm" ,(local-file "../guix/build/po.scm"))
("guix/store/schema.sql"
 ,(local-file "../guix/store/schema.sql")))
 

Otherwise LGTM!  Please make sure that ‘make as-derivation’ works as
intended (builds the translations, installs (guix build po)) if you
haven’t done it already.

Thanks!

Ludo’.


Re: "GNU with" or "Guix System with"?

2019-04-27 Thread Ludovic Courtès
Hello,

tumashu  skribis:

>  (string-append "GNU with "
> (string-titlecase (package-name kernel)) " "
> (package-version kernel)))

We could discuss this for months, but both are correct.

It’s now possible to customize the label with the new ‘label’ field of
: choose what you prefer!  :-)

Ludo’.



Re: ISO installer image: GPT versus MBR partitions

2019-04-27 Thread Ludovic Courtès
Hi Thomas,

"Thomas Schmitt"  skribis:

> I asked Danny, whether the download servers could offer two partition
> table variations of the ISOs: GPT and MBR (both with APM/HFS+).
> Goal would be to gain experience with MBR and to finally replace GPT
> by that layout.
> He expressed the hope that other members of Guix could answer this.

I don’t feel like distributing two variants of the ISO per architecture.
In addition to the fact that it would take up more space on the GNU
servers, I suspect few users would know which one to choose (I
wouldn’t.)  It’s also something other distros don’t do: you get only one
ISO per architecture.

Thanks,
Ludo’.



Re: New VM image

2019-04-27 Thread Ludovic Courtès
Ludovic Courtès  skribis:

> Chris Marusich  skribis:

[...]

>>> (define this-file
>>>   (local-file "./vm-live.tmpl" "config.scm"))
>>
>> Cute!  But FYI, I tried building this and it failed at first, since I
>> renamed the file and forgot about this reference.  I then re-ran the
>> command from the same directory as the file, which of course worked.
>
> Yeah, we could maybe extract the actual file name from
> (current-source-location).

Done in 1ac6c33caec2c2a4aaadda49cb0febb5bfbf264c.

>> When I booted into the system, I noticed some things:
>>
>> - There are many folders on the desktop.  For example, there is one for
>>   "/sys/fs/cgroup/memory".  A minor blemish, but rather odd.
>
> Yeah, that’s a longstanding issue with GLib/GIO: that library has code
> to find out which mount points are “system” mount points (things that
> should not be shown in the UI), but for some reason, it doesn’t work
> correctly for us:
>
>   https://lists.gnu.org/archive/html/help-guix/2017-11/msg00087.html

Fixed in 74685a4369033e79a776c5dec1c8480e8b446f6b.  The solution turned
out to be disappointingly trivial and is another example of this Unix
baggage we’re still carrying…

>> - "sudo herd status" reports that term-auto and user-homes is stopped,
>>   which I think might be intended, but I'm not sure.  I also see
>>   possibly unnecessary services: wpa-supplicant, upower-daemon.  The VM
>>   probably doesn't need wpa-supplicant, but maybe it needs
>>   upower-daemon?  Not sure.
>
> True, the VM currently uses NM + wpa_supplicant, which we could
> certainly replace with the DHCP client.

Done 

>>   I then ran "guix pull"
>>   and tried again with "sudo -E guix system reconfigure
>>   /etc/config.scm", since I remembered that the proper way to do this
>>   using my freshly pulled Guix would be to use -E.  I got a new error:
>>   "error: device '/dev/vda' not found: No such file or directory", which
>>   occurred because the VM has /dev/sda but not /dev/vda.  Maybe we can
>>   modify the config file to use sda instead?
>
> It all depends on how you start QEMU: the device would be /dev/vda if
> you use virtio, and /dev/hda otherwise.  In the manual, we should
> probably give the incantation that leads it to use virtio:
>
>   -device virtio-blk,drive=myhd -drive if=none,file=/tmp/t.img,id=myhd

I’ve done that in 05b60752a67af294c35d8f4218487c9a44b5fdee.

I’ve also fixed sudo along the lines of what Danny suggested in commit
6e0521eeede6bd06bc083073145413a04771aad3.

I think it’s pretty decent now, or at least there are fewer rough edges!
:-)

Ludo’.



Re: [PATCH 1/2] bootstrap: Break automake dependency on generated files. (was Re: Let’s translate!)

2019-04-27 Thread Julien Lepiller
Le Sat, 27 Apr 2019 00:10:04 +0200,
Ludovic Courtès  a écrit :

> Hi Julien!
> 
> 
> Could you send an updated patch?
> 
> Thank you!
> 
> Ludo.

Attached is an updated patch.
From 77c33ee55115475f582eb49da8dc045432fbdb3b Mon Sep 17 00:00:00 2001
From: Julien Lepiller 
Date: Fri, 26 Apr 2019 14:54:52 +0200
Subject: [PATCH] self: Rebuild translated manuals.

* guix/self.scm (info-manual): Run po4a and related commands to generate
translated texi files before building translated manuals.
* guix/build/po.scm: New file.
* Makefile.am (MODULES): Add it.
---
 Makefile.am   |   1 +
 guix/build/po.scm |  69 +
 guix/self.scm | 128 +-
 3 files changed, 197 insertions(+), 1 deletion(-)
 create mode 100644 guix/build/po.scm

diff --git a/Makefile.am b/Makefile.am
index 99d6ed64b6..272330c3a9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,6 +156,7 @@ MODULES =	\
   guix/build/meson-build-system.scm		\
   guix/build/minify-build-system.scm		\
   guix/build/font-build-system.scm		\
+  guix/build/po.scm\
   guix/build/go-build-system.scm		\
   guix/build/asdf-build-system.scm		\
   guix/build/git.scm\
diff --git a/guix/build/po.scm b/guix/build/po.scm
new file mode 100644
index 00..3fbe9b2373
--- /dev/null
+++ b/guix/build/po.scm
@@ -0,0 +1,69 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Julien Lepiller 
+;;;
+;;; 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 (guix build po)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 peg)
+  #:use-module (ice-9 regex)
+  #:use-module (ice-9 textual-ports)
+  #:export (read-po-file))
+
+;; A small parser for po files
+(define-peg-pattern po-file body (* (or comment entry whitespace)))
+(define-peg-pattern whitespace body (or " " "\t" "\n"))
+(define-peg-pattern comment-chr body (range #\space #\頋))
+(define-peg-pattern comment none (and "#" (* comment-chr) "\n"))
+(define-peg-pattern entry all
+  (and (ignore (* whitespace)) (ignore "msgid ") msgid
+   (ignore (* whitespace)) (ignore "msgstr ") msgstr))
+(define-peg-pattern escape body (or "" "\\\"" "\\n"))
+(define-peg-pattern str-chr body (or " " "!" (and (ignore "\\") "\"")
+ "\\n" (and (ignore "\\") "\\")
+ (range #\# #\頋)))
+(define-peg-pattern msgid all content)
+(define-peg-pattern msgstr all content)
+(define-peg-pattern content body
+  (and (ignore "\"") (* str-chr) (ignore "\"")
+   (? (and (ignore (* whitespace)) content
+
+(define (parse-tree->assoc parse-tree)
+  "Converts a po PARSE-TREE to an association list."
+  (define regex (make-regexp "n"))
+  (match parse-tree
+('() '())
+((entry parse-tree ...)
+ (match entry
+   ((? string? entry)
+(parse-tree->assoc parse-tree))
+   ;; empty msgid
+   (('entry ('msgid ('msgstr msgstr)))
+(parse-tree->assoc parse-tree))
+   ;; empty msgstr
+   (('entry ('msgid msgid) 'msgstr)
+(parse-tree->assoc parse-tree))
+   (('entry ('msgid msgid) ('msgstr msgstr))
+(acons (regexp-substitute/global #f regex msgid 'pre "\n" 'post)
+   (regexp-substitute/global #f regex msgstr 'pre "\n" 'post)
+   (parse-tree->assoc parse-tree)))
+
+(define (read-po-file port)
+  "Read a .po file from PORT and returns an alist of msgid and msgstr."
+  (let ((tree (peg:tree (match-pattern
+  po-file
+  (get-string-all port)
+(parse-tree->assoc tree)))
diff --git a/guix/self.scm b/guix/self.scm
index 2a10d1d25f..3c60da6308 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -60,6 +60,8 @@
   ("gzip"   (ref '(gnu packages compression) 'gzip))
   ("bzip2"  (ref '(gnu packages compression) 'bzip2))
   ("xz" (ref '(gnu packages compression) 'xz))
+  ("po4a"   (ref '(gnu packages gettext) 'po4a))
+  ("gettext"   (ref '(gnu packages gettext) 'gettext-minimal))
   (_#f;no such package
 
 
@@ -253,8 +255,130 @@ DOMAIN, a gettext domain."
   (computed-file (string-append "guix-locale-" domain)
  build))
 
+(define (translate-texi-manuals source)
+  "Retrun the translated texinfo 

Re: User shell: state or config?

2019-04-27 Thread Ludovic Courtès
Hi,

Tanguy Le Carrour  skribis:

> I don't yet understand the consequences of this choice, so I don't have an
> opinion on this. For instance, I don't yet understand why, on my system, two
> shells installed "system wide" with `guix system reconfigure`
> (namely bash and fish) don't have the same "type" of path [1]?
> I was expecting fish to be in the `/run/current-system/profile/bin/`
> folder. And what about the second bash?!
>
> [1]: from `/etc/shells`
>  /run/current-system/profile/bin/bash
>  /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
>  /gnu/store/9r5z8k0p0ilmg8qfyc82x11ybacawfqa-fish-3.0.2/bin/fish

/etc/shells is one of these good ol’ Unix hacks, like /etc/fstab, that
don’t make much sense on Guix, but that we provide to please a number of
programs that rely on it (in this case: xterm and polkit, notably, and
chsh.)

You can find in (gnu system shadow) the code that creates this file.
The first three lines are added systematically, while the others are
derived from user accounts.

HTH,
Ludo’.



Re: User shell: state or config?

2019-04-27 Thread Ludovic Courtès
Hello,

Chris Marusich  skribis:

> Tobias Geerinckx-Rice  writes:
>
>>> All in all, I’m in favor of switching back to the previous behavior:
>>> considering user shells as system config.  That’s a one-line change
>>> in
>>> (gnu build accounts).
>>
>> +1!
>
> +1 from me as well.

Done in 504a0fc636ec591e65b4a229a37e522e425d8a0c.

> Allowing the shell to be declaratively defined in the system config,
> but also allowing a user to override it permanently at runtime via
> chsh, seems like a nice middle ground between treating it as "config"
> vs. "state".

In this particular case there’s no middle ground though: either you
consider state and then you have the problems I listed, or you consider
it config.  I did think there was a middle ground, until I realized the
implications.

Thanks everyone for your feedback!

Ludo’.



New Chinese (simplified) PO file for 'guix-manual' (version 1.0.0-pre2)

2019-04-27 Thread Translation Project Robot
Hello, gentle maintainer.

This is a message from the Translation Project robot.

A revised PO file for textual domain 'guix-manual' has been submitted
by the Chinese (simplified) team of translators.  The file is available at:

https://translationproject.org/latest/guix-manual/zh_CN.po

(We can arrange things so that in the future such files are automatically
e-mailed to you when they arrive.  Ask at the address below if you want this.)

All other PO files for your package are available in:

https://translationproject.org/latest/guix-manual/

Please consider including all of these in your next release, whether
official or a pretest.

Whenever you have a new distribution with a new version number ready,
containing a newer POT file, please send the URL of that distribution
tarball to the address below.  The tarball may be just a pretest or a
snapshot, it does not even have to compile.  It is just used by the
translators when they need some extra translation context.

The following HTML page has been updated:

https://translationproject.org/domain/guix-manual.html

If any question arises, please contact the translation coordinator.

Thank you for all your work,

The Translation Project robot, in the
name of your translation coordinator.





Starting SLiM on multiple ttys

2019-04-27 Thread Diego Nicola Barbato
Hello Guix,

I would like to propose an enhancement to our SLiM service which would
allow it to be started on multiple ttys (much like our mingetty
service).  I believe this would be useful for users who do not want to
use GDM but still want to be able to run multiple graphical sessions at
the same time.

For this to work we would have to patch our SLiM package along the lines
of this [0] since the Xorg display is currently hard coded (although we
probably do not need the command line option).

I have attached a crude proof of concept which can be tested by running
something along the lines of:
--8<---cut here---start->8---
qemu-system-x86_64 -snapshot -enable-kvm -m 4G $(guix system vm-image 
config.scm)
--8<---cut here---end--->8---


Regards,

Diego

[0]: http://www.beroal.in.ua/prg/linux/slim-conf-arg.patch



proof_of_concept.tar.gz
Description: Binary data


Re: User shell: state or config?

2019-04-27 Thread Meiyo Peng
Hi Ludovic,

Ludovic Courtès writes:

> All in all, I’m in favor of switching back to the previous behavior:
> considering user shells as system config.  That’s a one-line change in
> (gnu build accounts).
>
> Thoughts?

I support this change.  You have listed very good reasons.

Last month, I installed Guix system on my computer with a minimal Guix
config and then reconfigure the system with a more complete Guix config.
I was surprised that my login shell is still bash while the user's shell
slot in Guix config has been changed to fish.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Help with OpenVPN Plugin for Network Manager

2019-04-27 Thread Christopher Baines

Raghav Gururajan  writes:

> Hello Guix!
>
> The "Services" part of my current system config is the following:
>
> (services (cons* (service gnome-desktop-service-type)
>  %desktop-services))
>
> How should I modify the above to edit Network Manager's Configuration to 
> include and enable "network-manager-openvpn" plugin?
>
> I tried adding "(service network-manager-service-type 
> (network-manager-configuration (vpn-plugins network-manager-openvpn)))" but I 
> got an error that the service is used more than once.

%desktop-services includes a service of the network-manager-service-type
already, which is why you're getting that error.

Instead of adding another service of that type with the intended
configuration, what you can do is change the existing service.

Something like the following should help.

  (modify-services %desktop-services
(network-manager-service-type
 config => (network-manager-configuration
(inherit config)
(vpn-plugins
 (list network-manager-openvpn)

This would replace %desktop-services in your configuration, as what the
modify-services function does, is that %desktop-services (in this case),
and apply the modifications that are described.

So the services part of your configuration would look like:

  (services (cons* (service gnome-desktop-service-type)
   (modify-services %desktop-services
   (network-manager-service-type
config => (network-manager-configuration
   (inherit config)
   (vpn-plugins
(list network-manager-openvpn)))

Chris


signature.asc
Description: PGP signature


New Chinese (simplified) PO file for 'guix-manual' (version 1.0.0-pre2)

2019-04-27 Thread Translation Project Robot
Hello, gentle maintainer.

This is a message from the Translation Project robot.

A revised PO file for textual domain 'guix-manual' has been submitted
by the Chinese (simplified) team of translators.  The file is available at:

https://translationproject.org/latest/guix-manual/zh_CN.po

(We can arrange things so that in the future such files are automatically
e-mailed to you when they arrive.  Ask at the address below if you want this.)

All other PO files for your package are available in:

https://translationproject.org/latest/guix-manual/

Please consider including all of these in your next release, whether
official or a pretest.

Whenever you have a new distribution with a new version number ready,
containing a newer POT file, please send the URL of that distribution
tarball to the address below.  The tarball may be just a pretest or a
snapshot, it does not even have to compile.  It is just used by the
translators when they need some extra translation context.

The following HTML page has been updated:

https://translationproject.org/domain/guix-manual.html

If any question arises, please contact the translation coordinator.

Thank you for all your work,

The Translation Project robot, in the
name of your translation coordinator.





Re: Quicklisp importer bug in tarball->extract->parse

2019-04-27 Thread Pierre Neidhardt
swedebugia  writes:

> Hi
>
> Thanks a lot for taking the time to look at this.
>
> On 2019-04-11 16:31, Pierre Neidhardt wrote:
>> Hi!
>> 
>> I've had time to look at it a little.
>> 
>> If you want to debug, you can, for instance, put a breakpoint in
>> guess-requirements-from-source, 
>
> How exactly do you do this?

See

--8<---cut here---start->8---
,help debug
--8<---cut here---end--->8---

from the Guile REPL.
In particular

--8<---cut here---start->8---
,break PROCEDURE
--8<---cut here---end--->8---

should do what you want.

>  (memoize
> ...

`memoize' takes a procedure as argument, not an arbitrary expression.
For instance in the following

--8<---cut here---start->8---
(let ((mfoo (memoize foo)))
  (mfoo 17)
  (mfoo 17))
--8<---cut here---end--->8---

`foo' will be called only once.

You don't have to use `memoize' though, you can also store the value you
want in a local variable and check if it's set or not.  We can always
refine the code later.

>> It seems that you are on the right track, great job!
>
> Thanks for the encouragement!

And thanks for giving this a shot! :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature


Re: Quicklisp importer bug in tarball->extract->parse

2019-04-27 Thread swedebugia
Hi

Thanks a lot for taking the time to look at this.

On 2019-04-11 16:31, Pierre Neidhardt wrote:
> Hi!
> 
> I've had time to look at it a little.
> 
> If you want to debug, you can, for instance, put a breakpoint in
> guess-requirements-from-source, 

How exactly do you do this?
I looked in the guile manual and found the module (system vm trap-state)
and tried calling add-trap-at-procedure-call! like this:

(add-trap-at-procedure-call!

  (system* "tar" "xf" tarball "-C" dir "--wildcards" (string-append "*"
file-name)

But it failed with:
;;; (file-name "1am.asd")

Backtrace:

  13 (apply-smob/1 #)

In ice-9/boot-9.scm:

705:2 12 (call-with-prompt _ _ #)
In ice-9/eval.scm:

619:8 11 (_ #(#(#)))

In ice-9/boot-9.scm:

   2312:4 10 (save-module-excursion _)

  3831:12  9 (_)

In guix/import/quicklisp.scm:

404:3  8 (_)

In guix/utils.scm:

618:8  7 (call-with-temporary-output-file _)

632:8  6 (call-with-temporary-directory _)

In guix/import/quicklisp.scm:

   374:32  5 (_ "/tmp/guix-directory.Z4chBm")

In srfi/srfi-1.scm:

   592:17  4 (map1 ("1am.asd"))

In guix/import/quicklisp.scm:

   380:41  3 (_ _)

In system/vm/trap-state.scm:

   213:15  2 (add-trap-at-procedure-call! 0 _)

In system/vm/traps.scm:

   137:45  1 (trap-at-procedure-call 0 # #:our-frame? _)

In unknown file:

   0 (scm-error misc-error #f "~A ~S" ("Not a VM program" 0) #f)



ERROR: In procedure scm-error:

Not a VM program 0


> There is nothing wrong with find-files: the "dir" directory is empty.
> This is because the extraction failed: 
> check the exit-code of system* before proceeding, you'll see what
> happens ;)
> 
> --8<---cut here---start->8---
> (system* "tar" "xf" tarball "-C" dir file-name)
> --8<---cut here---end--->8---
> 
> The above will error out if "file-name" is not found.  For 1am:
> 
> Queried file-name:
> 
>   "1am.asd"
> 
> Tarball actual file:
> 
>   "1am-20141106-git/1am.asd"
> 
> I don't think we can predict the root folder, and more generally
> projects have different trees.
> So I suggest we extract the whole tarball and proceed from there.  So
> your code should work by just removing "file-name":
> 
> --8<---cut here---start->8---
> (system* "tar" "xf" tarball "-C" dir)
> --8<---cut here---end--->8---
> 
> Makes sense?

Yes. I implemented Ricardos wildcard-suggestion:

(system* "tar" "xf" tarball "-C" dir "--wildcards" (string-append "*"
file-name))

> 
> Unrelated comment: If I'm not mistaken, you are fetching the meta-file
> and the index-file on every query.  I suggest you keep those in memories
> as soon as possible (memoize them), this will allow you to iterate much
> faster when developing.

I already tried by adding:


 (memoize

  (let* ( ;;(name "circular-streams")

 (name "1am")

 (source-url (ql-extract 'url name))

 (asd (ql-extract 'system-files name)))

(peek 'asd asd)

(call-with-temporary-output-file

 (lambda (temp port)

   (begin (url-fetch source-url temp)

  (guess-requirements-from-source source-url asd temp)

  )

and

(let* ( ;;(name "circular-streams")

   (name "1am")

   (source-url (memoize (ql-extract 'url name)))

   (asd (memoize (ql-extract 'system-files name

  (peek 'asd asd)

  (call-with-temporary-output-file

   (lambda (temp port)

 (begin (url-fetch source-url temp)

(guess-requirements-from-source source-url asd temp)



But it still fetches the index-file 2 times regardless where I put it.
Any ideas?

> It seems that you are on the right track, great job!

Thanks for the encouragement!

-- 
Cheers Swedebugia



signature.asc
Description: OpenPGP digital signature