14e964f59b
GitOrigin-RevId: fbfb79400a08bf754e32b4d4fc3f7d8f8055cf94
51 lines
979 B
Nix
51 lines
979 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, llvmPackages
|
|
, libxml2
|
|
, zlib
|
|
}:
|
|
|
|
let
|
|
inherit (llvmPackages) stdenv;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "zig";
|
|
version = "0.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ziglang";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-bILjcKX8jPl2n1HRYvYRb7jJkobwqmSJ+hHXSn9n2ag=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
llvmPackages.llvm.dev
|
|
];
|
|
buildInputs = [
|
|
libxml2
|
|
zlib
|
|
] ++ (with llvmPackages; [
|
|
libclang
|
|
lld
|
|
llvm
|
|
]);
|
|
|
|
preBuild = ''
|
|
export HOME=$TMPDIR;
|
|
'';
|
|
|
|
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;
|
|
# See https://github.com/NixOS/nixpkgs/issues/86299
|
|
broken = stdenv.isDarwin;
|
|
};
|
|
}
|
|
# TODO: checkPhase
|