2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, rocmUpdateScript
|
2022-11-04 12:27:35 +00:00
|
|
|
, cmake
|
|
|
|
, rocm-cmake
|
|
|
|
, rocm-device-libs
|
|
|
|
}:
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-11-04 12:27:35 +00:00
|
|
|
pname = "clang-ocl";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "5.4.2";
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
|
|
|
repo = "clang-ocl";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "rocm-${finalAttrs.version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
hash = "sha256-uMSvcVJj+me2E+7FsXZ4l4hTcK6uKEegXpkHGcuist0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
rocm-cmake
|
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
buildInputs = [ rocm-device-libs ];
|
2022-11-04 12:27:35 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
};
|
2022-11-27 09:42:12 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "OpenCL compilation with clang compiler";
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/clang-ocl";
|
|
|
|
license = with licenses; [ mit ];
|
2022-11-27 09:42:12 +00:00
|
|
|
maintainers = teams.rocm.members;
|
2023-01-20 10:41:00 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
2022-11-27 09:42:12 +00:00
|
|
|
})
|