diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-01-28 01:13:31 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-01-28 01:13:31 +0000 |
commit | 410f21887ac624f0336a87fa56a0780dd3c673ae (patch) | |
tree | 2a12dda1626b62a795e85faae74636bce954855a /pkgs/os-specific/linux/opengl | |
parent | 7f74c406c4dab2a4aa9c3c818c14f59b3d28829d (diff) |
* A quick hack to get accelerated OpenGL working: just use the driver
in /usr/lib/libGL.so.1 (which will typically load a driver in /usr/X11R6/lib/modules/dri). This has been tested on a i915 graphics card; it should work with most open source X.org drivers. For NVidia's proprietary drivers (which we cannot build ourselves anyway), some more symlinks are necessary; I'll add those later. So to get hardware-accelerated Quake 3, do: $ nix-env -p /nix/var/nix/profiles/opengl -i xorg-sys-opengl $ nix-env -i quake3-demo $ quake3 svn path=/nixpkgs/trunk/; revision=4613
Diffstat (limited to 'pkgs/os-specific/linux/opengl')
-rw-r--r-- | pkgs/os-specific/linux/opengl/xorg-sys/builder.sh | 9 | ||||
-rw-r--r-- | pkgs/os-specific/linux/opengl/xorg-sys/default.nix | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh b/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh new file mode 100644 index 0000000000000..3894dbd207f6b --- /dev/null +++ b/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh @@ -0,0 +1,9 @@ +source $stdenv/setup + +ensureDir $out/lib + +ln -s /usr/lib/libGL.so.1 $out/lib/ + +for i in $neededLibs; do + ln -s $i/lib/*.so* $out/lib/ +done diff --git a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix new file mode 100644 index 0000000000000..ae348b70c6928 --- /dev/null +++ b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix @@ -0,0 +1,15 @@ +# This is a very dirty hack to allow hardware acceleration of OpenGL +# applications for most (?) users. It will use the driver that your +# Linux distribution installed in /usr/lib/libGL.so.1. Hopefully, +# this driver uses hardware acceleration. +# +# Of course, use of the driver in /usr/lib is highly impure. But it +# might actually work ;-) + +{stdenv, xlibs, expat}: + +stdenv.mkDerivation { + name = "xorg-sys-opengl"; + builder = ./builder.sh; + neededLibs = [xlibs.libXxf86vm expat]; +} |