all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* System-level inferiors.
@ 2019-11-19 20:02 brettg
  2019-11-20  1:29 ` brettg
  0 siblings, 1 reply; 7+ messages in thread
From: brettg @ 2019-11-19 20:02 UTC (permalink / raw)
  To: help-guix

Hey all,

I am experimenting with the inferior system a little bit. I am 
attempting to see if I can specify a specific version of the linux-libre 
kernel to be taken from an inferior and applied to my system 
configuration.

(define kernel-channel-inf
   ;; This is the old revision from which
   ;; we will obtain our desired kernel version.
   (list (channel
	 (name 'guix)
	 (url "https://git.savannah.gnu.org/git/guix.git")
	 (commit
           "fd41243c819635795f4e4bdef1e2823db5234e24"))))

(define kernel-inferior-proc
   ;; An inferior representing `kernel-channel-inf'.
   (inferior-for-channels kernel-channel-inf))

(operating-system

   ...

  (kernel (lookup-inferior-packages
	  kernel-inferior-proc "linux-libre" "4.19.81"))

It took me some experimenting to come up with this, in that 
experimenting the channel revision was built and cached. However, when I 
run `guix system build config.scm` with the above code snippet, the 
process just hangs on

Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...

I am not sure how to proceed to achieve what I am hoping for. Any 
thoughts?

Brett Gilio

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: System-level inferiors.
  2019-11-19 20:02 System-level inferiors brettg
@ 2019-11-20  1:29 ` brettg
  2019-11-20  1:35   ` brettg
  0 siblings, 1 reply; 7+ messages in thread
From: brettg @ 2019-11-20  1:29 UTC (permalink / raw)
  To: help-guix; +Cc: Help-Guix



On 19.11.2019 21:02, brettg@posteo.net wrote:
> Hey all,
> 
> I am experimenting with the inferior system a little bit. I am
> attempting to see if I can specify a specific version of the
> linux-libre kernel to be taken from an inferior and applied to my
> system configuration.
> 
> (define kernel-channel-inf
>   ;; This is the old revision from which
>   ;; we will obtain our desired kernel version.
>   (list (channel
>  (name 'guix)
>  (url "https://git.savannah.gnu.org/git/guix.git")
>  (commit
>           "fd41243c819635795f4e4bdef1e2823db5234e24"))))
> 
> (define kernel-inferior-proc
>   ;; An inferior representing `kernel-channel-inf'.
>   (inferior-for-channels kernel-channel-inf))
> 
> (operating-system
> 
>   ...
> 
>  (kernel (lookup-inferior-packages
>   kernel-inferior-proc "linux-libre" "4.19.81"))
> 
> It took me some experimenting to come up with this, in that
> experimenting the channel revision was built and cached. However, when
> I run `guix system build config.scm` with the above code snippet, the
> process just hangs on
> 
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'...
> 
> I am not sure how to proceed to achieve what I am hoping for. Any 
> thoughts?
> 
> Brett Gilio

Update, I used guix time-machine to ensure that this specific build of 
linux-libre 4.19.81 was available in the store, so now it is not 
hanging:

Instead, it is telling me:

guix/gexp.scm:201:36: In procedure lookup-compiler:
In procedure struct_vtable: Wrong type argument in position 1 (expecting 
struct): (#<inferior-package linux-libre@4.19.81 7f13870f8900>)

Will keep investigating a way to do this.

Brett Gilio

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: System-level inferiors.
  2019-11-20  1:29 ` brettg
@ 2019-11-20  1:35   ` brettg
  2019-11-20  1:55     ` brettg
  0 siblings, 1 reply; 7+ messages in thread
From: brettg @ 2019-11-20  1:35 UTC (permalink / raw)
  To: help-guix; +Cc: Help-Guix



On 20.11.2019 02:29, brettg@posteo.net wrote:
> On 19.11.2019 21:02, brettg@posteo.net wrote:
>> Hey all,
>> 
>> I am experimenting with the inferior system a little bit. I am
>> attempting to see if I can specify a specific version of the
>> linux-libre kernel to be taken from an inferior and applied to my
>> system configuration.
>> 
>> (define kernel-channel-inf
>>   ;; This is the old revision from which
>>   ;; we will obtain our desired kernel version.
>>   (list (channel
>>  (name 'guix)
>>  (url "https://git.savannah.gnu.org/git/guix.git")
>>  (commit
>>           "fd41243c819635795f4e4bdef1e2823db5234e24"))))
>> 
>> (define kernel-inferior-proc
>>   ;; An inferior representing `kernel-channel-inf'.
>>   (inferior-for-channels kernel-channel-inf))
>> 
>> (operating-system
>> 
>>   ...
>> 
>>  (kernel (lookup-inferior-packages
>>   kernel-inferior-proc "linux-libre" "4.19.81"))
>> 
>> It took me some experimenting to come up with this, in that
>> experimenting the channel revision was built and cached. However, when
>> I run `guix system build config.scm` with the above code snippet, the
>> process just hangs on
>> 
>> Updating channel 'guix' from Git repository at
>> 'https://git.savannah.gnu.org/git/guix.git'...
>> 
>> I am not sure how to proceed to achieve what I am hoping for. Any 
>> thoughts?
>> 
>> Brett Gilio
> 
> Update, I used guix time-machine to ensure that this specific build of
> linux-libre 4.19.81 was available in the store, so now it is not
> hanging:
> 
> Instead, it is telling me:
> 
> guix/gexp.scm:201:36: In procedure lookup-compiler:
> In procedure struct_vtable: Wrong type argument in position 1
> (expecting struct): (#<inferior-package linux-libre@4.19.81
> 7f13870f8900>)
> 
> Will keep investigating a way to do this.
> 
> Brett Gilio

brettg@oryx ~/Repos/cfg/machines/oryx$ guix system build config.scm
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Backtrace:
           18 (primitive-load 
"/home/brettg/.config/guix/current/bin/guix")
In guix/ui.scm:
   1774:12 17 (run-guix-command _ . _)
In ice-9/boot-9.scm:
     829:9 16 (catch _ _ #<procedure 7f359bd3d1f8 at guix/ui.scm:647:2 
(key …> …)
     829:9 15 (catch _ _ #<procedure 7f359bd3d210 at guix/ui.scm:770:6 
(key …> …)
In guix/scripts/system.scm:
    1216:8 14 (_)
In guix/status.scm:
     768:4 13 (call-with-status-report _ _)
In guix/scripts/system.scm:
    1072:4 12 (process-action _ _ _)
In guix/store.scm:
    623:10 11 (call-with-store _)
   1834:24 10 (run-with-store #<store-connection 256.99 7f358c4d65a0> _ # 
_ # …)
In guix/scripts/system.scm:
     778:2  9 (_ _)
In gnu/services.scm:
     320:2  8 (_ _)
In gnu/system.scm:
     469:4  7 (_ _)
In guix/gexp.scm:
     859:2  6 (_ _)
     720:2  5 (_ _)
In ./guix/monads.scm:
     482:9  4 (_ _)
In guix/gexp.scm:
    590:13  3 (_ _)
In guix/store.scm:
   1692:13  2 (_ _)
In guix/gexp.scm:
     222:2  1 (lower-object (#<inferior-package linux-libre@4.19.81 
7f358c6…>) …)
    201:36  0 (lookup-compiler (#<inferior-package linux-libre@4.19.81 
7f358…>))

guix/gexp.scm:201:36: In procedure lookup-compiler:
In procedure struct_vtable: Wrong type argument in position 1 (expecting 
struct): (#<inferior-package linux-libre@4.19.81 7f358c651660>)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: System-level inferiors.
  2019-11-20  1:35   ` brettg
@ 2019-11-20  1:55     ` brettg
  2019-11-20  2:05       ` brettg
  0 siblings, 1 reply; 7+ messages in thread
From: brettg @ 2019-11-20  1:55 UTC (permalink / raw)
  To: help-guix; +Cc: Help-Guix



On 20.11.2019 02:35, brettg@posteo.net wrote:
> On 20.11.2019 02:29, brettg@posteo.net wrote:
>> On 19.11.2019 21:02, brettg@posteo.net wrote:
>>> Hey all,
>>> 
>>> I am experimenting with the inferior system a little bit. I am
>>> attempting to see if I can specify a specific version of the
>>> linux-libre kernel to be taken from an inferior and applied to my
>>> system configuration.
>>> 
>>> (define kernel-channel-inf
>>>   ;; This is the old revision from which
>>>   ;; we will obtain our desired kernel version.
>>>   (list (channel
>>>  (name 'guix)
>>>  (url "https://git.savannah.gnu.org/git/guix.git")
>>>  (commit
>>>           "fd41243c819635795f4e4bdef1e2823db5234e24"))))
>>> 
>>> (define kernel-inferior-proc
>>>   ;; An inferior representing `kernel-channel-inf'.
>>>   (inferior-for-channels kernel-channel-inf))
>>> 
>>> (operating-system
>>> 
>>>   ...
>>> 
>>>  (kernel (lookup-inferior-packages
>>>   kernel-inferior-proc "linux-libre" "4.19.81"))
>>> 
>>> It took me some experimenting to come up with this, in that
>>> experimenting the channel revision was built and cached. However, 
>>> when
>>> I run `guix system build config.scm` with the above code snippet, the
>>> process just hangs on
>>> 
>>> Updating channel 'guix' from Git repository at
>>> 'https://git.savannah.gnu.org/git/guix.git'...
>>> 
>>> I am not sure how to proceed to achieve what I am hoping for. Any 
>>> thoughts?
>>> 
>>> Brett Gilio
>> 
>> Update, I used guix time-machine to ensure that this specific build of
>> linux-libre 4.19.81 was available in the store, so now it is not
>> hanging:
>> 
>> Instead, it is telling me:
>> 
>> guix/gexp.scm:201:36: In procedure lookup-compiler:
>> In procedure struct_vtable: Wrong type argument in position 1
>> (expecting struct): (#<inferior-package linux-libre@4.19.81
>> 7f13870f8900>)
>> 
>> Will keep investigating a way to do this.
>> 
>> Brett Gilio
> 
> brettg@oryx ~/Repos/cfg/machines/oryx$ guix system build config.scm
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'...
> Backtrace:
>           18 (primitive-load 
> "/home/brettg/.config/guix/current/bin/guix")
> In guix/ui.scm:
>   1774:12 17 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>     829:9 16 (catch _ _ #<procedure 7f359bd3d1f8 at guix/ui.scm:647:2 
> (key …> …)
>     829:9 15 (catch _ _ #<procedure 7f359bd3d210 at guix/ui.scm:770:6 
> (key …> …)
> In guix/scripts/system.scm:
>    1216:8 14 (_)
> In guix/status.scm:
>     768:4 13 (call-with-status-report _ _)
> In guix/scripts/system.scm:
>    1072:4 12 (process-action _ _ _)
> In guix/store.scm:
>    623:10 11 (call-with-store _)
>   1834:24 10 (run-with-store #<store-connection 256.99 7f358c4d65a0> _ 
> # _ # …)
> In guix/scripts/system.scm:
>     778:2  9 (_ _)
> In gnu/services.scm:
>     320:2  8 (_ _)
> In gnu/system.scm:
>     469:4  7 (_ _)
> In guix/gexp.scm:
>     859:2  6 (_ _)
>     720:2  5 (_ _)
> In ./guix/monads.scm:
>     482:9  4 (_ _)
> In guix/gexp.scm:
>    590:13  3 (_ _)
> In guix/store.scm:
>   1692:13  2 (_ _)
> In guix/gexp.scm:
>     222:2  1 (lower-object (#<inferior-package linux-libre@4.19.81 
> 7f358c6…>) …)
>    201:36  0 (lookup-compiler (#<inferior-package linux-libre@4.19.81 
> 7f358…>))
> 
> guix/gexp.scm:201:36: In procedure lookup-compiler:
> In procedure struct_vtable: Wrong type argument in position 1
> (expecting struct): (#<inferior-package linux-libre@4.19.81
> 7f358c651660>)

https://lists.gnu.org/archive/html/bug-guix/2018-12/msg00153.html

Relevant bug issue.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: System-level inferiors.
  2019-11-20  1:55     ` brettg
@ 2019-11-20  2:05       ` brettg
  2019-11-20 10:57         ` Pierre Neidhardt
  0 siblings, 1 reply; 7+ messages in thread
From: brettg @ 2019-11-20  2:05 UTC (permalink / raw)
  To: help-guix; +Cc: Help-Guix



On 20.11.2019 02:55, brettg@posteo.net wrote:
> On 20.11.2019 02:35, brettg@posteo.net wrote:
>> On 20.11.2019 02:29, brettg@posteo.net wrote:
>>> On 19.11.2019 21:02, brettg@posteo.net wrote:
>>>> Hey all,
>>>> 
>>>> I am experimenting with the inferior system a little bit. I am
>>>> attempting to see if I can specify a specific version of the
>>>> linux-libre kernel to be taken from an inferior and applied to my
>>>> system configuration.
>>>> 
>>>> (define kernel-channel-inf
>>>>   ;; This is the old revision from which
>>>>   ;; we will obtain our desired kernel version.
>>>>   (list (channel
>>>>  (name 'guix)
>>>>  (url "https://git.savannah.gnu.org/git/guix.git")
>>>>  (commit
>>>>           "fd41243c819635795f4e4bdef1e2823db5234e24"))))
>>>> 
>>>> (define kernel-inferior-proc
>>>>   ;; An inferior representing `kernel-channel-inf'.
>>>>   (inferior-for-channels kernel-channel-inf))
>>>> 
>>>> (operating-system
>>>> 
>>>>   ...
>>>> 
>>>>  (kernel (lookup-inferior-packages
>>>>   kernel-inferior-proc "linux-libre" "4.19.81"))
>>>> 
>>>> It took me some experimenting to come up with this, in that
>>>> experimenting the channel revision was built and cached. However, 
>>>> when
>>>> I run `guix system build config.scm` with the above code snippet, 
>>>> the
>>>> process just hangs on
>>>> 
>>>> Updating channel 'guix' from Git repository at
>>>> 'https://git.savannah.gnu.org/git/guix.git'...
>>>> 
>>>> I am not sure how to proceed to achieve what I am hoping for. Any 
>>>> thoughts?
>>>> 
>>>> Brett Gilio
>>> 
>>> Update, I used guix time-machine to ensure that this specific build 
>>> of
>>> linux-libre 4.19.81 was available in the store, so now it is not
>>> hanging:
>>> 
>>> Instead, it is telling me:
>>> 
>>> guix/gexp.scm:201:36: In procedure lookup-compiler:
>>> In procedure struct_vtable: Wrong type argument in position 1
>>> (expecting struct): (#<inferior-package linux-libre@4.19.81
>>> 7f13870f8900>)
>>> 
>>> Will keep investigating a way to do this.
>>> 
>>> Brett Gilio
>> 
>> brettg@oryx ~/Repos/cfg/machines/oryx$ guix system build config.scm
>> Updating channel 'guix' from Git repository at
>> 'https://git.savannah.gnu.org/git/guix.git'...
>> Backtrace:
>>           18 (primitive-load 
>> "/home/brettg/.config/guix/current/bin/guix")
>> In guix/ui.scm:
>>   1774:12 17 (run-guix-command _ . _)
>> In ice-9/boot-9.scm:
>>     829:9 16 (catch _ _ #<procedure 7f359bd3d1f8 at guix/ui.scm:647:2 
>> (key …> …)
>>     829:9 15 (catch _ _ #<procedure 7f359bd3d210 at guix/ui.scm:770:6 
>> (key …> …)
>> In guix/scripts/system.scm:
>>    1216:8 14 (_)
>> In guix/status.scm:
>>     768:4 13 (call-with-status-report _ _)
>> In guix/scripts/system.scm:
>>    1072:4 12 (process-action _ _ _)
>> In guix/store.scm:
>>    623:10 11 (call-with-store _)
>>   1834:24 10 (run-with-store #<store-connection 256.99 7f358c4d65a0> _ 
>> # _ # …)
>> In guix/scripts/system.scm:
>>     778:2  9 (_ _)
>> In gnu/services.scm:
>>     320:2  8 (_ _)
>> In gnu/system.scm:
>>     469:4  7 (_ _)
>> In guix/gexp.scm:
>>     859:2  6 (_ _)
>>     720:2  5 (_ _)
>> In ./guix/monads.scm:
>>     482:9  4 (_ _)
>> In guix/gexp.scm:
>>    590:13  3 (_ _)
>> In guix/store.scm:
>>   1692:13  2 (_ _)
>> In guix/gexp.scm:
>>     222:2  1 (lower-object (#<inferior-package linux-libre@4.19.81 
>> 7f358c6…>) …)
>>    201:36  0 (lookup-compiler (#<inferior-package linux-libre@4.19.81 
>> 7f358…>))
>> 
>> guix/gexp.scm:201:36: In procedure lookup-compiler:
>> In procedure struct_vtable: Wrong type argument in position 1
>> (expecting struct): (#<inferior-package linux-libre@4.19.81
>> 7f358c651660>)
> 
> https://lists.gnu.org/archive/html/bug-guix/2018-12/msg00153.html
> 
> Relevant bug issue.

I figured it out, nevermind!

Final solution:

(define kernel-inferior-channel
   ;; This is the old revision from which
   ;; we will obtain our desired kernel version.
   (list (channel
	 (name 'guix)
	 (url "https://git.savannah.gnu.org/git/guix.git")
	 (commit
           "fd41243c819635795f4e4bdef1e2823db5234e24"))))

(define linux-libre-4.19.81-inf
   (first
    (lookup-inferior-packages
     (inferior-for-channels kernel-inferior-channel)
     "linux-libre" "4.19.81")))

... in operating-system ...

  (kernel linux-libre-4.19.81-inf)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: System-level inferiors.
  2019-11-20  2:05       ` brettg
@ 2019-11-20 10:57         ` Pierre Neidhardt
  2019-11-20 16:13           ` brettg
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Neidhardt @ 2019-11-20 10:57 UTC (permalink / raw)
  To: brettg, help-guix; +Cc: Help-Guix

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

This is very nice.
As far as I know, the inferior interface is still "unstable", but this
would be a good start for a blog/cookbook article nonetheless! :)

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: System-level inferiors.
  2019-11-20 10:57         ` Pierre Neidhardt
@ 2019-11-20 16:13           ` brettg
  0 siblings, 0 replies; 7+ messages in thread
From: brettg @ 2019-11-20 16:13 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix, Help-Guix



On 20.11.2019 11:57, Pierre Neidhardt wrote:
> This is very nice.
> As far as I know, the inferior interface is still "unstable", but this
> would be a good start for a blog/cookbook article nonetheless! :)

Pierre,

I think something like this definitely should go in the cookbook 
regarding inferiors and the time-machine mechanism.

Let me know what I can do to help.

Brett

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-20 16:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 20:02 System-level inferiors brettg
2019-11-20  1:29 ` brettg
2019-11-20  1:35   ` brettg
2019-11-20  1:55     ` brettg
2019-11-20  2:05       ` brettg
2019-11-20 10:57         ` Pierre Neidhardt
2019-11-20 16:13           ` brettg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.