893b09d324
GitOrigin-RevId: eac07edbd20ed4908b98790ba299250b5527ecdf
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, writeScript
|
|
, rocm-comgr
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rocclr";
|
|
version = "4.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ROCm-Developer-Tools";
|
|
repo = "ROCclr";
|
|
rev = "rocm-${version}";
|
|
hash = "sha256-fsQANBND/oDeC/+wmCH/aLlDTxPIi7Z/oN1HnNHHnm0=";
|
|
};
|
|
|
|
prePatch = ''
|
|
substituteInPlace device/comgrctx.cpp \
|
|
--replace "libamd_comgr.so" "${rocm-comgr}/lib/libamd_comgr.so"
|
|
'';
|
|
|
|
buildPhase = "";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
cp -r * $out/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = writeScript "update.sh" ''
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p curl jq common-updater-scripts
|
|
version="$(curl -sL "https://api.github.com/repos/ROCm-Developer-Tools/ROCclr/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
|
update-source-version rocclr "$version"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Source package of the Radeon Open Compute common language runtime";
|
|
homepage = "https://github.com/ROCm-Developer-Tools/ROCclr";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
# 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" ];
|
|
};
|
|
}
|