mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: zig: Build reproducibly.
* guix/build/zig-utils.scm: New file. * Makefile.am (MODULES): Add it. * guix/build-system/zig.scm (%zig-build-system-modules): Add it. (zig-build,zig-cross-build): Add #:zig-build-target. * guix/build/zig-build-system.scm (zig-target): Move to (guix build zig-utils). (configure): Move to (guix build zig-utils) as zig-configure. (build): Replace target with zig-build-target. (%standard-phases): Adjust accordingly. * gnu/packages/zig.scm (zig-0.9)[arguments]<#:imported-modules,#:modules>: Add zig-build-system modules. <#:configure-flags>: Set ZIG_TARGET_TRIPLE for native builds too. Move applicable flags from zig-0.10 here. <#:phases>: Apply 'zig-configure. Unset ZIG_LIBC in 'check. Remove 'set-cache-dir. (zig-0.10)[arguments]<#:configure-flags>: Adjust accordingly. (zig-0.10.0-610)[arguments]<#:configure-flags>: Remove ZIG_TARGET_TRIPLE.
This commit is contained in:
parent
05bbf0ec43
commit
3ef8c9307c
5 changed files with 124 additions and 66 deletions
|
@ -23,6 +23,7 @@
|
|||
#:use-module (guix gexp)
|
||||
#:use-module (guix monads)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix platform)
|
||||
#:use-module (guix build-system)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (ice-9 match)
|
||||
|
@ -39,6 +40,7 @@
|
|||
(define %zig-build-system-modules
|
||||
;; Build-side modules imported by default.
|
||||
`((guix build zig-build-system)
|
||||
(guix build zig-utils)
|
||||
,@%default-gnu-imported-modules))
|
||||
|
||||
(define* (zig-build name inputs
|
||||
|
@ -67,6 +69,9 @@
|
|||
#:system #$system
|
||||
#:test-target #$test-target
|
||||
#:zig-build-flags #$zig-build-flags
|
||||
;; For reproducibility.
|
||||
#:zig-build-target #$(platform-target
|
||||
(lookup-platform-by-system system))
|
||||
#:zig-test-flags #$zig-test-flags
|
||||
#:zig-release-type #$zig-release-type
|
||||
#:tests? #$tests?
|
||||
|
@ -137,6 +142,7 @@
|
|||
search-path-specification->sexp
|
||||
native-search-paths)
|
||||
#:zig-build-flags #$zig-build-flags
|
||||
#:zig-build-target #$target
|
||||
#:zig-test-flags #$zig-test-flags
|
||||
#:zig-release-type #$zig-release-type
|
||||
#:zig-destdir #$zig-destdir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue