2022-11-03 19:19:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-12-04 00:25:41 +00:00
|
|
|
, rocmUpdateScript
|
2022-11-03 19:19:12 +00:00
|
|
|
, cmake
|
|
|
|
, rocm-cmake
|
|
|
|
, rocm-device-libs
|
|
|
|
}:
|
|
|
|
|
2022-11-24 02:17:04 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-11-03 19:19:12 +00:00
|
|
|
pname = "clang-ocl";
|
2023-10-17 05:53:19 +00:00
|
|
|
version = "5.7.1";
|
2022-11-03 19:19:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-12-17 11:41:00 +00:00
|
|
|
owner = "ROCm";
|
2022-11-03 19:19:12 +00:00
|
|
|
repo = "clang-ocl";
|
2022-11-28 11:53:23 +00:00
|
|
|
rev = "rocm-${finalAttrs.version}";
|
2022-11-03 19:19:12 +00:00
|
|
|
hash = "sha256-uMSvcVJj+me2E+7FsXZ4l4hTcK6uKEegXpkHGcuist0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
rocm-cmake
|
|
|
|
];
|
|
|
|
|
2022-12-12 23:36:53 +00:00
|
|
|
buildInputs = [ rocm-device-libs ];
|
2022-11-03 19:19:12 +00:00
|
|
|
|
2022-12-04 00:25:41 +00:00
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
};
|
2022-11-22 14:13:49 +00:00
|
|
|
|
2022-11-03 19:19:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "OpenCL compilation with clang compiler";
|
2023-12-17 11:41:00 +00:00
|
|
|
homepage = "https://github.com/ROCm/clang-ocl";
|
2022-11-03 19:19:12 +00:00
|
|
|
license = with licenses; [ mit ];
|
2022-11-24 01:24:39 +00:00
|
|
|
maintainers = teams.rocm.members;
|
2023-01-18 08:25:46 +00:00
|
|
|
platforms = platforms.linux;
|
2023-12-17 11:15:23 +00:00
|
|
|
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "6.0.0";
|
2022-11-03 19:19:12 +00:00
|
|
|
};
|
2022-11-24 02:17:04 +00:00
|
|
|
})
|