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