Creating and using a custom Linux kernel on Guix System
gnu.org
gnu.org
(make-linux-libre
%linux-libre-version
%linux-libre-hash
'("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
#:patches %linux-libre-5.1-patches
#:configuration-file kernel-config)
Could be this: (make-linux-libre
:version linux-libre-version
:hash linux-libre-hash
:list (list "x86_64-linux"
"i686-linux"
"armhf-linux"
"aarch64-linux")
:patches linux-libre-5-1-patches
:config-file kernel-config)
Then it's easier to see that the semantics is actually familiar to you: it's just a call of function `make-linux-libre` with keyword arguments like `:version`.Minus characters are parts of identifiers (like underscores in many other languages), parentheses delimit lists of things, and the first identifier in parentheses list is usually either a function name or a macro name.
If you want to invest half an hour into being able to read most Scheme code, you could skim the old R5RS paper, and skip the parts on first-class continuations, formal semantics, and `do`. https://schemers.org/Documents/Standards/R5RS/
On your first skim, also don't spend much time trying to understand R5RS `syntax-rules` -- it's neat, and worth learning someday, but there are now much more powerful and easier ways to extend syntax, especially in Racket.
My understanding is that Guix is 7 years in the making (at least) so is there even a remote possibility that syntax revisions like the one above will be considered?
Scheme is great as an imperative (or declarative) configuration language, because the language is super-powerful, yet small and elegant. So many configuration languages end up being ad-hoc.
For example:
You have a scheme file in /path/to/guix-custom which includes the declares linux-nonfree.
You run `export GUIX_PACKAGE_PATH=/path/to/guix-custom` and now guix will be able to find this package.
You use the module and include in the declaration
`(kernel linux-nonfree)`
PM and I will share my configuration :)