summary refs log tree commit diff
path: root/pkgs/tools/X11/virtualgl/default.nix
blob: 3ae0920b9a7279d34e52047f7d5276d931d19c1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchurl, mesa, libX11, openssl, libXext
, libjpeg_turbo, cmake }:

let
  version = "2.3.2";
in
stdenv.mkDerivation {
  name = "virtualgl-${version}";
  src = fetchurl {
    url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
    sha256 = "062lrhd8yr13ch4wpgzxdabqs92j4q7fcl3a0c3sdlav4arspqmy";
  };

  patches = [ ./xshm.patch ./fixturbopath.patch ];

  prePatch = ''
    sed -i s,LD_PRELOAD=lib,LD_PRELOAD=$out/lib/lib, server/vglrun
  '';

  cmakeFlags = [ "-DTJPEG_LIBRARY=${libjpeg_turbo}/lib/libturbojpeg.so" ];

  preInstall = ''
    export makeFlags="prefix=$out"
  '';

  buildInputs = [ cmake mesa libX11 openssl libXext libjpeg_turbo ];

  meta = {
    homepage = http://www.virtualgl.org/;
    description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
    license = "free"; # many parts under different free licenses
  };
}