summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Leidi <therewasa@fishinthecalculator.me>2026-07-18 22:53:55 +0200
committerAndreas Enge <andreas@enge.fr>2026-07-28 13:38:07 +0200
commitb892edd56bf9a4d06c5fe5539e5c4ba7a126eb2a (patch)
tree5bbbc738ea521c47dd50ee4626cab5904e275acd
parent51f98f57c04b767171fd0a29de37c525bf41a40d (diff)
teams: beam: Add beam-manifest.
* etc/teams/beam/beam-manifest.scm: New file. Signed-off-by: Andreas Enge <andreas@enge.fr>
-rw-r--r--etc/teams/beam/beam-manifest.scm73
1 files changed, 73 insertions, 0 deletions
diff --git a/etc/teams/beam/beam-manifest.scm b/etc/teams/beam/beam-manifest.scm
new file mode 100644
index 00000000000..82f8674a220
--- /dev/null
+++ b/etc/teams/beam/beam-manifest.scm
@@ -0,0 +1,73 @@
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2026 Giacomo Leidi <therewasa@fishinthecalculator.me>
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
19;;; This file returns a manifest of packages built using the mix-build-system.
20;;; It is used to assist continuous integration of the beam-team branch.
21;;;
22;;;
23;;; You can use it to build all covered packages with:
24;;;
25;;; ./pre-inst-env guix build -m etc/teams/beam/beam-manifest.scm
26;;;
27;;; or to update them with:
28;;;
29;;; ./pre-inst-env guix refresh -u -m etc/teams/beam/beam-manifest.scm
30
31(use-modules (guix packages)
32 (guix profiles)
33 (guix gexp)
34 (guix build-system)
35 (ice-9 match)
36 (srfi srfi-1)
37 (srfi srfi-26))
38
39(define* (has-mix-build-system? build-system #:key modules #:allow-other-keys)
40 (or (eq? (build-system-name build-system) 'mix)
41 (any
42 (match-lambda
43 (('guix 'build 'mix-build-system) #t)
44 ('((guix build mix-build-system) . _) #t)
45 (_ #f))
46 (cond
47 ((gexp? modules) (gexp->approximate-sexp modules))
48 ((pair? modules) modules)
49 (else '())))))
50
51(define* (has-rebar-build-system? build-system #:key modules #:allow-other-keys)
52 (or (eq? (build-system-name build-system) 'rebar)
53 (any
54 (match-lambda
55 (('guix 'build 'rebar-build-system) #t)
56 ('((guix build rebar-build-system) . _) #t)
57 (_ #f))
58 (cond
59 ((gexp? modules) (gexp->approximate-sexp modules))
60 ((pair? modules) modules)
61 (else '())))))
62
63(manifest
64 (map package->manifest-entry
65 (fold-packages
66 (lambda (package lst)
67 (if (apply (lambda args (or (apply has-mix-build-system? args)
68 (apply has-rebar-build-system? args)))
69 (package-build-system package)
70 (package-arguments package))
71 (cons package lst)
72 lst))
73 (list))))