~ruther/guix-local

ref: master guix-local/etc/manifests/release-minimal.scm -rw-r--r-- 4.7 KiB
01b97dff — Hilton Chain import: crate: Generate comments with ‘TODO REVIEW:’ prefix. 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020-2022, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2025 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

;;; This file returns a manifest containing packages which are needed by the
;;; installer.

(use-modules (guix packages)
             (gnu packages)
             ((gnu system) #:select (%base-packages %base-firmware))
             (guix profiles)
             (guix utils)
             (srfi srfi-1))

(define* (package->manifest-entry* package system
                                   #:key target)
  "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
TARGET."
  (manifest-entry
    (inherit (package->manifest-entry package))
    (name (string-append (package-name package) "." system
                         (if target
                             (string-append "." target)
                             "'")))
    (item (with-parameters ((%current-system system)
                            (%current-target-system target))
            package))))

(define %system-packages
  ;; Key packages proposed by the Guix System installer.
  (append (map specification->package
               '("guix" "shepherd" "guile-static-initrd"
                 "openssh" "tor" "ntp" "gpm" "mingetty"
                 "connman" "network-manager" "wpa-supplicant" "isc-dhcp" "cups"
                 "linux-libre" "grub-hybrid"
                 ;; privileged programs
                 "shadow" "sudo" "fuse" "inetutils" "util-linux"))
          %base-firmware
          %base-packages))

(define %bootloader-packages
  ;; The bootloaders offered by the Guix System installer.
  (append
    (map specification->package
         '("grub-pc" "grub-minimal" "grub-efi"))
    ;; Add all the u-boot packages.
    ;; TODO: Filter by target.
    (if (or (target-arm32?)
            (target-aarch64?)
            (target-riscv64?))
        `(,@(fold-packages
              (lambda (package lst)
                (if (string-prefix? "u-boot-"
                                    (package-name package))
                    (cons package lst)
                    lst))
              (list)))
        '())))

(define %filesystem-packages
  ;; The installer offers to create filesystems which are then needed.
  ;; See also: (gnu system linux-initrd)
  (cons* (@ (gnu packages linux) e2fsck/static)
         (@ (gnu packages disk) fatfsck/static)
         (@ (gnu packages file-systems) bcachefs/static)
         (@ (gnu packages linux) btrfs-progs/static)
         (@ (gnu packages file-systems) jfs_fsck/static)
         (@ (gnu packages linux) ntfsfix/static)
         (@ (gnu packages linux) f2fs-fsck/static)
         (@ (gnu packages linux) xfs_repair/static)
         (map specification->package
              '("lvm2-static"
                "cryptsetup-static"
                "mdadm-static"))))


;;;
;;; Manifests.
;;;

(define %system-manifest
  (manifest
    (append
      ;; The linux-libre-*-generic kernel is commonly used on some architectures.
      (cond
        ((target-aarch64?)
         (list (package->manifest-entry (@ (gnu packages linux)
                                           linux-libre-arm64-generic))))
        ((target-riscv64?)
         (list (package->manifest-entry (@ (gnu packages linux)
                                           linux-libre-riscv64-generic))))
        ((target-arm32?)
         (list (package->manifest-entry (@ (gnu packages linux)
                                           linux-libre-arm-generic))))
        (else '()))

      ;; Some of %SYSTEM-PACKAGES are currently unsupported on some
      ;; systems--e.g., GNOME on 32-bit, due to Rust.  Filter them out.
      (filter-map (lambda (package)
                    (and (supported-package? package (%current-system))
                         (package->manifest-entry package)))
                  (append %system-packages
                          %bootloader-packages
                          %filesystem-packages)))))

%system-manifest