ocl-icd: build for windows

This commit is contained in:
Ashley Ruglys 2024-02-20 16:06:52 +13:00
parent a41cc62817
commit 35f9c2bdbf
No known key found for this signature in database

View file

@ -5,6 +5,7 @@
, opencl-headers
, addOpenGLRunpath
, autoreconfHook
, windows
}:
stdenv.mkDerivation rec {
@ -23,17 +24,21 @@ stdenv.mkDerivation rec {
ruby
];
buildInputs = [ opencl-headers ];
buildInputs = [ opencl-headers ]
++ lib.optionals stdenv.hostPlatform.isWindows [ windows.dlfcn ];
configureFlags = [
"--enable-custom-vendordir=/run/opengl-driver/etc/OpenCL/vendors"
];
# fixes: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified
makeFlags = lib.optionals stdenv.hostPlatform.isWindows [ "LDFLAGS=-no-undefined" ];
meta = with lib; {
description = "OpenCL ICD Loader for ${opencl-headers.name}";
homepage = "https://github.com/OCL-dev/ocl-icd";
license = licenses.bsd2;
platforms = platforms.unix;
platforms = platforms.unix ++ platforms.windows;
maintainers = with maintainers; [ r-burns ];
};
}