[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

G-Expressions for boot-parameters or grub-configuration-file ?

From: Danny Milosavljevic
Subject: G-Expressions for boot-parameters or grub-configuration-file ?
Date: Mon, 17 Apr 2017 00:40:04 +0200


I'm trying to simplify the bootloader support in master a bit and am running 
into trouble when trying to refactor operating-system-bootcfg:

When applying the attached patch and then doing

  guix system reconfigure /etc/config.scm --fallback

... I get:

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

I'm pretty sure it's because of my change in gnu/system.scm 
operating-system-bootcfg.  I'm not sure what to put there:

(define* (operating-system-bootcfg os #:optional (old-entries '()))
  "Return the bootloader configuration file for OS.  Use OLD-ENTRIES to
populate the \"old entries\" menu."
  (mlet* %store-monad
      ((system      (operating-system-derivation os))
       (root-fs ->  (operating-system-root-file-system os))
       (root-device -> (if (eq? 'uuid (file-system-title root-fs))
                           (uuid->string (file-system-device root-fs))
                           (file-system-device root-fs)))
       (entries   -> (list (operating-system-boot-parameters
                            #$(derivation->output-path system) ; XXXX #$system 
doesn't work either
    (grub-configuration-file (operating-system-bootloader os) entries
                             #:old-entries old-entries)))

If I remove just the "#$" in front of "(derivation->output-path ...)", I get:

ERROR: In procedure scm_lreadr: 
/gnu/store/nn1z49lf1ds9nqcq41lm7n93vy0cgrsa-grub.cfg-builder:1:1797: Unknown # 
object: #\<
builder for `/gnu/store/3y9rfqn253s7labrw7mppm4gql0cipan-grub.cfg.drv' failed 
with exit code 1
guix system: error: build failed: build of 
`/gnu/store/3y9rfqn253s7labrw7mppm4gql0cipan-grub.cfg.drv' failed

It seems it couldn't serialize something... that something is:

'<procedure 7cc4640 at gnu/system.scm:683:2 (state)>) (format port "\\nsubmenu 
\\"GNU system, old config'

But that is a gexp in grub-configuration-file.

See attachment for WIP patch to current master.


Attachment: bootloader-simplification.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]