Debian Codegraph @

.guix/manifest.scm

raw
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
18 ;; This file defines a Guix manifest for use by Cuirass, the continuous
19 ;; integration service running at <https://ci.guix.gnu.org>.
20
21 (use-modules (guix)
22 (guix profiles)
23 (guix utils)
24 (guile-package))
25
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
40 (define native-builds
41 (manifest
42 (append (map (lambda (system)
43 (package->manifest-entry* guile system))
44
45 '("x86_64-linux" "i686-linux"
46 "aarch64-linux" "armhf-linux"
47 "powerpc64le-linux"))
48 (map (lambda (guile)
49 (package->manifest-entry* guile "x86_64-linux"))
50 (cons (package
51 (inherit (package-with-c-toolchain
52 guile
53 `(("clang-toolchain"
54 ,(specification->package
55 "clang-toolchain")))))
56 (name "guile-clang"))
57 (list guile-without-threads
58 guile-without-networking
59 guile-debug
60 guile-strict-typing))))))
61
62 (define (out-of-source-tree p)
63 "Return P built out of its source tree."
64 (package
65 (inherit p)
66 (arguments (substitute-keyword-arguments (package-arguments p)
67 ((#:out-of-source? _ #f) #t)))))
68
69 (define cross-builds
70 (manifest
71 (map (lambda (target)
72 ;; For testing purposes, build one of them out-of-tree.
73 (let ((transform (if (string-prefix? "aarch64" target)
74 out-of-source-tree
75 identity)))
76 (package->manifest-entry* (transform guile)
77 "x86_64-linux"
78 #:target target)))
79 '("i586-pc-gnu"
80 ;; "arm-linux-gnueabihf"
81 "aarch64-linux-gnu"
82 "riscv64-linux-gnu"
83 "i686-w64-mingw32"
84 "x86_64-linux-gnu"))))
85
86 (concatenate-manifests (list native-builds cross-builds))