zig: update package to 0.12

This commit is contained in:
Daniel Ziltener 2024-04-30 17:27:17 +02:00
parent b1b0938133
commit 282e8e2851
Signed by: zilti
GPG key ID: B38976E82C9DAE42
2 changed files with 19 additions and 10 deletions

View file

@ -19,6 +19,8 @@
#:use-module
(gnu packages compression)
#:use-module
(gnu packages gcc)
#:use-module
(gnu packages llvm)
#:use-module
(gnu packages llvm-meta)
@ -26,11 +28,11 @@
(gnu packages zig)
)
(define-public zig-0.11
(define-public zig-0.12
(package
(inherit zig-0.10)
(name "zig")
(version "0.11.0")
(version "0.12.0")
(source
(origin
(method git-fetch)
@ -39,22 +41,29 @@
(commit version)))
(file-name (git-file-name name version))
(patches (search-patches
"zilti/packages/patches/zig-0.11-use-LIBRARY_PATH.patch"))
"zilti/packages/patches/zig-0.12-use-LIBRARY_PATH.patch"))
(sha256
(base32 "0qh7c27cd4wcdjj0mbpkarvwypfk1js8hkyxs0z149qv75zkbrca"))))
(base32 "0jrj8rqp74qpb95zjmjyrai81079lcwaq1crdwd7laaskd8n5mj4"))))
(arguments
(substitute-keyword-arguments (package-arguments zig-0.10)
((#:parallel-build? _ #f) #t)
((#:configure-flags flags ''())
#~(cons* (string-append "-DCMAKE_PREFIX_PATH="
#$(file-append llvm-16 ""))
#$flags))))
#$(file-append llvm-17 ""))
"-DCMAKE_SKIP_BUILD_RPATH=ON"
"-DZIG_STATIC_LLVM=ON"
(delete "-DZIG_SHARED_LLVM=ON"
#$flags)))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
(delete 'patch-more-shebangs)))))
(inputs
(modify-inputs (package-inputs zig-0.10)
(replace "clang" clang-16)
(replace "lld" lld-16)))
(replace "clang" clang-17)
(replace "lld" lld-17)))
(native-inputs
(modify-inputs (package-native-inputs zig-0.10)
(replace "llvm" llvm-16)))
(append gcc-13)
(replace "llvm" llvm-17)))
(properties `((max-silent-time . 9600)
,@(clang-compiler-cpu-architectures "16")))))
,@(clang-compiler-cpu-architectures "17")))))