| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu installer newt kernel)
|
| 20 | #:use-module (gnu installer newt page)
|
| 21 | #:use-module (guix i18n)
|
| 22 | #:use-module (guix utils)
|
| 23 | #:export (run-kernel-page))
|
| 24 |
|
| 25 | (define (run-kernel-page)
|
| 26 | |
| 27 | (let* ((hurd-x86 (G_ "Hurd 32-bit (experimental)"))
|
| 28 | (hurd-x86_64 (G_ "Hurd 64-bit (highly experimental!)"))
|
| 29 | (linux-libre "Linux Libre")
|
| 30 | (kernels (parameterize ((%current-target-system #f))
|
| 31 | `(,linux-libre
|
| 32 | ,@(cond ((target-x86-64?)
|
| 33 | (list hurd-x86 hurd-x86_64))
|
| 34 | ((target-x86?)
|
| 35 | (list hurd-x86))
|
| 36 | (else
|
| 37 | '())))))
|
| 38 | (default (cond ((equal? (%current-target-system) "i586-pc-gnu")
|
| 39 | hurd-x86)
|
| 40 | ((equal? (%current-target-system) "x86_64-pc-gnu")
|
| 41 | hurd-x86_64)
|
| 42 | (else
|
| 43 | linux-libre)))
|
| 44 | (result
|
| 45 | (run-listbox-selection-page
|
| 46 | #:title (G_ "Kernel")
|
| 47 | #:info-text
|
| 48 | |
| 49 | |
| 50 | (G_ "Please select a kernel. When in doubt, choose \"Linux Libre\".
|
| 51 |
|
| 52 | The Hurd is offered as a technology preview and development aid; many packages \
|
| 53 | are not yet available in Guix, such as a desktop environment or even a \
|
| 54 | windowing system (X, Wayland).")
|
| 55 | #:listbox-items kernels
|
| 56 | #:listbox-item->text identity
|
| 57 | #:listbox-default-item default
|
| 58 | #:sort-listbox-items? #f |
| 59 | #:button-text (G_ "Back")
|
| 60 | #:button-callback-procedure
|
| 61 | (lambda _
|
| 62 | (abort-to-prompt 'installer-step 'abort)))))
|
| 63 | (let ((target (cond ((equal? result hurd-x86)
|
| 64 | "i586-pc-gnu")
|
| 65 | ((equal? result hurd-x86_64)
|
| 66 | "x86_64-pc-gnu")
|
| 67 | (else
|
| 68 | #f))))
|
| 69 | (%current-target-system target))
|
| 70 | result))
|