2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-07-10 16:01:24 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, numactl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rocm-thunk";
|
2020-12-18 07:25:13 +00:00
|
|
|
version = "4.0.0";
|
2020-07-10 16:01:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
|
|
|
repo = "ROCT-Thunk-Interface";
|
|
|
|
rev = "rocm-${version}";
|
2020-12-18 07:25:13 +00:00
|
|
|
hash = "sha256-2kLSlGwX3pD8I5pXwV5L0k9l8OzJRkUvnAqv5E+gcd4=";
|
2020-07-10 16:01:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export cmakeFlags="$cmakeFlags "
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ numactl ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r $src/include $out
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-07-10 16:01:24 +01:00
|
|
|
description = "Radeon open compute thunk interface";
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface";
|
|
|
|
license = with licenses; [ bsd2 mit ];
|
|
|
|
maintainers = with maintainers; [ danieldk ];
|
|
|
|
};
|
|
|
|
}
|