2021-05-14 04:33:53 +02:00
|
|
|
{ lib
|
2022-07-14 06:38:53 +02:00
|
|
|
, stdenv
|
2021-05-14 04:33:53 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, llvmPackages
|
|
|
|
, libxml2
|
|
|
|
, zlib
|
2023-08-05 16:07:23 +02:00
|
|
|
, coreutils
|
2023-08-10 02:43:09 +02:00
|
|
|
, callPackage
|
2023-08-05 16:07:23 +02:00
|
|
|
}@args:
|
2017-10-20 05:51:45 +02:00
|
|
|
|
2023-08-05 16:07:49 +02:00
|
|
|
import ./generic.nix args {
|
2022-02-17 01:29:52 +01:00
|
|
|
version = "0.9.1";
|
2017-10-20 05:51:45 +02:00
|
|
|
|
2023-08-05 16:07:49 +02:00
|
|
|
hash = "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k=";
|
|
|
|
|
2023-01-04 00:06:36 +01:00
|
|
|
patches = [
|
|
|
|
# Fix index out of bounds reading RPATH (cherry-picked from 0.10-dev)
|
2023-08-10 04:58:15 +02:00
|
|
|
./000-0.9-read-dynstr-at-rpath-offset.patch
|
2023-01-04 00:06:36 +01:00
|
|
|
# Fix build on macOS 13 (cherry-picked from 0.10-dev)
|
2023-08-10 04:58:15 +02:00
|
|
|
./001-0.9-bump-macos-supported-version.patch
|
2023-01-04 00:06:36 +01:00
|
|
|
];
|
|
|
|
|
2023-08-05 16:07:23 +02:00
|
|
|
prePatch =
|
|
|
|
let
|
|
|
|
zig_0_10_0 = fetchFromGitHub {
|
|
|
|
owner = "ziglang";
|
|
|
|
repo = "zig";
|
|
|
|
rev = "0.10.0";
|
|
|
|
hash = "sha256-DNs937N7PLQimuM2anya4npYXcj6cyH+dRS7AiOX7tw=";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
''
|
|
|
|
cp -R ${zig_0_10_0}/lib/libc/include/any-macos.13-any lib/libc/include/any-macos.13-any
|
|
|
|
cp -R ${zig_0_10_0}/lib/libc/include/aarch64-macos.13-none lib/libc/include/aarch64-macos.13-gnu
|
|
|
|
cp -R ${zig_0_10_0}/lib/libc/include/x86_64-macos.13-none lib/libc/include/x86_64-macos.13-gnu
|
|
|
|
cp ${zig_0_10_0}/lib/libc/darwin/libSystem.13.tbd lib/libc/darwin/
|
|
|
|
'';
|
2019-10-01 03:00:00 +02:00
|
|
|
|
2022-07-12 17:20:45 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
# file RPATH_CHANGE could not write new RPATH
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
2023-02-17 03:50:16 +01:00
|
|
|
|
|
|
|
# ensure determinism in the compiler build
|
|
|
|
"-DZIG_TARGET_MCPU=baseline"
|
2022-07-12 17:20:45 +02:00
|
|
|
];
|
2023-08-05 16:07:23 +02:00
|
|
|
}
|