Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zig: 0.8.1 -> 0.9.0 #151518

Merged
merged 1 commit into from
Jan 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions pkgs/development/compilers/zig/0.8.1.nix
Original file line number Diff line number Diff line change
@@ -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
};
}

5 changes: 2 additions & 3 deletions pkgs/development/compilers/zig/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -54,4 +54,3 @@ stdenv.mkDerivation rec {
broken = stdenv.isDarwin; # See https://github.com/NixOS/nixpkgs/issues/86299
};
}

11 changes: 9 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Comment on lines +3599 to +3601
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
river = callPackage ../applications/window-managers/river {
zig = zig_0_8_1;
};
river = callPackage ../applications/window-managers/river { };

river 0.1.2 calls for zig 0.9.0 now, otherwise LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't river 0.1.2 still in staging? And this PR is in master.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided not to target staging, and wait for the wlroots update to hit master.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it should be zig = zig_0_8_1;, so this PR could be merged before the wlroots update hits the master.


rmapi = callPackage ../applications/misc/remarkable/rmapi { };

Expand Down Expand Up @@ -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 { };

Expand Down Expand Up @@ -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;
};

Expand Down