* Kernel config
@ 2016-07-16 8:50 Vincent Legoll
2016-07-16 13:23 ` Vincent Legoll
2016-07-16 17:39 ` Ricardo Wurmus
0 siblings, 2 replies; 18+ messages in thread
From: Vincent Legoll @ 2016-07-16 8:50 UTC (permalink / raw
To: help-guix
hello,
I'm wondering if it is possible to pass a .config file to be used for
"guix system", as
currently the config used is very heavy, and takes ages to build.
Thanks
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-16 8:50 Kernel config Vincent Legoll
@ 2016-07-16 13:23 ` Vincent Legoll
2016-07-16 17:39 ` Ricardo Wurmus
1 sibling, 0 replies; 18+ messages in thread
From: Vincent Legoll @ 2016-07-16 13:23 UTC (permalink / raw
To: help-guix
I've seen in gnu/packages/linux.scm that the default configs
are in gnu/packages/linux-libre-*.conf
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-16 8:50 Kernel config Vincent Legoll
2016-07-16 13:23 ` Vincent Legoll
@ 2016-07-16 17:39 ` Ricardo Wurmus
2016-07-16 18:25 ` Vincent Legoll
1 sibling, 1 reply; 18+ messages in thread
From: Ricardo Wurmus @ 2016-07-16 17:39 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Vincent Legoll <vincent.legoll@gmail.com> writes:
> I'm wondering if it is possible to pass a .config file to be used for
> "guix system", as
> currently the config used is very heavy, and takes ages to build.
To use a different configuration you would create a new package variant
of the “linux-libre” package in “gnu/packages/linux.scm”, overriding the
native-input with the label “kconfig”. Then you can specify your kernel
variant package in the “kernel” field of your system configuration.
I don’t recommend changing the default configuration in your local
checkout.
Hope this helps!
~~ Ricardo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-16 17:39 ` Ricardo Wurmus
@ 2016-07-16 18:25 ` Vincent Legoll
2016-07-16 20:44 ` Ludovic Courtès
0 siblings, 1 reply; 18+ messages in thread
From: Vincent Legoll @ 2016-07-16 18:25 UTC (permalink / raw
To: Ricardo Wurmus; +Cc: help-guix
Thanks a lot, I'll see if I manage to get that done...
On Sat, Jul 16, 2016 at 7:39 PM, Ricardo Wurmus <rekado@elephly.net> wrote:
>
> Vincent Legoll <vincent.legoll@gmail.com> writes:
>
>> I'm wondering if it is possible to pass a .config file to be used for
>> "guix system", as
>> currently the config used is very heavy, and takes ages to build.
>
> To use a different configuration you would create a new package variant
> of the “linux-libre” package in “gnu/packages/linux.scm”, overriding the
> native-input with the label “kconfig”. Then you can specify your kernel
> variant package in the “kernel” field of your system configuration.
>
> I don’t recommend changing the default configuration in your local
> checkout.
>
> Hope this helps!
>
> ~~ Ricardo
>
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-16 18:25 ` Vincent Legoll
@ 2016-07-16 20:44 ` Ludovic Courtès
2016-07-17 16:22 ` Vincent Legoll
0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2016-07-16 20:44 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Hi,
Changing the kernel config is currently inconvenient as you can see.
Ideally we should provide an API to express a set of options to turn on
and off.
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-16 20:44 ` Ludovic Courtès
@ 2016-07-17 16:22 ` Vincent Legoll
2016-07-17 17:49 ` Ludovic Courtès
0 siblings, 1 reply; 18+ messages in thread
From: Vincent Legoll @ 2016-07-17 16:22 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
Would the following work in the mean time ?
1. Adding the following to gnu/packages/linux.scm :
(define-public linux-libre-config variant
(package
(inherit linux-libre)
(native-inputs
(let ((conf (kernel-config (or (%current-target-system)
(%current-system))
#:variant variant)))
`(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
("kconfig" ,conf))))))
2. Adding this to your OS definition config.scm :
(operating-system
...
(kernel (linux-libre-config "4.6-vince")))
3. putting the kconfig file into:
gnu/packages/linux-libre-4.6-vince-x86_64.conf
If that's OK, I can prepare a patch adding the missing pieces...
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-17 16:22 ` Vincent Legoll
@ 2016-07-17 17:49 ` Ludovic Courtès
2016-07-17 18:51 ` Vincent Legoll
2016-07-20 21:09 ` Vincent Legoll
0 siblings, 2 replies; 18+ messages in thread
From: Ludovic Courtès @ 2016-07-17 17:49 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Vincent Legoll <vincent.legoll@gmail.com> skribis:
> Would the following work in the mean time ?
>
> 1. Adding the following to gnu/packages/linux.scm :
>
> (define-public linux-libre-config variant
> (package
> (inherit linux-libre)
> (native-inputs
> (let ((conf (kernel-config (or (%current-target-system)
> (%current-system))
> #:variant variant)))
> `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
> ("kconfig" ,conf))))))
This should roughly work. However, I think one can already provide
their own config file with something like:
(define-public my-own-linux-libre
(package
(inherit linux-libre)
(native-inputs
`(("kconfig" ,(local-file "./my-kernel.conf"))
,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
… which can be dropped in a file in $GUIX_PACKAGE_PATH.
It remains somewhat inconvenient, though.
WDYT?
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-17 17:49 ` Ludovic Courtès
@ 2016-07-17 18:51 ` Vincent Legoll
2016-07-17 18:59 ` Ricardo Wurmus
2016-07-20 21:09 ` Vincent Legoll
1 sibling, 1 reply; 18+ messages in thread
From: Vincent Legoll @ 2016-07-17 18:51 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
On Sun, Jul 17, 2016 at 7:49 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Vincent Legoll <vincent.legoll@gmail.com> skribis:
>
>> Would the following work in the mean time ?
>>
>> 1. Adding the following to gnu/packages/linux.scm :
>>
>> (define-public linux-libre-config variant
>> (package
>> (inherit linux-libre)
>> (native-inputs
>> (let ((conf (kernel-config (or (%current-target-system)
>> (%current-system))
>> #:variant variant)))
>> `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
>> ("kconfig" ,conf))))))
>
> This should roughly work. However, I think one can already provide
> their own config file with something like:
>
> (define-public my-own-linux-libre
> (package
> (inherit linux-libre)
> (native-inputs
> `(("kconfig" ,(local-file "./my-kernel.conf"))
> ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
>
> … which can be dropped in a file in $GUIX_PACKAGE_PATH.
>
> It remains somewhat inconvenient, though.
Yes, that would be simpler.
Does it have to be in root's $GUIX_PACKAGE_PATH, or can guix system reconfigure
work as a user ? That would be a sufficiently good solution, I think...
I'll try it.
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-17 18:51 ` Vincent Legoll
@ 2016-07-17 18:59 ` Ricardo Wurmus
0 siblings, 0 replies; 18+ messages in thread
From: Ricardo Wurmus @ 2016-07-17 18:59 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Vincent Legoll <vincent.legoll@gmail.com> writes:
>
> Does it have to be in root's $GUIX_PACKAGE_PATH, or can guix system reconfigure
> work as a user ? That would be a sufficiently good solution, I think...
“guix system reconfigure” has to be run as root. With “sudo -E” you can
preserve the current user’s environment, so GUIX_PACKAGE_PATH doesn’t
need to be set for root explicitly.
~~ Ricardo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-17 17:49 ` Ludovic Courtès
2016-07-17 18:51 ` Vincent Legoll
@ 2016-07-20 21:09 ` Vincent Legoll
2016-07-21 12:06 ` Ludovic Courtès
1 sibling, 1 reply; 18+ messages in thread
From: Vincent Legoll @ 2016-07-20 21:09 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
> (define-public my-own-linux-libre
> (package
> (inherit linux-libre)
> (native-inputs
> `(("kconfig" ,(local-file "./my-kernel.conf"))
> ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
>
> … which can be dropped in a file in $GUIX_PACKAGE_PATH.
>
> It remains somewhat inconvenient, though.
Yep, inconvenient in the sense I couldn't find the right incantation to
make this work, even with the help from people on #guix...
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-20 21:09 ` Vincent Legoll
@ 2016-07-21 12:06 ` Ludovic Courtès
2016-07-21 12:46 ` Vincent Legoll
0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2016-07-21 12:06 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Vincent Legoll <vincent.legoll@gmail.com> skribis:
>> (define-public my-own-linux-libre
>> (package
>> (inherit linux-libre)
>> (native-inputs
>> `(("kconfig" ,(local-file "./my-kernel.conf"))
>> ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
>>
>> … which can be dropped in a file in $GUIX_PACKAGE_PATH.
>>
>> It remains somewhat inconvenient, though.
>
> Yep, inconvenient in the sense I couldn't find the right incantation to
> make this work, even with the help from people on #guix...
Here’s a more complete example that works for me.
First, I have this linux-libre.scm file in my GUIX_PACKAGE_PATH:
--8<---------------cut here---------------start------------->8---
(define-module (linux-libre)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (gnu packages linux)
#:use-module (srfi srfi-1))
(define-public my-own-linux-libre
(package
(inherit linux-libre)
(name "linux-libre-for-myself")
(native-inputs
`(("kconfig" ,(local-file "./my-kernel.conf"))
,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
--8<---------------cut here---------------end--------------->8---
In the same directory lies the file ‘my-kernel.conf’.
With this, I can do:
--8<---------------cut here---------------start------------->8---
$ guix build linux-libre-for-myself -n --no-grafts
The following derivation would be built:
/gnu/store/23b25z660ahglylv5blm2l9cbrc639c2-linux-libre-for-myself-4.6.4.drv
$ guix gc --references /gnu/store/23b25z660ahglylv5blm2l9cbrc639c2-linux-libre-for-myself-4.6.4.drv | grep my-kernel
/gnu/store/pq885cy0bi73acwh1wdx4agn5y5vrf2z-my-kernel.conf
$ cat /gnu/store/pq885cy0bi73acwh1wdx4agn5y5vrf2z-my-kernel.conf
Fake kernel conf.
--8<---------------cut here---------------end--------------->8---
Does something similar works for you?
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-21 12:06 ` Ludovic Courtès
@ 2016-07-21 12:46 ` Vincent Legoll
2016-07-21 15:30 ` Ludovic Courtès
0 siblings, 1 reply; 18+ messages in thread
From: Vincent Legoll @ 2016-07-21 12:46 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
On Thu, Jul 21, 2016 at 2:06 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Vincent Legoll <vincent.legoll@gmail.com> skribis:
>
>>> (define-public my-own-linux-libre
>>> (package
>>> (inherit linux-libre)
>>> (native-inputs
>>> `(("kconfig" ,(local-file "./my-kernel.conf"))
>>> ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
>>>
>>> … which can be dropped in a file in $GUIX_PACKAGE_PATH.
>>>
>>> It remains somewhat inconvenient, though.
>>
>> Yep, inconvenient in the sense I couldn't find the right incantation to
>> make this work, even with the help from people on #guix...
>
> Here’s a more complete example that works for me.
>
> First, I have this linux-libre.scm file in my GUIX_PACKAGE_PATH:
>
> --8<---------------cut here---------------start------------->8---
> (define-module (linux-libre)
> #:use-module (guix gexp)
> #:use-module (guix packages)
> #:use-module (gnu packages linux)
> #:use-module (srfi srfi-1))
>
> (define-public my-own-linux-libre
> (package
> (inherit linux-libre)
> (name "linux-libre-for-myself")
> (native-inputs
> `(("kconfig" ,(local-file "./my-kernel.conf"))
> ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
> --8<---------------cut here---------------end--------------->8---
>
> In the same directory lies the file ‘my-kernel.conf’.
>
> With this, I can do:
>
> --8<---------------cut here---------------start------------->8---
> $ guix build linux-libre-for-myself -n --no-grafts
> The following derivation would be built:
> /gnu/store/23b25z660ahglylv5blm2l9cbrc639c2-linux-libre-for-myself-4.6.4.drv
> $ guix gc --references /gnu/store/23b25z660ahglylv5blm2l9cbrc639c2-linux-libre-for-myself-4.6.4.drv | grep my-kernel
> /gnu/store/pq885cy0bi73acwh1wdx4agn5y5vrf2z-my-kernel.conf
> $ cat /gnu/store/pq885cy0bi73acwh1wdx4agn5y5vrf2z-my-kernel.conf
> Fake kernel conf.
> --8<---------------cut here---------------end--------------->8---
>
> Does something similar works for you?
No, I get:
guix build: error: /home/vince/guix-packages/linux-libre.scm:8:2:
package `linux-libre-for-myself-4.5' has an invalid input: ("kconfig"
#<<local-file> file: "./my-kernel.conf" absolute: #<promise
#<procedure 55079f0 at ice-9/eval.scm:416:20 ()>> name:
"my-kernel.conf" recursive?: #f>)
Which is very similar to what I was getting yesterday evening, with the various
modifications that efraim asked me to try on IRC
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-21 12:46 ` Vincent Legoll
@ 2016-07-21 15:30 ` Ludovic Courtès
2016-07-21 18:47 ` Vincent Legoll
0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2016-07-21 15:30 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Vincent Legoll <vincent.legoll@gmail.com> skribis:
> On Thu, Jul 21, 2016 at 2:06 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Here’s a more complete example that works for me.
>>
>> First, I have this linux-libre.scm file in my GUIX_PACKAGE_PATH:
>>
>> --8<---------------cut here---------------start------------->8---
>> (define-module (linux-libre)
>> #:use-module (guix gexp)
>> #:use-module (guix packages)
>> #:use-module (gnu packages linux)
>> #:use-module (srfi srfi-1))
>>
>> (define-public my-own-linux-libre
>> (package
>> (inherit linux-libre)
>> (name "linux-libre-for-myself")
>> (native-inputs
>> `(("kconfig" ,(local-file "./my-kernel.conf"))
>> ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))))
>> --8<---------------cut here---------------end--------------->8---
>>
>> In the same directory lies the file ‘my-kernel.conf’.
>>
>> With this, I can do:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ guix build linux-libre-for-myself -n --no-grafts
>> The following derivation would be built:
>> /gnu/store/23b25z660ahglylv5blm2l9cbrc639c2-linux-libre-for-myself-4.6.4.drv
>> $ guix gc --references /gnu/store/23b25z660ahglylv5blm2l9cbrc639c2-linux-libre-for-myself-4.6.4.drv | grep my-kernel
>> /gnu/store/pq885cy0bi73acwh1wdx4agn5y5vrf2z-my-kernel.conf
>> $ cat /gnu/store/pq885cy0bi73acwh1wdx4agn5y5vrf2z-my-kernel.conf
>> Fake kernel conf.
>> --8<---------------cut here---------------end--------------->8---
>>
>> Does something similar works for you?
>
> No, I get:
>
> guix build: error: /home/vince/guix-packages/linux-libre.scm:8:2:
> package `linux-libre-for-myself-4.5' has an invalid input: ("kconfig"
> #<<local-file> file: "./my-kernel.conf" absolute: #<promise
> #<procedure 55079f0 at ice-9/eval.scm:416:20 ()>> name:
> "my-kernel.conf" recursive?: #f>)
Support for using ‘local-file’ and similar in package inputs was added
by commit da675305ddf2ba574e309e515d18ae1f778297be (June 15th).
Could it be that you’re using an older Guix?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-21 15:30 ` Ludovic Courtès
@ 2016-07-21 18:47 ` Vincent Legoll
2016-07-22 8:22 ` Vincent Legoll
0 siblings, 1 reply; 18+ messages in thread
From: Vincent Legoll @ 2016-07-21 18:47 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
> Support for using ‘local-file’ and similar in package inputs was added
> by commit da675305ddf2ba574e309e515d18ae1f778297be (June 15th).
>
> Could it be that you’re using an older Guix?
That's possible, I did a few guix pulls since I installed from 0.10.0 usb
but
$ guix --version
guix (GNU Guix) 0.10.0
how can I know the git ID of my current guix store ?
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-21 18:47 ` Vincent Legoll
@ 2016-07-22 8:22 ` Vincent Legoll
2016-07-22 8:28 ` Vincent Legoll
2016-07-22 12:44 ` Ludovic Courtès
0 siblings, 2 replies; 18+ messages in thread
From: Vincent Legoll @ 2016-07-22 8:22 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
Something that I don't understand:
root@guixsd ~# guix --version
guix (GNU Guix) 20160722.06
root@guixsd ~# which guix
/run/current-system/profile/bin/guix
vince@guixsd ~$ guix --version
guix (GNU Guix) 0.10.0
vince@guixsd ~$ which guix
/run/current-system/profile/bin/guix
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-22 8:22 ` Vincent Legoll
@ 2016-07-22 8:28 ` Vincent Legoll
2016-07-22 12:44 ` Ludovic Courtès
1 sibling, 0 replies; 18+ messages in thread
From: Vincent Legoll @ 2016-07-22 8:28 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
And it appears that this is causing the error
[...] package `linux-libre-for-myself-4.5' has an invalid input:
("kconfig" [...]
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-22 8:22 ` Vincent Legoll
2016-07-22 8:28 ` Vincent Legoll
@ 2016-07-22 12:44 ` Ludovic Courtès
2016-07-22 12:51 ` Vincent Legoll
1 sibling, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2016-07-22 12:44 UTC (permalink / raw
To: Vincent Legoll; +Cc: help-guix
Vincent Legoll <vincent.legoll@gmail.com> skribis:
> Something that I don't understand:
>
> root@guixsd ~# guix --version
> guix (GNU Guix) 20160722.06
> root@guixsd ~# which guix
> /run/current-system/profile/bin/guix
This one is recent, and the ‘local-file’ trick should work with it.
> vince@guixsd ~$ guix --version
> guix (GNU Guix) 0.10.0
> vince@guixsd ~$ which guix
> /run/current-system/profile/bin/guix
This one might be too old, though we can’t really tell.
They show different versions because in fact, all of Guix except the
‘guix’ command (which does very little) is taken from
~/.config/guix/latest, populated by ‘guix pull’. Remember that ‘guix
pull’ is per-user.
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Kernel config
2016-07-22 12:44 ` Ludovic Courtès
@ 2016-07-22 12:51 ` Vincent Legoll
0 siblings, 0 replies; 18+ messages in thread
From: Vincent Legoll @ 2016-07-22 12:51 UTC (permalink / raw
To: Ludovic Courtès; +Cc: help-guix
>> Something that I don't understand:
>>
>> root@guixsd ~# guix --version
>> guix (GNU Guix) 20160722.06
>> root@guixsd ~# which guix
>> /run/current-system/profile/bin/guix
>
> This one is recent, and the ‘local-file’ trick should work with it.
Indeed, thanks
>> vince@guixsd ~$ guix --version
>> guix (GNU Guix) 0.10.0
>> vince@guixsd ~$ which guix
>> /run/current-system/profile/bin/guix
>
> This one might be too old, though we can’t really tell.
>
> They show different versions because in fact, all of Guix except the
> ‘guix’ command (which does very little) is taken from
> ~/.config/guix/latest, populated by ‘guix pull’. Remember that ‘guix
> pull’ is per-user.
Yep, after doing guix pull as user, it worked properly...
Sorry for the noise...
--
Vincent Legoll
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2016-07-22 12:51 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-16 8:50 Kernel config Vincent Legoll
2016-07-16 13:23 ` Vincent Legoll
2016-07-16 17:39 ` Ricardo Wurmus
2016-07-16 18:25 ` Vincent Legoll
2016-07-16 20:44 ` Ludovic Courtès
2016-07-17 16:22 ` Vincent Legoll
2016-07-17 17:49 ` Ludovic Courtès
2016-07-17 18:51 ` Vincent Legoll
2016-07-17 18:59 ` Ricardo Wurmus
2016-07-20 21:09 ` Vincent Legoll
2016-07-21 12:06 ` Ludovic Courtès
2016-07-21 12:46 ` Vincent Legoll
2016-07-21 15:30 ` Ludovic Courtès
2016-07-21 18:47 ` Vincent Legoll
2016-07-22 8:22 ` Vincent Legoll
2016-07-22 8:28 ` Vincent Legoll
2016-07-22 12:44 ` Ludovic Courtès
2016-07-22 12:51 ` Vincent Legoll
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).