nixpkgs/pkgs/development/libraries/ocl-icd/default.nix
Ambroz Bizjak 1bba961e2a libglvnd, ocl-icd, vulkan-loader: Remove addOpenGLRunpath where not needed.
For APIs that use driver config files, the config files should point to libraries using absolute paths, so `RUNPATH` should be unnecessary. It is still needed for `libGLX` because that does not use config files but the dispatch library receives just a vendor name from the X server.
2019-08-18 21:29:42 +03:00

27 lines
737 B
Nix

{stdenv, fetchurl, ruby, opencl-headers, addOpenGLRunpath }:
stdenv.mkDerivation rec {
pname = "ocl-icd";
version = "2.2.10";
src = fetchurl {
url = "https://forge.imag.fr/frs/download.php/810/${pname}-${version}.tar.gz";
sha256 = "0f14gpa13sdm0kzqv5yycp4pschbmi6n5fj7wl4ilspzsrqcgqr2";
};
nativeBuildInputs = [ ruby ];
buildInputs = [ opencl-headers ];
postPatch = ''
sed -i 's,"/etc/OpenCL/vendors","${addOpenGLRunpath.driverLink}/etc/OpenCL/vendors",g' ocl_icd_loader.c
'';
meta = with stdenv.lib; {
description = "OpenCL ICD Loader for ${opencl-headers.name}";
homepage = https://forge.imag.fr/projects/ocl-icd/;
license = licenses.bsd2;
platforms = platforms.linux;
};
}