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