Merge pull request #122945 from AndersonTorres/new-zig

zig: rewrite
This commit is contained in:
Jörg Thalheim 2021-05-14 08:13:34 +01:00 committed by GitHub
commit 8ead5266d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,24 +1,34 @@
{ lib, stdenv, fetchFromGitHub, cmake, llvmPackages, libxml2, zlib, substituteAll }: { lib
, stdenv
, fetchFromGitHub
, cmake
, llvmPackages
, libxml2
, zlib
}:
llvmPackages.stdenv.mkDerivation rec { llvmPackages.stdenv.mkDerivation rec {
version = "0.7.1";
pname = "zig"; pname = "zig";
version = "0.7.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ziglang"; owner = "ziglang";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "1z6c4ym9jmga46cw2arn7zv2drcpmrf3vw139gscxp27n7q2z5md"; hash = "sha256-rZYv8LFH3M70SyPwPVyul+Um9j82K8GZIepVmaonzPw=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [
cmake
];
buildInputs = [ buildInputs = [
llvmPackages.clang-unwrapped
llvmPackages.llvm
llvmPackages.lld
libxml2 libxml2
zlib zlib
]; ] ++ (with llvmPackages; [
clang-unwrapped
lld
llvm
]);
preBuild = '' preBuild = ''
export HOME=$TMPDIR; export HOME=$TMPDIR;
@ -33,12 +43,12 @@ llvmPackages.stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
meta = with lib; { meta = with lib; {
homepage = "https://ziglang.org/";
description = description =
"General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software"; "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software";
homepage = "https://ziglang.org/";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ andrewrk AndersonTorres ];
platforms = platforms.unix; platforms = platforms.unix;
maintainers = [ maintainers.andrewrk ];
# See https://github.com/NixOS/nixpkgs/issues/86299 # See https://github.com/NixOS/nixpkgs/issues/86299
broken = stdenv.isDarwin; broken = stdenv.isDarwin;
}; };