3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/rocclr/default.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-07-10 19:34:25 +01:00
, fetchFromGitHub
2021-09-08 18:12:32 +01:00
, writeScript
2020-07-10 19:34:25 +01:00
, rocm-comgr
}:
stdenv.mkDerivation rec {
pname = "rocclr";
version = "4.5.2";
2020-07-10 19:34:25 +01:00
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "ROCclr";
2020-08-21 07:38:43 +01:00
rev = "rocm-${version}";
hash = "sha256-fsQANBND/oDeC/+wmCH/aLlDTxPIi7Z/oN1HnNHHnm0=";
2020-07-10 19:34:25 +01:00
};
prePatch = ''
substituteInPlace device/comgrctx.cpp \
--replace "libamd_comgr.so" "${rocm-comgr}/lib/libamd_comgr.so"
'';
buildPhase = "";
installPhase = ''
runHook preInstall
2020-07-10 19:34:25 +01:00
mkdir -p $out
cp -r * $out/
2020-11-03 07:50:47 +00:00
runHook postInstall
2020-07-10 19:34:25 +01:00
'';
2021-09-08 18:12:32 +01:00
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";
2020-07-10 19:34:25 +01:00
homepage = "https://github.com/ROCm-Developer-Tools/ROCclr";
license = licenses.mit;
2021-09-02 21:07:20 +01:00
maintainers = with maintainers; [ lovesegfault ];
2020-07-10 19:34:25 +01: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" ];
};
}