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
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rocm-merged-llvm,
|
|
cmake,
|
|
lsb-release,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "hipcc";
|
|
# In-tree with ROCm LLVM
|
|
inherit (rocm-merged-llvm) version;
|
|
src = rocm-merged-llvm.llvm-src;
|
|
sourceRoot = "${finalAttrs.src.name}/amd/hipcc";
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ rocm-merged-llvm ];
|
|
|
|
patches = [
|
|
# https://github.com/ROCm/llvm-project/pull/183
|
|
# Fixes always-invoked UB in hipcc
|
|
./0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/hipBin_amd.h \
|
|
--replace-fail "/usr/bin/lsb_release" "${lsb-release}/bin/lsb_release"
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
];
|
|
postInstall = ''
|
|
rm -r $out/hip/bin
|
|
ln -s $out/bin $out/hip/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Compiler driver utility that calls clang or nvcc";
|
|
homepage = "https://github.com/ROCm/HIPCC";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
teams = [ teams.rocm ];
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|