2022-12-14 09:04:14 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rocmUpdateScript
|
|
|
|
, cmake
|
|
|
|
, lsb-release
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "hipcc";
|
2023-10-17 07:53:19 +02:00
|
|
|
version = "5.7.1";
|
2022-12-14 09:04:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-12-17 12:41:00 +01:00
|
|
|
owner = "ROCm";
|
2022-12-14 09:04:14 +01:00
|
|
|
repo = "HIPCC";
|
|
|
|
rev = "rocm-${finalAttrs.version}";
|
2023-09-30 06:47:55 +02:00
|
|
|
hash = "sha256-lJX6nF1V4YmK5ai7jivXlRnG3doIOf6X9CWLHVdRuVg=";
|
2022-12-14 09:04:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-10-02 03:05:32 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/hipBin_amd.h \
|
|
|
|
--replace "/usr/bin/lsb_release" "${lsb-release}/bin/lsb_release"
|
|
|
|
'';
|
2022-12-14 09:04:14 +01:00
|
|
|
|
2023-10-02 03:05:32 +02:00
|
|
|
postInstall = ''
|
|
|
|
rm -r $out/hip/bin
|
|
|
|
ln -s $out/bin $out/hip/bin
|
2022-12-14 09:04:14 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Compiler driver utility that calls clang or nvcc";
|
2023-12-17 12:41:00 +01:00
|
|
|
homepage = "https://github.com/ROCm/HIPCC";
|
2022-12-14 09:04:14 +01:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
|
|
|
|
platforms = platforms.linux;
|
2023-12-17 12:15:23 +01:00
|
|
|
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "6.0.0";
|
2022-12-14 09:04:14 +01:00
|
|
|
};
|
|
|
|
})
|