1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

maint: Add variants of the default package for Guix.

* build-aux/guix/guile-package.scm (package-with-configure-flags): New
procedure.
(guile-without-threads, guile-without-networking)
(guile-debug, guile-strict-typing): New variables.
* build-aux/manifest.scm: Use (guile-package) module instead of 'load'.
(native-builds): Add the variants above + "guile-clang".
This commit is contained in:
Ludovic Courtès 2023-01-29 17:51:51 +01:00
parent a211c8aaff
commit 32f33756d0
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 56 additions and 12 deletions

View file

@ -40,10 +40,9 @@
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config))
#:export (guile))
(define guile (define-public guile
(let ((vcs-file? (or (git-predicate (let ((vcs-file? (or (git-predicate
(string-append (current-source-directory) (string-append (current-source-directory)
"/../..")) "/../.."))
@ -147,4 +146,37 @@ without requiring the source code to be rewritten.")
(home-page "https://www.gnu.org/software/guile/") (home-page "https://www.gnu.org/software/guile/")
(license license:lgpl3+)))) (license license:lgpl3+))))
(define (package-with-configure-flags p flags)
"Return P with FLAGS as addition 'configure' flags."
(package/inherit p
(arguments
(substitute-keyword-arguments (package-arguments p)
((#:configure-flags original-flags #~'())
#~(append #$original-flags #$flags))))))
(define-public guile-without-threads
(package
(inherit (package-with-configure-flags guile
#~'("--without-threads")))
(name "guile-without-threads")))
(define-public guile-without-networking
(package
(inherit (package-with-configure-flags guile
#~'("--disable-networking")))
(name "guile-without-networking")))
(define-public guile-debug
(package
(inherit (package-with-configure-flags guile
#~'("--enable-guile-debug")))
(name "guile-debug")))
(define-public guile-strict-typing
(package
(inherit (package-with-configure-flags
guile
#~'("CPPFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=2")))
(name "guile-strict-typing")))
guile guile

View file

@ -19,10 +19,8 @@
;; integration service running at <https://ci.guix.gnu.org>. ;; integration service running at <https://ci.guix.gnu.org>.
(use-modules (guix) (use-modules (guix)
(guix profiles)) (guix profiles)
(guile-package))
(define guile
(load "../guix.scm"))
(define* (package->manifest-entry* package system (define* (package->manifest-entry* package system
#:key target) #:key target)
@ -40,11 +38,25 @@ TARGET."
(define native-builds (define native-builds
(manifest (manifest
(map (lambda (system) (append (map (lambda (system)
(package->manifest-entry* guile system)) (package->manifest-entry* guile system))
'("x86_64-linux" "i686-linux" '("x86_64-linux" "i686-linux"
"aarch64-linux" "armhf-linux" "aarch64-linux" "armhf-linux"
"powerpc64le-linux")))) "powerpc64le-linux"))
(map (lambda (guile)
(package->manifest-entry* guile "x86_64-linux"))
(cons (package
(inherit (package-with-c-toolchain
guile
`(("clang-toolchain"
,(specification->package
"clang-toolchain")))))
(name "guile-clang"))
(list guile-without-threads
guile-without-networking
guile-debug
guile-strict-typing))))))
(define cross-builds (define cross-builds
(manifest (manifest