20 stdenv.mkDerivation rec {
22 version = "unstable-2018.08.20";
24 src = fetchFromGitHub {
27 rev = "fc5f430cb7b7a8f694d86acbb038bd5b38ec389c";
28 sha256 = "1z64v69w7f52jrskh1jfyh1x46mzfhjrqxj9hhgzh3xxv9yla32h";
31 patches = [ ./clang_llvm.patch ];
34 substituteInPlace CMakeLists.txt --replace /etc/OpenCL/vendors "\''${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors"
35 patchShebangs src/git_sha1.sh
38 cmakeFlags = [ "-DCLANG_LIBRARY_DIR=${clang-unwrapped}/lib" ];
59 passthru.utests = stdenv.mkDerivation {
60 pname = "beignet-utests";
80 install -Dm755 "$1" "$out/bin/$(basename "$1")"
81 wrapProgram "$out/bin/$(basename "$1")" \
82 --set OCL_BITCODE_LIB_PATH ${beignet}/lib/beignet/beignet.bc \
83 --set OCL_HEADER_FILE_DIR "${beignet}/lib/beignet/include" \
84 --set OCL_PCH_PATH "${beignet}/lib/beignet/beignet.pch" \
85 --set OCL_GBE_PATH "${beignet}/lib/beignet/libgbe.so" \
86 --set OCL_INTERP_PATH "${beignet}/lib/beignet/libgbeinterp.so" \
87 --set OCL_KERNEL_PATH "$out/lib/beignet/kernels" \
88 --set OCL_IGNORE_SELF_TEST 1
91 install -Dm755 libutests.so $out/lib/libutests.so
93 wrapBin flat_address_space
94 mkdir $out/lib/beignet
95 cp -r ../../kernels $out/lib/beignet
100 homepage = "https://cgit.freedesktop.org/beignet/";
101 description = "OpenCL Library for Intel Ivy Bridge and newer GPUs";
103 The package provides an open source implementation of the OpenCL specification for Intel GPUs.
104 It supports the Intel OpenCL runtime library and compiler.
106 license = licenses.lgpl21Plus;
107 maintainers = with maintainers; [ artuuge zimbatm ];
108 platforms = platforms.linux;
109 # Requires libdrm_intel
110 badPlatforms = [ "aarch64-linux" ];