release-manifest.scm 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020, 2021 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. ((gnu ci) #:select (%cross-targets))
  25. ((gnu services xorg) #:select (%default-xorg-modules))
  26. (guix utils)
  27. (srfi srfi-1)
  28. (srfi srfi-26))
  29. (define* (package->manifest-entry* package system
  30. #:key target)
  31. "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
  32. TARGET."
  33. (manifest-entry
  34. (inherit (package->manifest-entry package))
  35. (name (string-append (package-name package) "." system
  36. (if target
  37. (string-append "." target)
  38. "'")))
  39. (item (with-parameters ((%current-system system)
  40. (%current-target-system target))
  41. package))))
  42. (define %base-packages
  43. ;; Packages that must be substitutable on all the platforms Guix supports.
  44. (map specification->package
  45. '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
  46. "openssh" "emacs" "vim" "python" "guile" "guix")))
  47. (define %base-packages/armhf
  48. ;; XXX: Relax requirements for armhf-linux for lack of enough build power.
  49. (map (lambda (package)
  50. (if (string=? (package-name package) "emacs")
  51. (specification->package "emacs-no-x")
  52. package))
  53. %base-packages))
  54. (define %base-packages/hurd
  55. ;; XXX: For now we are less demanding of "i586-gnu".
  56. (map specification->package
  57. '("coreutils" "grep" "findutils" "gawk" "make"
  58. "gcc-toolchain" "tar" "xz")))
  59. (define %system-packages
  60. ;; Key packages proposed by the Guix System installer.
  61. (append (map specification->package
  62. '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
  63. "openbox" "awesome" "i3-wm" "ratpoison"
  64. "emacs" "emacs-exwm" "emacs-desktop-environment"
  65. "xlockmore" "slock" "libreoffice"
  66. "connman" "network-manager" "network-manager-applet"
  67. "openssh" "ntp" "tor"
  68. "linux-libre" "grub-hybrid"
  69. ;; FIXME: Add IceCat when Rust is available on i686.
  70. ;;"icecat"
  71. ))
  72. %default-xorg-modules))
  73. (define %packages-to-cross-build
  74. ;; Packages that must be cross-buildable from x86_64-linux.
  75. ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
  76. ;; is fixed.
  77. (append (list (@ (gnu packages guile) guile-3.0/fixed))
  78. (map specification->package
  79. '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
  80. "gawk" "gettext" "gzip" "xz"
  81. "hello" "zlib"))))
  82. (define %packages-to-cross-build-for-mingw
  83. ;; Many things don't build for MinGW. Restrict to what's known to work.
  84. (map specification->package '("hello")))
  85. (define %cross-bootstrap-targets
  86. ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
  87. ;; buildable.
  88. '("i586-pc-gnu"
  89. "arm-linux-gnueabihf"
  90. "aarch64-linux-gnu"))
  91. ;;;
  92. ;;; Manifests.
  93. ;;;
  94. (define %base-manifest
  95. (manifest
  96. (append-map (lambda (system)
  97. (map (cut package->manifest-entry* <> system)
  98. (cond ((string=? system "i586-gnu")
  99. %base-packages/hurd)
  100. ((string=? system "armhf-linux")
  101. ;; FIXME: Drop special case when ci.guix.gnu.org
  102. ;; has more ARMv7 build power.
  103. %base-packages/armhf)
  104. ((string=? system "powerpc64le-linux")
  105. ;; FIXME: Drop 'bootstrap-tarballs' until
  106. ;; <https://bugs.gnu.org/48055> is fixed.
  107. (drop %base-packages 1))
  108. (else
  109. %base-packages))))
  110. %cuirass-supported-systems)))
  111. (define %system-manifest
  112. (manifest
  113. (append-map (lambda (system)
  114. (map (cut package->manifest-entry* <> system)
  115. %system-packages))
  116. '("x86_64-linux" "i686-linux")))) ;Guix System
  117. (define %cross-manifest
  118. (manifest
  119. (append-map (lambda (target)
  120. (map (cut package->manifest-entry* <> "x86_64-linux"
  121. #:target target)
  122. (if (target-mingw? target)
  123. %packages-to-cross-build-for-mingw
  124. %packages-to-cross-build)))
  125. ;; XXX: Important bits like libsigsegv and libffi don't support
  126. ;; RISCV at the moment, so don't require RISCV support.
  127. (delete "riscv64-linux-gnu" %cross-targets))))
  128. (define %cross-bootstrap-manifest
  129. (manifest
  130. (map (lambda (target)
  131. (package->manifest-entry*
  132. (specification->package "bootstrap-tarballs")
  133. "x86_64-linux" #:target target))
  134. %cross-bootstrap-targets)))
  135. ;; Return the union of all three manifests.
  136. (concatenate-manifests (list %base-manifest
  137. %system-manifest
  138. %cross-manifest
  139. %cross-bootstrap-manifest))