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-01-15 16:04:53 +00:00
|
|
|
version = "5.4.2";
|
2022-11-03 19:19:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
|
|
|
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";
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/clang-ocl";
|
|
|
|
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-01-15 15:59:25 +00:00
|
|
|
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
|
2022-11-03 19:19:12 +00:00
|
|
|
};
|
2022-11-24 02:17:04 +00:00
|
|
|
})
|