2023-08-05 16:07:49 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, llvmPackages
|
|
|
|
, libxml2
|
|
|
|
, zlib
|
|
|
|
, coreutils
|
2023-08-10 02:43:09 +02:00
|
|
|
, callPackage
|
2023-08-05 16:07:49 +02:00
|
|
|
}@args:
|
|
|
|
|
|
|
|
import ./generic.nix args {
|
|
|
|
version = "0.11.0";
|
|
|
|
|
|
|
|
hash = "sha256-iuU1fzkbJxI+0N1PiLQM013Pd1bzrgqkbIyTxo5gB2I=";
|
|
|
|
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
# file RPATH_CHANGE could not write new RPATH
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
|
|
|
|
|
|
|
# always link against static build of LLVM
|
|
|
|
"-DZIG_STATIC_LLVM=ON"
|
|
|
|
|
|
|
|
# ensure determinism in the compiler build
|
|
|
|
"-DZIG_TARGET_MCPU=baseline"
|
|
|
|
];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
stage3/bin/zig run ../tools/docgen.zig -- ../doc/langref.html.in langref.html --zig $PWD/stage3/bin/zig
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 -t $doc/share/doc/zig-$version/html langref.html
|
|
|
|
'';
|
|
|
|
}
|