projects/guix·blob python-team · refs

70 lines · 3.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2024, 2026 Janneke Nieuwenhuizen <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
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 ;; TRANSLATORS: "Hurd" is a proper noun and must not be translated.
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 ;; TRANSLATORS: "Hurd" is a proper noun and must not be translated.
49 ;; TRANSLATORS: "Linux Libre" is a literal and must not be translated.
50 (G_ "Please select a kernel. When in doubt, choose \"Linux Libre\".
51
52The Hurd is offered as a technology preview and development aid; many packages \
53are not yet available in Guix, such as a desktop environment or even a \
54windowing system (X, Wayland).")
55 #:listbox-items kernels
56 #:listbox-item->text identity
57 #:listbox-default-item default
58 #:sort-listbox-items? #f ;keep Linux first
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))