1 { lib, stdenv, fetchurl, cmake
2 , libGL, libGLU, libXv, libXtst, libXi, libjpeg_turbo, fltk
4 , opencl-headers, opencl-clhpp, ocl-icd
7 stdenv.mkDerivation rec {
8 pname = "virtualgl-lib";
12 url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
13 sha256 = "sha256-OIEbwAQ71yOuHIzM+iaK7QkUJrKg6sXpGuFQOUPjM2w=";
17 # the unit tests take significant hacks to build and can't run anyway due to the lack
18 # of a 3D X server in the build sandbox. so we just chop out their build instructions.
19 head -n $(grep -n 'UNIT TESTS' server/CMakeLists.txt | cut -d : -f 1) server/CMakeLists.txt > server/CMakeLists2.txt
20 mv server/CMakeLists2.txt server/CMakeLists.txt
23 cmakeFlags = [ "-DVGL_SYSTEMFLTK=1" "-DTJPEG_LIBRARY=${libjpeg_turbo.out}/lib/libturbojpeg.so" ];
25 makeFlags = [ "PREFIX=$(out)" ];
27 nativeBuildInputs = [ cmake ];
29 buildInputs = [ libjpeg_turbo libGL libGLU fltk
30 libXv libXtst libXi xorg.xcbutilkeysyms
31 opencl-headers opencl-clhpp ocl-icd
35 substituteInPlace $out/bin/vglrun \
36 --replace "LD_PRELOAD=libvglfaker" "LD_PRELOAD=$out/lib/libvglfaker" \
37 --replace "LD_PRELOAD=libdlfaker" "LD_PRELOAD=$out/lib/libdlfaker" \
38 --replace "LD_PRELOAD=libgefaker" "LD_PRELOAD=$out/lib/libgefaker"
42 homepage = "http://www.virtualgl.org/";
43 description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
44 license = licenses.wxWindows;
45 platforms = platforms.linux;
46 maintainers = with maintainers; [ abbradar ];