14 if nvidia_x11 == null then libGL
15 else if nvidia_x11.useGLVND then libglvnd
21 version = "unstable-2015-04-28";
23 src = fetchFromGitHub {
26 rev = "d1afbf6fce2778c0751eddf19db9882e04f18bfd";
27 sha256 = "118jm57ccawskb8vjq3a9dpa2gh72nxzvx2zk7zknpy0arrdznj1";
31 # Bump buffer size for long library paths.
33 url = "https://github.com/abbradar/primus/commit/2f429e232581c556df4f4bf210aee8a0c99c60b7.patch";
34 sha256 = "1da6ynz7r7x98495i329sf821308j1rpy8prcdraqahz7p4c89nc";
38 buildInputs = [ libX11 libGL ];
42 "PRIMUS_libGLa=${aPackage}/lib/libGL.so"
43 "PRIMUS_libGLd=${libGL}/lib/libGL.so"
44 "PRIMUS_LOAD_GLOBAL=${mesa}/lib/libglapi.so"
48 ln -s $out/lib/libGL.so.1 $out/lib/libGL.so
51 passthru.glvnd = if nvidia_x11 != null && nvidia_x11.useGLVND then nvidia_x11 else null;
54 description = "Low-overhead client-side GPU offloading";
55 homepage = "https://github.com/amonakov/primus";
56 platforms = [ "i686-linux" "x86_64-linux" ];
57 license = licenses.bsd2;
58 maintainers = with maintainers; [ abbradar ];