Vincent Legoll <[email protected]> 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’.