Re: Who has had success installing a Guix system on arm?

2020-11-04 Thread Jan Nieuwenhuizen
Jesse Gibbons writes:

Hi!

> Has anyone in this mailing list successfully used the Guix
> system on an armhf or aarch64 computer?

I installed Guix System on the pinebook-pro a while ago

httpss://joyofsource.com/guix-system-on-the-pinebook-pro.html

Recently, proper
pinebook-pro support has been merged with guix master, so it should
be easier now.

Sadly, the pinebook-pro died on me just a couple of days after writing
the blog post, and I haven't updated it since.

Greetings,
Jannee

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



Re: How to run Guix with Hurd

2020-07-12 Thread Jan Nieuwenhuizen
Jan Nieuwenhuizen writes:

> It may just yet.  Make sure your /dev/sda1 smaller than 128GiB.

Eh...the Hurd must not see any parts of a disk beyond 128GiB.  So if
hd0s1 starts at 0, it must is not bigger than 128GiB.  A GNU/Linux
partition can live beyond that.

I had a 20GiB hd0s2 partition start at 140GiB; that does not work.

Janneke

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



Re: How to run Guix with Hurd

2020-07-12 Thread Jan Nieuwenhuizen
pelzflorian (Florian Pelz) writes:

Hello!

> On Sun, Jul 12, 2020 at 01:05:28AM +0200, Jan Wielkiewicz wrote:
>> Hurd lacks SMP (Simultaneous MultiProcessing), is 32-bit only and it
>> doesn't support modern hardware yet.
>
> I too wanted to try Hurd on real hardware.  I see Jan Nieuwenhuizen
> does much work on it.

And others, sometimes somewhat more behind the scenes.

> After Jan Nieuwenhuizen’s patches from the beginning of July, I did
> partition /dev/sda as dos, not gpt, and created a partition via
> mkfs.ext2 on it (with inode size 128, but I think it does not matter).

Ooh, sweet!

> But Hurd does not support SATA disks (I think), so booting gets stuck
> when it starts an ext2fs translator.

It may just yet.  Make sure your /dev/sda1 smaller than 128GiB.

Booting GNU/Linux on the X86 shows /dev/sda (in fact I have Guix on
/dev/sda2 and used guix system reconfigure together with rsync'ing the
store) but the Hurd just sees hd0s1.  It took me quite some time and
help to find this faq entry

https://www.gnu.org/software/hurd/faq/2_gib_partition_limit.html

