-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
guix: Add manifest to build relevant variants.
* .guix/manifest.scm: New file. * Makefile.am (EXTRA_DIST): Add it.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
;; Fibers: cooperative, event-driven user-space threads. | ||
|
||
;;;; Copyright (C) 2024 Ludovic Courtès <[email protected]> | ||
;;;; | ||
;;;; This library is free software; you can redistribute it and/or | ||
;;;; modify it under the terms of the GNU Lesser General Public | ||
;;;; License as published by the Free Software Foundation; either | ||
;;;; version 3 of the License, or (at your option) any later version. | ||
;;;; | ||
;;;; This library is distributed in the hope that it will be useful, | ||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
;;;; Lesser General Public License for more details. | ||
;;;; | ||
;;;; You should have received a copy of the GNU Lesser General Public License | ||
;;;; along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
(use-modules (guix) | ||
(guix profiles) | ||
(fibers-package) | ||
(srfi srfi-1)) | ||
|
||
;;; Commentary: | ||
;;; | ||
;;; This file defines a manifest containing a configuration matrix for | ||
;;; different native and cross-compilation targets and different variants. | ||
;;; To build them, run: | ||
;;; | ||
;;; guix build -L .guix/modules -m manifest.scm | ||
;;; | ||
;;; Code: | ||
|
||
(define* (package->manifest-entry* package system | ||
#:key target) | ||
"Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to | ||
TARGET." | ||
(manifest-entry | ||
(inherit (package->manifest-entry package)) | ||
(name (string-append (package-name package) "." system | ||
(if target | ||
(string-append "." target) | ||
""))) | ||
(item (with-parameters ((%current-system system) | ||
(%current-target-system target)) | ||
package)))) | ||
|
||
(define native-builds | ||
(manifest | ||
(append-map (lambda (system) | ||
(map (lambda (package) | ||
(package->manifest-entry* package system)) | ||
(list guile-fibers | ||
guile2.2-fibers | ||
guile-fibers/libevent))) | ||
'("x86_64-linux" | ||
"i686-linux")))) | ||
|
||
(define cross-builds | ||
(manifest | ||
(map (lambda (target) | ||
(package->manifest-entry* (if (string-contains target "linux") | ||
guile-fibers | ||
guile-fibers/libevent) | ||
"x86_64-linux" | ||
#:target target)) | ||
'("i586-pc-gnu" | ||
"aarch64-linux-gnu")))) | ||
|
||
(concatenate-manifests (list native-builds cross-builds)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters