Discussion:
create a symlink
Rene
2018-04-19 02:54:54 UTC
Permalink
Hello,

In 'gnu/build/install.scm', I try to create a symlink from '/gnu/store/..hurd-0.9' to /hurd during 'guix system init '.

But Guix waits for a string, is it possible to use a package to do the symlink?

--------CODE---------------

(let ((hurd-1 (string-append target

"/hurd")))

(let try ()

(catch 'system-error

(lambda ()

(symlink hurd hurd-1))

(lambda args

;; If hurd-1 already exists, overwrite it.

(if (= EEXIST (system-error-errno args))

(begin

(delete-file hurd-1)

(try))

(apply throw args))))))

-----------------------

-----------ERROR-------------

In guix/scripts/system.scm:

181: 4 [#<procedure b1fd9c0 at guix/scripts/system.scm:183:4 (state)> #]

In ice-9/eval.scm:

432: 3 [eval # #]

In ice-9/boot-9.scm:

157: 2 [catch system-error #<procedure afcd888 at ice-9/eval.scm:416:20 ()> ...]

157: 1 [catch system-error #<procedure afcd858 at guix/ui.scm:359:2 ()> ...]

In unknown file:

?: 0 [symlink # "/home/jin/subhurd/rfs/hurd"]

ERROR: In procedure symlink:

ERROR: Wrong type (expecting string): #<package ***@0.9 gnu/packages/hurd.scm:251 98c7120>

--------------------------

Thank you

Rene
Danny Milosavljevic
2018-04-19 06:26:32 UTC
Permalink
Hi Rene,
Post by Rene
But Guix waits for a string, is it possible to use a package to do the symlink?
Not directly - but you can "convert" a package to a string by putting in guix/scripts/system.scm :

(install-hurd #$hurd)

or so (where "install-hurd" is your procedure in gnu/build/install.scm).
Joshua Branson
2018-04-19 21:23:08 UTC
Permalink
I guess I'm a little behind. What's this install-hurd procedure? Is
this getting the hurd running in a vm on a guixSD system?
Post by Danny Milosavljevic
Hi Rene,
Post by Rene
But Guix waits for a string, is it possible to use a package to do the symlink?
(install-hurd #$hurd)
or so (where "install-hurd" is your procedure in gnu/build/install.scm).
Rene
2018-04-21 14:31:17 UTC
Permalink
Hi Joshua,

On top of Debian/Hurd, We are trying to populate a partition with the binaries required to boot GNU Mach and GNU Hurd, through Guix with:

'guix system init'

You can see more on guix-devel mailing list and here:

https://github.com/Phant0mas/Guix-on-Hurd
https://github.com/methalo/guix.git
Rene
2018-04-27 05:20:55 UTC
Permalink
Hello Danny,

after adding the line (install-hurd #$hurd), I have an error, I'm missing some module?


---------
1238: 15 [run-guix-command system "init" ...]
In ice-9/boot-9.scm:
157: 14 [catch srfi-34 #<procedure 9c07b10 at guix/ui.scm:433:2 ()> ...]
157: 13 [catch system-error #<procedure 9d05000 at ice-9/eval.scm:416:20 ()> ...]
In ice-9/eval.scm:
481: 12 [lp (#<fluid 32>) (#t)]
In ice-9/r4rs.scm:
90: 11 [dynamic-wind #<procedure 9ce9800 at ice-9/boot-9.scm:1133:2 _> ...]
In guix/store.scm:
1250: 10 [run-with-store # #<procedure 9d50ac8 at ice-9/eval.scm:416:20 (a)> # ...]
In ice-9/eval.scm:
386: 9 [eval #<memoized ((<3> <1>) <0>)> (# #t # ...)]
387: 8 [eval # #]
387: 7 [eval # #]
432: 6 [eval # #]
In ice-9/boot-9.scm:
157: 5 [catch system-error #<procedure af39c78 at ice-9/eval.scm:416:20 ()> ...]
In ice-9/eval.scm:
387: 4 [eval # #]
387: 3 [eval # #]
386: 2 [eval # #]
393: 1 [eval # #]
In unknown file:
?: 0 [memoize-variable-access! #<memoized ungexp> #<directory # 89b0c60>]

ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: ungexp
---------




‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Post by Danny Milosavljevic
Hi Rene,
Post by Rene
But Guix waits for a string, is it possible to use a package to do the symlink?
(install-hurd #$hurd)
or so (where "install-hurd" is your procedure in gnu/build/install.scm).
Danny Milosavljevic
2018-04-27 15:08:48 UTC
Permalink
Hi Rene,

are you sure you put the call into guix/scripts/system.scm ?

There are a lot of #$ things there already - should work.

In gnu/build/install.scm it's not going to work.

The Guix high-level packaging stuff is not available build-side, only host-side.

Can you provide a patch of what you did?

Loading...