(I didn't read it because I knew the 2GiB limit was no longer an issue).

I did something simalar on a Thinkpad X60 and managed to boot, but I'm
now stuck getting networking up.  We have netdde but I cannot get that
to work yet; it fails with

--8<---cut here---start->8---
netdde: vm_allocate_contiguous : (ipc/mig) bad request message ID
--8<---cut here---end--->8---

Sadly, after applying

--8<---cut here---start->8---
https://salsa.debian.org/hurd-team/gnumach/-/blob/master/debian/patches/70_dde.patch
--8<---cut here---end--->8---

the Hurd does fails to build for me with a link error

--8<---cut here---start->8---
i586-pc-gnu-gcc ... -o boot => boot/deviceServer.c:1227: undefined reference to 
`ds_device_intr_enable'
--8<---cut here---end--->8---

Apparently, our glibc build is off

--8<---cut here---start->8---
2020-07-07.log:[21:25:53]  janneke: you need to build glibc against the 
patched gnumach headers
--8<---cut here---end--->8---

...but all I looked, it seems we are already (always) doing that.  I
haven't found if how and where to mould this into a proper bug report
yet; probably it's a mistake on our side.

This probably works OOTB upon a new gnumach+hurd release, and it may
also be obvious/easy when we get more acquainted with the dependencies
here.

See also
http://richtlijn.be/~larstiq/hurd/hurd-2020-07-07
http://richtlijn.be/~larstiq/hurd/hurd-2020-07-11
https://gitlab.com/janneke/guix/-/tree/wip-hurd-reconfigure

> I should try again, but this definitely needs users to spend time with
> making the system work.  The Childhurd service is probably better for
> just watching in awe.

Yes; while real hardware is fun, trying takes a lot of time and we can
have lots of productive and fun times with the childhurds for now.

Greetings,
Janneke

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



Re: Port forwarding and `guix system vm`

2020-07-07 Thread Jan Nieuwenhuizen
5.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:11 errors:0 dropped:0 overruns:0 frame:0
  TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:1784  TX bytes:1706

loLink encap:Local Loopback
  inet addr:127.0.0.1  Bcast:0.0.0.0  Mask:255.0.0.0
  UP LOOPBACK RUNNING  MTU:65536  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:0  TX bytes:0
--8<---cut here---end--->8---

I noticed this yesterday while struggled similarly, and found that
removing this bit from run-sh; like so:

--8<---cut here---start->8---
sed 's,-nic user[^ ]* ,,' /gnu/store/j8fqc160diq82da7913gpdlcjca45rhz-run-vm.sh 
> run-vm.sh
--8<---cut here---end--->8---

and running "run-vm.sh, will create only eth0.  I blamed this second
eth1 device for my ssh'ing troubles...but I cannot reproduce that
today...dunno!

Greetings,
Janneke

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



Re: conkeror superseded by icecat, why?

2019-06-03 Thread Jan Nieuwenhuizen


Hi!

> I've long had conkeror installed, now after the latest Guix update it
> won't start, it's not installed anymore.

Me too.  I have long pinned an old conkerer and run in from the
store...but recently I have started running the next browser
(sbcl-next).

Other new emacsy-like browser efforts are underway, I don't know of
runnable code though.

> I can still run conkeror manually from the store, using it's direct
> location — but once I delete generations it'll disappear.

> How can I fix this — how to get conkeror installed properly again?

Right.  You can pin it by running something like

./pre-inst-env guix environment --root=~/.config/guix/conkeror --ad-hoc 
conkeror 

in a git checkout that still has conqueror.

Greetings,
janneke

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



Re: proposal to remove linux-Libre from Guix

2019-03-30 Thread Jan Nieuwenhuizen
Ricardo Wurmus writes:

> Let’s work on the Hurd, people!  It’s beautiful!

FWIW the Mes port to the Hurd is ongoing and mes now runs, next thing
up is fork which we need for running mescc.

janneke

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



Re: Installer, recommended store size and hardware detection

2019-02-09 Thread Jan Nieuwenhuizen
Pierre Neidhardt writes:

> Question for everyone:
>
> How much do you allocate to the store?

My /gnu/store uses 90GiB but I do many local builds of modified Guix.  I
have a simple server that has 30GiB on / and currently has a store of
17GiB.  While that works it does not allow for more than one or two
roll-backs.

janneke

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



Re: How to get the store directory of a package output?

2018-11-27 Thread Jan Nieuwenhuizen
Gábor Boskovits writes:

>> Using #$icedtea-8 inside a gexp gives me the store directory of the
>> default icedtea's output.  Adding (string-append #$icedtea-8 "/bin")
>> to PATH gives me java.
>>
>
> You can try #$icedtea-8:jdk according to the docs. I did not test this,

Yes, that works.  Now that I know the solution I also found it in the
docs: 4.6 G-Expressions.  (searching for `:out' ...).

Thank you!
janneke



How to get the store directory of a package output?

2018-11-27 Thread Jan Nieuwenhuizen
Hi!

Using #$icedtea-8 inside a gexp gives me the store directory of the
default icedtea's output.  Adding (string-append #$icedtea-8 "/bin")
to PATH gives me java.

How do i get to the bin directory of javac, i.e. the "jdk" output of
icedtea-8 inside a gexp?

Greetings,
janneke



Re: Guix and Emacs Integration for Polyglot Development

2018-09-14 Thread Jan Nieuwenhuizen
Alex Kost writes:

> Jan Nieuwenhuizen (2018-09-13 22:45 +0200) wrote:
>
>> (defun guix-switch-profile ( profile)

> Thank you!  I'm going to apply it.  I have extracted the guile code and
> put it to the "scheme side" of Emacs-Guix, also I have rewritten this
> command a bit.  The only thing: I don't like the name (neither
> "guix-switch-profile" nor "guix-profile-apply").  I think
> "guix-set-emacs-environment" suits better, as setting the environment is
> exactly what this command does, WDYT?

> You may look at my version of your patch (not in "master" yet) here:
>
>   
> https://notabug.org/alezost/emacs-guix/commit/a4bd696f0b8c564c1e654c426e9059cac1607996

Thank you, I enjoyed reading your rewrite, makes me happy!  Moving the
scheme side makes it cleaner and I learned about -let, nice :-)

I also like the new name better, you see that I struggled/renaed because
I wasn't happy with it.  The initial switch-profile name was simply
chosen because that's how I use it: to switch between my named profiles.

> Let me know, if you think something should be fixed there.

