You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

109 lines
3.8 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. ;;; This file returns a manifest containing release-critical bit, for all the
  19. ;;; supported architectures and cross-compilation targets.
  20. (use-modules (gnu packages)
  21. (guix packages)
  22. (guix profiles)
  23. ((gnu ci) #:select (%cross-targets))
  24. (srfi srfi-1)
  25. (srfi srfi-26))
  26. (define* (package->manifest-entry* package system
  27. #:key target)
  28. "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
  29. TARGET."
  30. (manifest-entry
  31. (inherit (package->manifest-entry package))
  32. (name (string-append (package-name package) "." system
  33. (if target
  34. (string-append "." target)
  35. "'")))
  36. (item (with-parameters ((%current-system system)
  37. (%current-target-system target))
  38. package))))
  39. (define %base-packages
  40. ;; Packages that must be substitutable on all the platforms Guix supports.
  41. (map specification->package
  42. '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
  43. "openssh" "emacs" "vim" "python" "guile" "guix")))
  44. (define %system-packages
  45. ;; Key packages proposed by the Guix System installer.
  46. (map specification->package
  47. '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
  48. "openbox" "awesome" "i3-wm" "ratpoison"
  49. "xlockmore" "slock" "libreoffice"
  50. "connman" "network-manager" "network-manager-applet"
  51. "openssh" "ntp" "tor"
  52. "linux-libre" "grub-hybrid"
  53. ;; FIXME: Add IceCat when Rust is available on i686.
  54. ;;"icecat"
  55. )))
  56. (define %packages-to-cross-build
  57. ;; Packages that must be cross-buildable from x86_64-linux.
  58. (cons (@ (gnu packages gcc) gcc)
  59. (map specification->package
  60. '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
  61. "gawk" "gettext" "gzip" "xz"
  62. "hello" "guile@2.2" "zlib"))))
  63. (define %cross-bootstrap-targets
  64. ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
  65. ;; buildable.
  66. '("i586-pc-gnu"
  67. "arm-linux-gnueabihf"
  68. "aarch64-linux-gnu"))
  69. ;;;
  70. ;;; Manifests.
  71. ;;;
  72. (define %base-manifest
  73. (manifest
  74. (append-map (lambda (system)
  75. (map (cut package->manifest-entry* <> system)
  76. %base-packages))
  77. %hydra-supported-systems)))
  78. (define %cross-manifest
  79. (manifest
  80. (append-map (lambda (target)
  81. (map (cut package->manifest-entry* <> "x86_64-linux"
  82. #:target target)
  83. %packages-to-cross-build))
  84. %cross-targets)))
  85. (define %cross-bootstrap-manifest
  86. (manifest
  87. (map (lambda (target)
  88. (package->manifest-entry*
  89. (specification->package "bootstrap-tarballs")
  90. "x86_64-linux" #:target target))
  91. %cross-bootstrap-targets)))
  92. ;; Return the union of all three manifests.
  93. (concatenate-manifests (list %base-manifest
  94. %cross-manifest
  95. %cross-bootstrap-manifest))