Re: Packaging Coq

2014-12-04 Thread Mark H Weaver
Nikita Karetnikov  writes:
> Does anyone know how to proceed?

It would help if you told us something about the problem you ran into,
preferably with relevant excerpts of the failed build output.

I'm also interested in Coq, and attempted to package it about 6 weeks
ago.  I started by trying to update to ocaml 4.02.x, but there were many
test suite failures that looked non-trivial to debug.  I stalled there.

If I were to proceed without the ocaml update, I would start by
packaging "camlp5", which is listed as a build dependency in the Coq
build documentation (INSTALL in the top-level source directory).

It looks like we don't yet have camlp5, and that you didn't attempt to
package it.  Maybe that's the problem?

 Regards,
   Mark



Re: use zsh as login shell

2014-12-04 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> +  (mlet %store-monad ((bash-profile (text-file "bash_profile" "\
>> +# honor ~/.bashrc if the shell is interactive
>> +[[ $- == *i* ]] && source ~/.bashrc
>
> I don’t think the test is needed, because ~/.bash_profile is only read
> by interactive Bash.

Indeed.  However, it would be good to check if ~/.bashrc exists.
Section 6.2 of the Bash manual suggests this:

  if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

>> +# load system-wide environment varibales
>> +source /etc/environment
>> +
>> +# common varibales for user profile
>> +export PATH=$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:$PATH
>> +export INFOPATH=$HOME/.guix-profile/share/info:$INFOPATH\n"))
>> +  (bashrc (text-file "bashrc" "\
>> +PS1='\\u@\\h \\w\\$ '
>
> I think PS1 should go to /etc/profile.  WDYT?

I agree with 宋文武 that the PS1 setting belongs in the default
~/.bashrc skeleton.  I would prefer to keep settings like this, that are
purely a matter of personal taste, out of system-wide files.  Also,
/etc/profile is read by other shells, and I don't know that the syntax
above is portable.

Regards,
  Mark



[PATCH] guix: scripts: Fix GUIX_BUILD_OPTIONS handling.

2014-12-04 Thread Deck Pickard
Perhaps, now it WILL twerk.

Drp,
-- 
(or ((,\ (x) `(,x x)) '(,\ (x) `(,x x))) (smth (that 'like)))


0001-guix-scripts-Fix-GUIX_BUILD_OPTIONS-handling.patch
Description: Binary data


Re: Packaging Coq

2014-12-04 Thread Mark H Weaver
Andreas Enge  writes:

> On Thu, Dec 04, 2014 at 05:02:27AM +0400, Nikita Karetnikov wrote:
>>   (alist-replace 'build
>>  (lambda _
>>(system* "make" "world"))
>
> Instead of this, you could use
>   #:make-flags '("world")

IMO, this is a misuse of #:make-flags.  'world' is not a make flag, it
is a make *target*.  The make flags are also passed to 'make' during the
default 'check' and 'install' phases.

  Mark



Re: use zsh as login shell

2014-12-04 Thread Ludovic Courtès
宋文武  skribis:

> Ludovic Courtès  writes:
>
>> 宋文武  skribis:

[...]

   3. The skeleton for ~/.bash_profile sources /etc/profile, /etc/bashrc,
  and ~/.bashrc.

   4. The definition of PS1 is moved from /etc/profile to /etc/bashrc.

   5. The skeleton for ~/.bashrc sources /etc/bashrc.
>>> It seem too much, what I suggested is:
>>> for login, su (pam_env): /etc/environment
>>> for login shell: ~/.bash_profile, ~/.zlogin
>>> for interactive: ~/.bashrc, ~/.zshrc
>>> skeletons only installed when needed :)
>>
>> As a first step, what about always installing the skeletons?  Then we
>> can see whether/how to refine that.

[...]

> From 1e400957b29a47f63548df39b36a7c0f1d8a37d9 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
> Date: Tue, 2 Dec 2014 21:40:52 +0800
> Subject: [PATCH] gnu: Add /etc/environment.
>
> * gnu/system.scm (default-/etc/environment): New procedure.
>   (etc-directory)[profile]: Remove it.
>   (etc-directory)[environment]: Add it.
> * gnu/system/linux.scm (unix-pam-service): Add #:readenv? parameter.
> * gnu/services/base.scm (mingetty-service): Pass #t as #:readenv?
>   to unix-pam-service.
> * gnu/system/shadow.scm (default-skeletons): Add .bash_profile. Adjust 
> .bashrc.

So you ended up choosing pam_env?  I thought we had concluded that it
wasn’t needed, no?  If it can be avoided, it’s better to do so, IMO.

> +  (mlet %store-monad ((bash-profile (text-file "bash_profile" "\
> +# honor ~/.bashrc if the shell is interactive
> +[[ $- == *i* ]] && source ~/.bashrc

I don’t think the test is needed, because ~/.bash_profile is only read
by interactive Bash.

> +# load system-wide environment varibales
> +source /etc/environment
> +
> +# common varibales for user profile
> +export PATH=$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:$PATH
> +export INFOPATH=$HOME/.guix-profile/share/info:$INFOPATH\n"))
> +  (bashrc (text-file "bashrc" "\
> +PS1='\\u@\\h \\w\\$ '

I think PS1 should go to /etc/profile.  WDYT?

Thanks!

Ludo’.



Re: none

2014-12-04 Thread Ludovic Courtès
Tomas Cech  skribis:

> I tried to install Guix as alternative OS to my Gentoo and openSUSE
> installations to give a try. I tried unsupported scenario -
> installation on LVM volume and separate /boot partition until I was
> told it is unsupported. Separate boot wasn't hard as I had to just
> copy generated files so they are loaded.

OK, but there’s still an open bug on that topic.  :-)
http://bugs.gnu.org/19220

> 1] if you set device to partition (and not to disk) in your 
> grub-configuration like this:
>
>  (bootloader (grub-configuration
>(device "/dev/sda4")))

Why would you want to use a partition and not a disk?  I didn’t know
this was even possible.

> `guix system init' will fail on grub installation. By default Grub
> tries to fit in the beginning of partition and fails if it can't fit
> in. I asked about this behaviour on Grub mailing list and it seems
> that there are two options:
>
>   a] add `--force' to command line and use block list for keeping information 
> about position of Grub's core.img
>   b] use filesystem which allows embedding - BtrFS or ZFS
>
> I verified both options (a] and then b] with BtrFS) and it no longer fails.
>
> But,
> ad a] - I don't feel safe passing `--force' to grub-install every
> time. So if installation fails on this point and you'd like to use
> your FS anyway, you can pass `--no-grub' to `guix system init' and
> then rung grub-install manually.
>
> ad b] - I don't feel safe using still experimental BtrFS.

OK.  I think the conclusion for Guix is to leave the defaults unchanged.
Perhaps we could add a ‘force?’ field to the ‘grub-configuration’ data
type to allow those who know what they doing to get the effect of
‘--force’.  WDYT?

> 2] current Grub version in Guix during boots generated this error:
>
> error: symbol 'grub_term_highlight_color' not found
>
> and started rescue shell.
> It seems to be a bit mystic bug:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1289977

Strange.  I haven’t experienced it.  Sounds like a .mod wasn’t found or
something like that?  That could be a bug related to separate /boot.

> I'm also interested in running chroot in Guix. This is something I
> like about all Linux distribution I use - I can run Linux and at the
> same time I prepare another Linux root filesystem for use. It seems
> that chrooting into Guix may be tricky.
>
> I prepared this script to be placed somewhere into Guix:
>
> --%<-
> #!/run/current-system/profile/bin/bash
>
> export LIBRARY_PATH=LIBRARY_PATH=/root/.guix-profile/lib
> export CPATH=/root/.guix-profile/include
> export 
> PATH=/run/setuid-programs:/run/current-system/profile/sbin:/root/.guix-profile/bin:/run/current-system/profile/bin
> export 
> INFOPATH=/root/.guix-profile/share/info:/run/current-system/profile/share/info
>
> exec bash -i
> --%<
>
> for i in dev proc sys; do mount -R /$i /guix_mountpoint/$i; done
> chroot /guix_mountpoint/ /helper_script.sh

I suppose this works, right?

> Ludovic said that `guix packages --search-paths' should generate similar path 
> configuration so it may be the right way, but it didn't work for me.

I realize ‘guix package --search-paths’ wouldn’t suffice here.  You may
want to source /etc/profile from within the chroot.

> And last thing I wanted to mention, you have kind community around Guix and 
> Guile. It's really motivating!

Thanks for your feedback and for the kind words!

Ludo’.



[PATCH] services: lsh: Add "graceful" handling of daemonic option.

2014-12-04 Thread Deck Pickard
#~(#$@ looks freaky, but if this is what it takes... Tried couple of other
"figures", this one appears to generate right dmd.conf, though I haven't
had yet a chance to reboot.

Drp,
-- 
(or ((,\ (x) `(,x x)) '(,\ (x) `(,x x))) (smth (that 'like)))


0001-services-lsh-Add-graceful-handling-of-daemonic-optio.patch
Description: Binary data


Re: [PATCH] gnu: Add scipy.

2014-12-04 Thread Ludovic Courtès
Federico Beffa  skribis:

> From 65ec148d0e3986ef377d2a205a2ded04d884ba3a Mon Sep 17 00:00:00 2001
> From: Federico Beffa 
> Date: Wed, 3 Dec 2014 21:15:55 +0100
> Subject: [PATCH] gnu: Add scipy.
>
> * gnu/packages/python.scm (python-scipy, python2-scipy): New variables.

LGTM, please push.

Thank you!

Ludo’.



Re: Xorg video inside VirtualBox

2014-12-04 Thread Ludovic Courtès
Hi, Paul!

Paul van der Walt  skribis:

> This compiles fine, using `guix system reconfigure /etc/myconfig.scm`,
> but when i reboot the VM, X seems to start alright, but with a garbled
> screen. 
>
> I suspect that this is because it is loading the vesa driver and not
> the vboxvideo driver (according to /var/log/X.org.log it tries to load
> vboxvideo then falls back to vesa after failing -- it just says
> "Warning, couldn't load module vboxvideo").

Still, VirtualBox should be able to emulate that, no?

> My question is therefore: has anyone else managed to get X working
> inside a VirtualBox VM?

I’ve only tried QEMU.  See for instance

for hints on how to use it.

More importantly, I recently learned that VirtualBox now requires
non-free software to build, so that’s another reason to prefer QEMU.

Thanks for testing!

Ludo’.



Re: Packaging Coq

2014-12-04 Thread Ludovic Courtès
Andreas Enge  skribis:

> On Thu, Dec 04, 2014 at 05:02:27AM +0400, Nikita Karetnikov wrote:
>>;; 'configure' does not recognize the flags if you
>>;; use 'system*'.
>>(system (string-append "./configure"
>>   " -prefix " out
>>   " -camldir "
>>   (dirname (which 
>> "ocaml")))
>
> This is very strange, how is it at all possible that system* does not work?

I’m guess that the problem instead was that the default ‘configure’
phase passes arguments not recognized by this hand-written ‘configure’
script.

However, please use ‘system*’ instead of ‘system’.

Thanks,
Ludo’.



Xorg video inside VirtualBox

2014-12-04 Thread Paul van der Walt

Hello all,

I hope i won't commit any grave errors of etiquette, since this is my 
first post here.


I've been experimenting with installing Guix inside a VirtualBox virtual 
machine, and it's pretty cool. I'm even managing to figure out how to 
install packages ;)


My problem is thus: i've installed slim by adding the following to my 
system config: (i also do the necessary import at the top)


 (services (cons* (slim-service)
  %base-services))

This compiles fine, using `guix system reconfigure /etc/myconfig.scm`, 
but when i reboot the VM, X seems to start alright, but with a garbled 
screen. 


I suspect that this is because it is loading the vesa driver and not the 
vboxvideo driver (according to /var/log/X.org.log it tries to load 
vboxvideo then falls back to vesa after failing -- it just says 
"Warning, couldn't load module vboxvideo").


My question is therefore: has anyone else managed to get X working 
inside a VirtualBox VM? If so, how? And, (assume i'm a total noob here) 
where can i find the vboxvideo driver: in a package, or should i  
compile it from source? I am willing to try and package it as a 
practise-case for myself if it's not already in the Guix repos, but i 
have no idea where to begin.


Thank you for your time and effort! And my apologies if i should 
rtfm/gtfo/be beaten by a clue-stick!

p.



Re: Packaging Coq

2014-12-04 Thread Nikita Karetnikov
I haven’t done the obvious thing…  The package in Nixpkgs does more
things, so I’ll try to change my recipe accordingly.


pgp4000r6YKBh.pgp
Description: PGP signature


Re: [PATCH] gnu: Add dmenu

2014-12-04 Thread 宋文武
Ludovic Courtès  writes:

> 宋文武  skribis:
>
>> From b07a51a5a98cc61409716d80ab67fe9783ebf27b Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
>> Date: Wed, 3 Dec 2014 20:37:33 +0800
>> Subject: [PATCH] gnu: Add dmenu.
>>
>> * gnu/packages/dwm.scm (dmenu): New variable.
>
> LGTM, please push!
Pushed, thanks for review.
>
> Ludo’.



Re: Packaging Coq

2014-12-04 Thread Nikita Karetnikov
Since people are commenting only on the recipe, I guess I need to
clarify that I’d like to know why it fails to build.


pgpVm4hxBpXvG.pgp
Description: PGP signature


Re: Packaging Coq

2014-12-04 Thread Nikita Karetnikov
> Should these arguments not be a double -- ??

No.


pgpIWWS3Y1b3c.pgp
Description: PGP signature


Re: Packaging Coq

2014-12-04 Thread John Darrington
On Thu, Dec 04, 2014 at 05:02:27AM +0400, Nikita Karetnikov wrote:
(system (string-append "./configure"
   " -prefix " out
   " -camldir "
 ^
Should these arguments not be a double -- ??


-- 
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: Packaging Coq

2014-12-04 Thread Andreas Enge
On Thu, Dec 04, 2014 at 05:02:27AM +0400, Nikita Karetnikov wrote:
>;; 'configure' does not recognize the flags if you
>;; use 'system*'.
>(system (string-append "./configure"
>   " -prefix " out
>   " -camldir "
>   (dirname (which 
> "ocaml")))

This is very strange, how is it at all possible that system* does not work?

>   (alist-replace 'build
>  (lambda _
>(system* "make" "world"))

Instead of this, you could use
  #:make-flags '("world")

Andreas