diff options
| author | Hilton Chain <hako@ultrarare.space> | 2024-11-12 17:37:33 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2024-12-31 10:54:11 +0800 |
| commit | 3927e614811f3e5d7b9d56690d9921347b8ef808 (patch) | |
| tree | 6fff868778ebb153b15030ca654044939e343535 /gnu/packages/zig.scm | |
| parent | cf74ecc94782bf3dc5588dc8988f39d34d3fa238 (diff) | |
gnu: zig-0.10: Fix RUNPATH issue.
* gnu/packages/patches/zig-0.10-fix-runpath.patch: New file.
* gnu/packages/patches/zig-0.10-use-system-paths.patch: New file.
* gnu/local.mk (dist_patch_DATA): Regisiter them.
* gnu/packages/zig.scm (zig-0.10)[source]: Add patches.
Use zig-source.
[arguments]<#:validate-runpath?>: Unset.
<#:phases>: Adjust 'patch-more-shebangs to use a file in inputs instead.
Change-Id: Ic4fd22d8bba664e3d42f433875f9d099969b9df9
Diffstat (limited to 'gnu/packages/zig.scm')
| -rw-r--r-- | gnu/packages/zig.scm | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm index 3942938fc20..68e50a79320 100644 --- a/gnu/packages/zig.scm +++ b/gnu/packages/zig.scm @@ -205,14 +205,14 @@ toolchain. Among other features it provides (version "0.10.1") (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ziglang/zig.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1sh5xjsksl52i4cfv1qj36sz5h0ln7cq4pdhgs3960mk8a90im7b")) - (patches (search-patches "zig-0.9-use-baseline-cpu-by-default.patch")))) + (inherit (zig-source + version version + "1sh5xjsksl52i4cfv1qj36sz5h0ln7cq4pdhgs3960mk8a90im7b")) + (patches + (search-patches + "zig-0.9-use-baseline-cpu-by-default.patch" + "zig-0.10-use-system-paths.patch" + "zig-0.10-fix-runpath.patch")))) (arguments (substitute-keyword-arguments (package-arguments zig-0.9) ((#:configure-flags flags ''()) @@ -220,8 +220,6 @@ toolchain. Among other features it provides "-DZIG_SHARED_LLVM=ON" (string-append "-DZIG_LIB_DIR=" #$output "/lib/zig") #$flags)) - ;; TODO: zig binary can't find ld-linux. - ((#:validate-runpath? _ #t) #f) ((#:tests? _ #t) #t) ((#:phases phases '%standard-phases) #~(modify-phases #$phases @@ -235,10 +233,10 @@ toolchain. Among other features it provides (setenv "CC" #$(cc-for-target)))) (add-after 'patch-source-shebangs 'patch-more-shebangs (lambda* (#:key inputs #:allow-other-keys) - ;; Zig uses information about /usr/bin/env to determine the - ;; version of glibc and other data. + ;; Zig uses information about an ELF file to determine the + ;; version of glibc and other data for native builds. (substitute* "lib/std/zig/system/NativeTargetInfo.zig" - (("/usr/bin/env") (search-input-file inputs "/bin/env"))))) + (("/usr/bin/env") (search-input-file inputs "bin/clang++"))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? |
