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

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

52 lines
1.4 KiB
Nix
Raw Normal View History

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