release-manifest.scm 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. ;;; This file returns a manifest containing release-critical bit, for all the
  20. ;;; supported architectures and cross-compilation targets.
  21. (use-modules (gnu packages)
  22. (guix packages)
  23. (guix profiles)
  24. ((guix platform) #:select (targets))
  25. ((gnu services xorg) #:select (%default-xorg-modules))
  26. (guix utils)
  27. (guix gexp)
  28. (srfi srfi-1)
  29. (srfi srfi-26))
  30. (define* (package->manifest-entry* package system
  31. #:key target)
  32. "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
  33. TARGET."
  34. (manifest-entry
  35. (inherit (package->manifest-entry package))
  36. (name (string-append (package-name package) "." system
  37. (if target
  38. (string-append "." target)
  39. "'")))
  40. (item (with-parameters ((%current-system system)
  41. (%current-target-system target))
  42. package))))
  43. (define %base-packages
  44. ;; Packages that must be substitutable on all the platforms Guix supports.
  45. (map specification->package
  46. '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
  47. "openssh" "emacs" "vim" "python" "guile" "guix")))
  48. (define %base-packages/armhf
  49. ;; XXX: Relax requirements for armhf-linux for lack of enough build power.
  50. (map (lambda (package)
  51. (if (string=? (package-name package) "emacs")
  52. (specification->package "emacs-no-x")
  53. package))
  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. ;; FIXME: Add IceCat when Rust is available on i686.
  71. ;;"icecat"
  72. ))
  73. %default-xorg-modules))
  74. (define %packages-to-cross-build
  75. ;; Packages that must be cross-buildable from x86_64-linux.
  76. ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
  77. ;; is fixed.
  78. (append (list (@ (gnu packages guile) guile-3.0/fixed))
  79. (map specification->package
  80. '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
  81. "gawk" "gettext" "gzip" "xz"
  82. "hello" "zlib"))))
  83. (define %packages-to-cross-build-for-mingw
  84. ;; Many things don't build for MinGW. Restrict to what's known to work.
  85. (map specification->package '("hello")))
  86. (define %cross-bootstrap-targets
  87. ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
  88. ;; buildable.
  89. '("i586-pc-gnu"
  90. "arm-linux-gnueabihf"
  91. "aarch64-linux-gnu"))
  92. ;;;
  93. ;;; Manifests.
  94. ;;;
  95. (define %base-manifest
  96. (manifest
  97. (append-map (lambda (system)
  98. (map (cut package->manifest-entry* <> system)
  99. (cond ((string=? system "i586-gnu")
  100. %base-packages/hurd)
  101. ((string=? system "armhf-linux")
  102. ;; FIXME: Drop special case when ci.guix.gnu.org
  103. ;; has more ARMv7 build power.
  104. %base-packages/armhf)
  105. ((string=? system "powerpc64le-linux")
  106. ;; FIXME: Drop 'bootstrap-tarballs' until
  107. ;; <https://bugs.gnu.org/48055> is fixed.
  108. (drop %base-packages 1))
  109. (else
  110. %base-packages))))
  111. %cuirass-supported-systems)))
  112. (define %system-manifest
  113. (manifest
  114. (append-map (lambda (system)
  115. ;; Some of %SYSTEM-PACKAGES are currently unsupported on some
  116. ;; systems--e.g., GNOME on non-x86_64, due to Rust. Filter
  117. ;; them out.
  118. (filter-map (lambda (package)
  119. (and (supported-package? package system)
  120. (package->manifest-entry* package system)))
  121. %system-packages))
  122. '("x86_64-linux" "i686-linux")))) ;Guix System
  123. (define %cross-manifest
  124. (manifest
  125. (append-map (lambda (target)
  126. (map (cut package->manifest-entry* <> "x86_64-linux"
  127. #:target target)
  128. (if (target-mingw? target)
  129. %packages-to-cross-build-for-mingw
  130. %packages-to-cross-build)))
  131. (fold delete (targets)
  132. '(;; Like in (gnu ci), dismiss cross-compilation to x86:
  133. ;; it's pointless.
  134. "x86_64-linux-gnu"
  135. "i686-linux-gnu"
  136. ;; XXX: Important bits like libsigsegv and libffi don't
  137. ;; support RISCV at the moment, so don't require RISCV
  138. ;; support.
  139. "riscv64-linux-gnu")))))
  140. (define %cross-bootstrap-manifest
  141. (manifest
  142. (map (lambda (target)
  143. (package->manifest-entry*
  144. (specification->package "bootstrap-tarballs")
  145. "x86_64-linux" #:target target))
  146. %cross-bootstrap-targets)))
  147. ;; Return the union of all three manifests.
  148. (concatenate-manifests (list %base-manifest
  149. %system-manifest
  150. %cross-manifest
  151. %cross-bootstrap-manifest))