Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchgit,
|
|
apple-sdk,
|
|
cmake,
|
|
git,
|
|
llvm_18,
|
|
pkg-config,
|
|
python3,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "clang-root";
|
|
version = "18-20250506-01";
|
|
|
|
src = fetchgit {
|
|
url = "https://github.com/root-project/llvm-project";
|
|
rev = "refs/tags/ROOT-llvm${version}";
|
|
hash = "sha256-8tviNWNmvIJhxF4j9Z7zMnjltTX0Ka2fN9HIgLfNAco=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
git
|
|
];
|
|
buildInputs = [
|
|
llvm_18
|
|
python3
|
|
];
|
|
|
|
patches = [
|
|
./Fix-find_package-LLVM-overwriting-LLVM_LINK_LLVM_DYLIB.patch
|
|
];
|
|
|
|
preConfigure = ''
|
|
cd clang
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DCLANG_BUILD_TOOLS=OFF"
|
|
"-DCLANG_ENABLE_ARCMT=OFF"
|
|
"-DCLANG_ENABLE_STATIC_ANALYZER=OFF"
|
|
"-DCLANG_LINK_CLANG_DYLIB=OFF"
|
|
"-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
|
|
"-DLLVM_INCLUDE_TESTS=OFF"
|
|
"-DLLVM_LINK_LLVM_DYLIB=OFF"
|
|
"-DLLVM_MAIN_SRC_DIR=${llvm_18.src}"
|
|
]
|
|
++ (
|
|
if stdenv.hostPlatform.isDarwin then
|
|
[ "-DC_INCLUDE_DIRS=${apple-sdk.sdkroot}/usr/include" ]
|
|
else
|
|
lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
|
|
);
|
|
}
|