I think it's OK to go in.  The thing I'm not really happy with yet is
the UX of how to switch to temporary `guix environment ...'
environments.  You have to do: echo $GUIX_ENVIRONMENT, , ,
M-x guix-set-emacs-environment RET  ... but I have no idea how we
could improve on that.  Thoughts?

janneke

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



Re: Guix and Emacs Integration for Polyglot Development

2018-09-14 Thread Jan Nieuwenhuizen
Ludovic Courtès writes:

>> (defun guix-switch-profile ( profile)
>>   "Switch Emacs' environment to PROFILE.  PROFILE can be a named
>> profile (like ~/.guix-profile, ~/.config/guix/work) or an
>> environment (like: echo $GUIX_ENVIRONMENT)."
snip
>> and where to put this?
>
> That LGTM!  Perhaps you could submit it for inclusion in Emacs-Guix
> ?

Thanks, done!
janneke



Re: Guix and Emacs Integration for Polyglot Development

2018-09-13 Thread Jan Nieuwenhuizen
Ludovic Courtès writes:

> In all modesty ;-) I think the API is rather good:
>
> scheme@(guile-user)> ,use(guix profiles)
> scheme@(guile-user)> (profile-search-paths "/home/ludo/.guix-profile")
> $11 = ((#< variable: "PATH" files: ("bin" "sbin") 
> separator: ":" file-type: directory file-pattern: #f> . 
> "/home/ludo/.guix-profile/bin:/home/ludo/.guix-profile/sbin") 
> (#< variable: "PYTHONPATH" files: 
> ("lib/python3.6/site-packages") separator: ":" file-type: directory 
> file-pattern: #f> . "/home/ludo/.guix-profile/lib/python3.6/site-packages") …

Whoa, that helps!  Is it just me who is so dense -- I really think this
REPL'y power of Guix is much under-appreciated and would deserve
more attention.

So, what about (thanks to Ricardo via #guile irc and wasamasa via #emacs)

--8<---cut here---start->8---
(defun guix-switch-profile ( profile)
  "Switch Emacs' environment to PROFILE.  PROFILE can be a named
profile (like ~/.guix-profile, ~/.config/guix/work) or an
environment (like: echo $GUIX_ENVIRONMENT)."

  (interactive "fprofile: ")
  (lexical-let* ((guix-program
  `(begin
(use-modules (ice-9 match)
 (guix profiles)
 (guix search-paths))
(let ((specs (profile-search-paths ,(expand-file-name 
profile
  (map
   (match-lambda ((spec . dir)
  (list (search-path-specification-variable 
spec)
(or 
(search-path-specification-separator spec) "")
dir)))
   specs
 (guix-output (guix-eval (format "%S" guix-program)))
 (profile-sexp (car (read-from-string (car guix-output)
(mapcar*
 (lambda (variable separator path)
   (lexical-let ((value (cond ((string-empty-p separator) path)
  ((getenv variable) (concat path separator 
(getenv variable)))
  (t path
 (setenv variable value)))
 (mapcar #'car profile-sexp)
 (mapcar #'cadr profile-sexp)
 (mapcar #'caddr profile-sexp
--8<---cut here---end--->8---

and where to put this?

janneke



Re: Guix and Emacs Integration for Polyglot Development

2018-08-29 Thread Jan Nieuwenhuizen
Hi!

Just subscribed to help-guix because of a request on IRC, so hoping that
OP is subscribed here, or someone can notify them.

I have an ugly hack to switch emacs to a profile or environment.  It
parses the /etc/profile script...using MANIFEST or
`--search-paths' would be much nicer...

Anyway, I'm using some named profiles, eg

~/.config/guix/mes

and when starting work on mes i do

M-x guix-switch-profile RET ~/.config/guix/mes RET

similar for other projects I work on.

A real solution would be nice...

HTH, janneke

--8<---cut here---start->8---
(defun guix-switch-profile ( profile)
  "reset Emacs' environment by snarfing PROFILE/etc/profile"

  (defun matches-in-string (regexp string)
"return a list of matches of REGEXP in STRING."
(let ((matches))
  (save-match-data
(string-match "^" "")
(while (string-match regexp string (match-end 0))
  (push (or (match-string 1 string) (match-string 0 string)) matches)))
  matches))

  (interactive "fprofile: ")
  (let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " 
profile "/etc/profile")))
 (exports (matches-in-string "^[+] export \\(.*\\)" output)))
(mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
--8<---cut here---end--->8---

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