1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +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 20938f2a9d
commit 634f5f2d3d
2 changed files with 56 additions and 12 deletions

View file

@ -40,10 +40,9 @@
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages pkg-config)
#:export (guile))
#:use-module (gnu packages pkg-config))
(define guile
(define-public guile
(let ((vcs-file? (or (git-predicate
(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/")
(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

View file

@ -19,10 +19,8 @@
;; integration service running at <https://ci.guix.gnu.org>.
(use-modules (guix)
(guix profiles))
(define guile
(load "../guix.scm"))
(guix profiles)
(guile-package))
(define* (package->manifest-entry* package system
#:key target)
@ -40,11 +38,25 @@ TARGET."
(define native-builds
(manifest
(map (lambda (system)
(package->manifest-entry* guile system))
'("x86_64-linux" "i686-linux"
"aarch64-linux" "armhf-linux"
"powerpc64le-linux"))))
(append (map (lambda (system)
(package->manifest-entry* guile system))
'("x86_64-linux" "i686-linux"
"aarch64-linux" "armhf-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
(manifest