manifest.scm 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. ;;; Copyright © 2023-2024 Free Software Foundation, Inc.
  2. ;;;
  3. ;;; This file is part of GNU Guile.
  4. ;;;
  5. ;;; GNU Guile is free software; you can redistribute it and/or modify it
  6. ;;; under the terms of the GNU General Public License as published by
  7. ;;; the Free Software Foundation; either version 3 of the License, or (at
  8. ;;; your option) any later version.
  9. ;;;
  10. ;;; GNU Guile is distributed in the hope that it will be useful, but
  11. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;;; GNU General Public License for more details.
  14. ;;;
  15. ;;; You should have received a copy of the GNU General Public License
  16. ;;; along with GNU Guile. If not, see <http://www.gnu.org/licenses/>.
  17. ;; This file defines a Guix manifest for use by Cuirass, the continuous
  18. ;; integration service running at <https://ci.guix.gnu.org>.
  19. (use-modules (guix)
  20. (guix profiles)
  21. (guix utils)
  22. (guile-package))
  23. (define* (package->manifest-entry* package system
  24. #:key target)
  25. "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
  26. TARGET."
  27. (manifest-entry
  28. (inherit (package->manifest-entry package))
  29. (name (string-append (package-name package) "." system
  30. (if target
  31. (string-append "." target)
  32. "")))
  33. (item (with-parameters ((%current-system system)
  34. (%current-target-system target))
  35. package))))
  36. (define native-builds
  37. (manifest
  38. (append (map (lambda (system)
  39. (package->manifest-entry* guile system))
  40. '("x86_64-linux" "i686-linux"
  41. "aarch64-linux" "armhf-linux"
  42. "powerpc64le-linux"))
  43. (map (lambda (guile)
  44. (package->manifest-entry* guile "x86_64-linux"))
  45. (cons (package
  46. (inherit (package-with-c-toolchain
  47. guile
  48. `(("clang-toolchain"
  49. ,(specification->package
  50. "clang-toolchain")))))
  51. (name "guile-clang"))
  52. (list guile-without-threads
  53. guile-without-networking
  54. guile-debug
  55. guile-strict-typing))))))
  56. (define (out-of-source-tree p)
  57. "Return P built out of its source tree."
  58. (package
  59. (inherit p)
  60. (arguments (substitute-keyword-arguments (package-arguments p)
  61. ((#:out-of-source? _ #f) #t)))))
  62. (define cross-builds
  63. (manifest
  64. (map (lambda (target)
  65. ;; For testing purposes, build one of them out-of-tree.
  66. (let ((transform (if (string-prefix? "aarch64" target)
  67. out-of-source-tree
  68. identity)))
  69. (package->manifest-entry* (transform guile)
  70. "x86_64-linux"
  71. #:target target)))
  72. '("i586-pc-gnu"
  73. ;; "arm-linux-gnueabihf"
  74. "aarch64-linux-gnu"
  75. "riscv64-linux-gnu"
  76. "i686-w64-mingw32"
  77. "x86_64-linux-gnu"))))
  78. (concatenate-manifests (list native-builds cross-builds))