zig: 0.8.1 -> 0.9.0

This commit is contained in:
Сухарик 2021-12-21 10:29:18 +03:00
parent 439aa90137
commit d9c13cf44e
3 changed files with 68 additions and 5 deletions

View file

@ -0,0 +1,57 @@
{ lib
, fetchFromGitHub
, cmake
, llvmPackages
, libxml2
, zlib
}:
let
inherit (llvmPackages) stdenv;
in
stdenv.mkDerivation rec {
pname = "zig";
version = "0.8.1";
src = fetchFromGitHub {
owner = "ziglang";
repo = pname;
rev = version;
hash = "sha256-zMSOH8ZWcvzHRwOgGIbLO9Q6jf1P5QL5KCMD+frp+JA=";
};
nativeBuildInputs = [
cmake
llvmPackages.llvm.dev
];
buildInputs = [
libxml2
zlib
] ++ (with llvmPackages; [
libclang
lld
llvm
]);
preBuild = ''
export HOME=$TMPDIR;
'';
doCheck = true;
checkPhase = ''
runHook preCheck
./zig test --cache-dir "$TMPDIR" -I $src/test $src/test/behavior.zig
runHook postCheck
'';
meta = with lib; {
homepage = "https://ziglang.org/";
description =
"General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software";
license = licenses.mit;
maintainers = with maintainers; [ andrewrk AndersonTorres ];
platforms = platforms.unix;
broken = stdenv.isDarwin; # See https://github.com/NixOS/nixpkgs/issues/86299
};
}

View file

@ -11,13 +11,13 @@ let
in
stdenv.mkDerivation rec {
pname = "zig";
version = "0.8.1";
version = "0.9.0";
src = fetchFromGitHub {
owner = "ziglang";
repo = pname;
rev = version;
hash = "sha256-zMSOH8ZWcvzHRwOgGIbLO9Q6jf1P5QL5KCMD+frp+JA=";
hash = "sha256-Hfl1KKtGcopMrn+U9r0/qr/wReWJIgb8+IgwMoguv/0=";
};
nativeBuildInputs = [
@ -54,4 +54,3 @@ stdenv.mkDerivation rec {
broken = stdenv.isDarwin; # See https://github.com/NixOS/nixpkgs/issues/86299
};
}

View file

@ -3596,7 +3596,9 @@ with pkgs;
reg = callPackage ../tools/virtualization/reg { };
river = callPackage ../applications/window-managers/river { };
river = callPackage ../applications/window-managers/river {
zig = zig_0_8_1;
};
rmapi = callPackage ../applications/misc/remarkable/rmapi { };
@ -15665,7 +15667,9 @@ with pkgs;
ytt = callPackage ../development/tools/ytt {};
zls = callPackage ../development/tools/zls { };
zls = callPackage ../development/tools/zls {
zig = zig_0_8_1;
};
zydis = callPackage ../development/libraries/zydis { };
@ -20442,6 +20446,9 @@ with pkgs;
libzra = callPackage ../development/libraries/libzra { };
zig = callPackage ../development/compilers/zig {
llvmPackages = llvmPackages_13;
};
zig_0_8_1 = callPackage ../development/compilers/zig/0.8.1.nix {
llvmPackages = llvmPackages_12;
};