nixpkgs/pkgs/development/libraries/rocclr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.8 KiB
Nix
Raw Normal View History

{ lib
, stdenv
2020-07-10 18:34:25 +00:00
, fetchFromGitHub
, fetchpatch
, rocmUpdateScript
2020-07-10 18:34:25 +00:00
, rocm-comgr
}:
stdenv.mkDerivation (finalAttrs: {
2020-07-10 18:34:25 +00:00
pname = "rocclr";
version = "5.4.2";
2020-07-10 18:34:25 +00:00
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "ROCclr";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-tYFoGafOsJYnRQaOLAaFix6tPD0QPTidOtOicPxP2Vk=";
2020-07-10 18:34:25 +00:00
};
patches = [
# Enable support for gfx8 again
# See the upstream issue: https://github.com/RadeonOpenCompute/ROCm/issues/1659
# And the arch patch: https://github.com/rocm-arch/rocm-arch/pull/742
(fetchpatch {
url = "https://raw.githubusercontent.com/John-Gee/rocm-arch/d6812d308fee3caf2b6bb01b4d19fe03a6a0e3bd/rocm-opencl-runtime/enable-gfx800.patch";
hash = "sha256-59jFDIIsTTZcNns9RyMVWPRUggn/bSlAGrky4quu8B4=";
})
];
postPatch = ''
2020-07-10 18:34:25 +00:00
substituteInPlace device/comgrctx.cpp \
--replace "libamd_comgr.so" "${rocm-comgr}/lib/libamd_comgr.so"
'';
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
2020-07-10 18:34:25 +00:00
mkdir -p $out
cp -a * $out/
2020-11-03 07:50:47 +00:00
runHook postInstall
2020-07-10 18:34:25 +00:00
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
2021-09-08 17:12:32 +00:00
meta = with lib; {
description = "Source package of the Radeon Open Compute common language runtime";
2020-07-10 18:34:25 +00:00
homepage = "https://github.com/ROCm-Developer-Tools/ROCclr";
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
2020-07-10 18:34:25 +00:00
# rocclr seems to have some AArch64 ifdefs, but does not seem
# to be supported yet by the build infrastructure. Recheck in
# the future.
platforms = [ "x86_64-linux" ];
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
2020-07-10 18:34:25 +00:00
};
})