diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2024-12-12 09:19:24 +0200 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2024-12-31 10:56:34 +0800 |
| commit | 05bbf0ec43abcc8c49e1e49e95baca24f6fea950 (patch) | |
| tree | 0b580a76965399d865b53434edf9d349b1bd22fa /gnu/packages/zig.scm | |
| parent | a6d9faf7dcfa210b3ceffb3e6c9aff1e9f789dec (diff) | |
gnu: zig: Set host triple.
* gnu/packages/zig.scm (zig-0.10.0-675,zig-0.11)[arguments]<#:phases>: Set
host triple in CMakeLists.txt.
Change-Id: Ib05050d7e499b4336a01a140c73fb6c8bb450bd6
Modified-by: Hilton Chain <hako@ultrarare.space>
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/zig.scm')
| -rw-r--r-- | gnu/packages/zig.scm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm index c88ada73eba..62e224b760a 100644 --- a/gnu/packages/zig.scm +++ b/gnu/packages/zig.scm | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | ;;; Copyright © 2021 Liliana Marie Prikler <liliana.prikler@gmail.com> | 2 | ;;; Copyright © 2021 Liliana Marie Prikler <liliana.prikler@gmail.com> |
| 3 | ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> | 3 | ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> |
| 4 | ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com> | 4 | ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com> |
| 5 | ;;; Copyright © 2022, 2023 Efraim Flashner <efraim@flashner.co.il> | 5 | ;;; Copyright © 2022-2024 Efraim Flashner <efraim@flashner.co.il> |
| 6 | ;;; Copyright © 2023, 2024 Hilton Chain <hako@ultrarare.space> | 6 | ;;; Copyright © 2023, 2024 Hilton Chain <hako@ultrarare.space> |
| 7 | ;;; | 7 | ;;; |
| 8 | ;;; This file is part of GNU Guix. | 8 | ;;; This file is part of GNU Guix. |
| @@ -384,6 +384,13 @@ toolchain. Among other features it provides | |||
| 384 | (substitute-keyword-arguments (package-arguments base) | 384 | (substitute-keyword-arguments (package-arguments base) |
| 385 | ((#:phases phases '%standard-phases) | 385 | ((#:phases phases '%standard-phases) |
| 386 | #~(modify-phases #$phases | 386 | #~(modify-phases #$phases |
| 387 | (add-after 'unpack 'set-host-triple | ||
| 388 | (lambda _ | ||
| 389 | (substitute* "CMakeLists.txt" | ||
| 390 | (("\\$\\{(ZIG_)?HOST_TARGET_TRIPLE\\}") | ||
| 391 | (zig-target | ||
| 392 | #$(platform-target | ||
| 393 | (lookup-platform-by-system (%current-system)))))))) | ||
| 387 | (replace 'prepare-source | 394 | (replace 'prepare-source |
| 388 | (lambda* (#:key native-inputs inputs #:allow-other-keys) | 395 | (lambda* (#:key native-inputs inputs #:allow-other-keys) |
| 389 | (install-file (search-input-file | 396 | (install-file (search-input-file |
| @@ -1126,6 +1133,13 @@ toolchain. Among other features it provides | |||
| 1126 | (substitute-keyword-arguments (package-arguments zig-0.10) | 1133 | (substitute-keyword-arguments (package-arguments zig-0.10) |
| 1127 | ((#:phases phases '%standard-phases) | 1134 | ((#:phases phases '%standard-phases) |
| 1128 | #~(modify-phases #$phases | 1135 | #~(modify-phases #$phases |
| 1136 | (add-after 'unpack 'set-host-triple | ||
| 1137 | (lambda _ | ||
| 1138 | (substitute* "CMakeLists.txt" | ||
| 1139 | (("\\$\\{ZIG_HOST_TARGET_TRIPLE\\}") | ||
| 1140 | (zig-target | ||
| 1141 | #$(platform-target | ||
| 1142 | (lookup-platform-by-system (%current-system)))))))) | ||
| 1129 | (add-after 'unpack 'prepare-source | 1143 | (add-after 'unpack 'prepare-source |
| 1130 | (lambda* (#:key native-inputs inputs #:allow-other-keys) | 1144 | (lambda* (#:key native-inputs inputs #:allow-other-keys) |
| 1131 | (install-file (search-input-file | 1145 | (install-file (search-input-file |
