release-manifest.scm 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  4. ;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. ;;; This file returns a manifest containing release-critical bit, for all the
  21. ;;; supported architectures and cross-compilation targets.
  22. (use-modules (gnu packages)
  23. (guix packages)
  24. (guix profiles)
  25. ((guix platform) #:select (targets))
  26. ((gnu services xorg) #:select (%default-xorg-modules))
  27. (guix utils)
  28. (guix gexp)
  29. (srfi srfi-1)
  30. (srfi srfi-26))
  31. (define* (package->manifest-entry* package system
  32. #:key target)
  33. "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
  34. TARGET."
  35. (manifest-entry
  36. (inherit (package->manifest-entry package))
  37. (name (string-append (package-name package) "." system
  38. (if target
  39. (string-append "." target)
  40. "'")))
  41. (item (with-parameters ((%current-system system)
  42. (%current-target-system target))
  43. package))))
  44. (define %base-packages
  45. ;; Packages that must be substitutable on all the platforms Guix supports.
  46. (map specification->package
  47. '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
  48. "openssh" "emacs" "vim" "python" "guile" "guix")))
  49. (define %base-packages/armhf
  50. ;; The guix package doesn't build natively on armhf due to Guile memory
  51. ;; issues compiling the package modules
  52. (remove (lambda (package)
  53. (string=? (package-name package) "guix"))
  54. %base-packages))
  55. (define %base-packages/hurd
  56. ;; XXX: For now we are less demanding of "i586-gnu".
  57. (map specification->package
  58. '("coreutils" "grep" "findutils" "gawk" "make"
  59. #;"gcc-toolchain" "tar" "xz")))
  60. (define %system-packages
  61. ;; Key packages proposed by the Guix System installer.
  62. (append (map specification->package
  63. '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
  64. "openbox" "awesome" "i3-wm" "ratpoison"
  65. "emacs" "emacs-exwm" "emacs-desktop-environment"
  66. "xlockmore" "slock" "libreoffice"
  67. "connman" "network-manager" "network-manager-applet"
  68. "openssh" "ntp" "tor"
  69. "linux-libre" "grub-hybrid"
  70. "icecat"))
  71. %default-xorg-modules))
  72. (define %packages-to-cross-build
  73. ;; Packages that must be cross-buildable from x86_64-linux.
  74. ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
  75. ;; is fixed.
  76. (append (list (@ (gnu packages guile) guile-3.0/pinned))
  77. (map specification->package
  78. '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
  79. "gawk" "gettext" "gzip" "xz"
  80. "hello" "zlib"))))
  81. (define %packages-to-cross-build-for-mingw
  82. ;; Many things don't build for MinGW. Restrict to what's known to work.
  83. (map specification->package '("hello")))
  84. (define %cross-bootstrap-targets
  85. ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
  86. ;; buildable.
  87. '("i586-pc-gnu"
  88. "arm-linux-gnueabihf"
  89. "aarch64-linux-gnu"))
  90. ;;;
  91. ;;; Manifests.
  92. ;;;
  93. (define %base-manifest
  94. (manifest
  95. (append-map (lambda (system)
  96. (map (cut package->manifest-entry* <> system)
  97. (cond ((string=? system "i586-gnu")
  98. %base-packages/hurd)
  99. ((string=? system "armhf-linux")
  100. %base-packages/armhf)
  101. ((string=? system "powerpc64le-linux")
  102. ;; FIXME: Drop 'bootstrap-tarballs' until
  103. ;; <https://bugs.gnu.org/48055> is fixed.
  104. (drop %base-packages 1))
  105. (else
  106. %base-packages))))
  107. %cuirass-supported-systems)))
  108. (define %system-manifest
  109. (manifest
  110. (append-map (lambda (system)
  111. ;; Some of %SYSTEM-PACKAGES are currently unsupported on some
  112. ;; systems--e.g., GNOME on non-x86_64, due to Rust. Filter
  113. ;; them out.
  114. (filter-map (lambda (package)
  115. (and (supported-package? package system)
  116. (package->manifest-entry* package system)))
  117. %system-packages))
  118. '("x86_64-linux" "i686-linux")))) ;Guix System
  119. (define %cross-manifest
  120. (manifest
  121. (append-map (lambda (target)
  122. (map (cut package->manifest-entry* <> "x86_64-linux"
  123. #:target target)
  124. (if (target-mingw? target)
  125. %packages-to-cross-build-for-mingw
  126. %packages-to-cross-build)))
  127. (fold delete (targets)
  128. '(;; Like in (gnu ci), dismiss cross-compilation to x86:
  129. ;; it's pointless.
  130. "x86_64-linux-gnu"
  131. "i686-linux-gnu"
  132. ;; XXX: Important bits like libsigsegv and libffi don't
  133. ;; support RISCV at the moment, so don't require RISCV
  134. ;; support.
  135. "riscv64-linux-gnu")))))
  136. (define %cross-bootstrap-manifest
  137. (manifest
  138. (map (lambda (target)
  139. (package->manifest-entry*
  140. (specification->package "bootstrap-tarballs")
  141. "x86_64-linux" #:target target))
  142. %cross-bootstrap-targets)))
  143. ;; Return the union of all three manifests.
  144. (concatenate-manifests (list %base-manifest
  145. %system-manifest
  146. %cross-manifest
  147. %cross-bootstrap-manifest))