diff options
author | Christine Dodrill <me@christine.website> | 2020-04-13 18:37:09 -0400 |
---|---|---|
committer | Christine Dodrill <me@christine.website> | 2020-04-13 18:37:09 -0400 |
commit | 841089817d6da5a512bc36bf9b09cae4ff0d0026 (patch) | |
tree | 993629e66655fc9cc04e22db9382add992a359f3 /pkgs/development/compilers/zig | |
parent | 180ae3d371b5248d6122625758f811796c84207f (diff) |
development/compilers/zig: upgrade to 0.6.0
Diffstat (limited to 'pkgs/development/compilers/zig')
-rw-r--r-- | pkgs/development/compilers/zig/default.nix | 32 | ||||
-rw-r--r-- | pkgs/development/compilers/zig/llvm10_polly.patch | 10 |
2 files changed, 37 insertions, 5 deletions
diff --git a/pkgs/development/compilers/zig/default.nix b/pkgs/development/compilers/zig/default.nix index d547535c54bea..cfcb8be2d1a58 100644 --- a/pkgs/development/compilers/zig/default.nix +++ b/pkgs/development/compilers/zig/default.nix @@ -1,25 +1,47 @@ { stdenv, fetchFromGitHub, cmake, llvmPackages, libxml2, zlib }: -stdenv.mkDerivation rec { - version = "0.5.0"; +llvmPackages.stdenv.mkDerivation rec { + version = "0.6.0"; pname = "zig"; src = fetchFromGitHub { owner = "ziglang"; repo = pname; rev = version; - sha256 = "0xyl0riakh6kwb3yvxihb451kqs4ai4q0aygqygnlb2rlr1dn1zb"; + sha256 = "13dwm2zpscn4n0p5x8ggs9n7mwmq9cgip383i3qqphg7m3pkls8z"; }; nativeBuildInputs = [ cmake ]; - buildInputs = [ llvmPackages.clang-unwrapped llvmPackages.llvm libxml2 zlib ]; + buildInputs = [ + llvmPackages.clang-unwrapped + llvmPackages.llvm + llvmPackages.lld + libxml2 + zlib + ]; + + patches = [ ./llvm10_polly.patch ]; + + postPatch = '' + export llvm_extras=-Wl,${llvmPackages.llvm}/lib/LLVMPolly.so + substituteAllInPlace CMakeLists.txt + ''; preBuild = '' export HOME=$TMPDIR; ''; + checkPhase = '' + runHook preCheck + ./zig test $src/test/stage1/behavior.zig + runHook postCheck + ''; + + doCheck = true; + meta = with stdenv.lib; { - description = "Programming languaged designed for robustness, optimality, and clarity"; + description = + "Programming languaged designed for robustness, optimality, and clarity"; homepage = "https://ziglang.org/"; license = licenses.mit; platforms = platforms.unix; diff --git a/pkgs/development/compilers/zig/llvm10_polly.patch b/pkgs/development/compilers/zig/llvm10_polly.patch new file mode 100644 index 0000000000000..72449c35d91ff --- /dev/null +++ b/pkgs/development/compilers/zig/llvm10_polly.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97608cddf..e451c0711 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -369,4 +369,5 @@ target_link_libraries(zig_cpp LINK_PUBLIC + ${CLANG_LIBRARIES} + ${LLD_LIBRARIES} + ${LLVM_LIBRARIES} ++ @llvm_extras@ + ) |