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