2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, opencl-clhpp, ocl-icd }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "opencl-info-2014-02-21";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marchv";
|
|
|
|
repo = "opencl-info";
|
|
|
|
rev = "3e53d001a98978feb865650cf0e93b045400c0d7";
|
|
|
|
sha256 = "114lxgnjg40ivjjszkv4n3f3yq2lbrvywryvbazf20kqmdz7315l";
|
|
|
|
};
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
patches = [
|
|
|
|
# The cl.hpp header was removed from opencl-clhpp. This patch
|
|
|
|
# updates opencl-info to use the new cp2.hpp header.
|
|
|
|
#
|
|
|
|
# Submitted upstream: https://github.com/marchv/opencl-info/pull/2
|
|
|
|
./opencl-info-clhpp2.diff
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ opencl-clhpp ocl-icd ];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "-lOpenCL";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 opencl-info $out/bin/opencl-info
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool to dump OpenCL platform/device information";
|
|
|
|
homepage = "https://github.com/marchv/opencl-info";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|