release-manifest.scm 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 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/hurd
  48. ;; XXX: For now we are less demanding of "i586-gnu".
  49. (map specification->package
  50. '("coreutils" "grep" "findutils" "gawk" "make"
  51. "gcc-toolchain" "tar" "xz")))
  52. (define %system-packages
  53. ;; Key packages proposed by the Guix System installer.
  54. (append (map specification->package
  55. '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
  56. "openbox" "awesome" "i3-wm" "ratpoison"
  57. "emacs" "emacs-exwm" "emacs-desktop-environment"
  58. "xlockmore" "slock" "libreoffice"
  59. "connman" "network-manager" "network-manager-applet"
  60. "openssh" "ntp" "tor"
  61. "linux-libre" "grub-hybrid"
  62. ;; FIXME: Add IceCat when Rust is available on i686.
  63. ;;"icecat"
  64. ))
  65. %default-xorg-modules))
  66. (define %packages-to-cross-build
  67. ;; Packages that must be cross-buildable from x86_64-linux.
  68. ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
  69. ;; is fixed.
  70. (append (list (@ (gnu packages guile) guile-3.0/fixed))
  71. (map specification->package
  72. '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
  73. "gawk" "gettext" "gzip" "xz"
  74. "hello" "zlib"))))
  75. (define %packages-to-cross-build-for-mingw
  76. ;; Many things don't build for MinGW. Restrict to what's known to work.
  77. (map specification->package '("hello")))
  78. (define %cross-bootstrap-targets
  79. ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
  80. ;; buildable.
  81. '("i586-pc-gnu"
  82. "arm-linux-gnueabihf"
  83. "aarch64-linux-gnu"))
  84. ;;;
  85. ;;; Manifests.
  86. ;;;
  87. (define %base-manifest
  88. (manifest
  89. (append-map (lambda (system)
  90. (map (cut package->manifest-entry* <> system)
  91. (if (string=? system "i586-gnu")
  92. %base-packages/hurd
  93. %base-packages)))
  94. %cuirass-supported-systems)))
  95. (define %system-manifest
  96. (manifest
  97. (append-map (lambda (system)
  98. (map (cut package->manifest-entry* <> system)
  99. %system-packages))
  100. '("x86_64-linux" "i686-linux")))) ;Guix System
  101. (define %cross-manifest
  102. (manifest
  103. (append-map (lambda (target)
  104. (map (cut package->manifest-entry* <> "x86_64-linux"
  105. #:target target)
  106. (if (target-mingw? target)
  107. %packages-to-cross-build-for-mingw
  108. %packages-to-cross-build)))
  109. ;; XXX: Important bits like libsigsegv and libffi don't support
  110. ;; RISCV at the moment, so don't require RISCV support.
  111. (delete "riscv64-linux-gnu" %cross-targets))))
  112. (define %cross-bootstrap-manifest
  113. (manifest
  114. (map (lambda (target)
  115. (package->manifest-entry*
  116. (specification->package "bootstrap-tarballs")
  117. "x86_64-linux" #:target target))
  118. %cross-bootstrap-targets)))
  119. ;; Return the union of all three manifests.
  120. (concatenate-manifests (list %base-manifest
  121. %system-manifest
  122. %cross-manifest
  123. %cross-bootstrap-manifest))