nixpkgs/pkgs/tools/graphics/glxinfo/default.nix
Eelco Dolstra ad452195a0 * Added glxinfo/glxgears.
svn path=/nixpkgs/trunk/; revision=8593
2007-04-18 14:21:24 +00:00

30 lines
648 B
Nix

{stdenv, fetchurl, x11, mesa}:
stdenv.mkDerivation {
name = "glxinfo-6.5.2";
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-6.5.2.tar.bz2;
sha256 = "1shfwy0sy3kdk3nykp1gv6s0lafqgqnadwarw5cbpw7mkfap8kw0";
};
buildInputs = [x11 mesa];
buildPhase = "
cd progs/xdemos
gcc glxinfo.c -o glxinfo -lGL -lX11
gcc glxgears.c -o glxgears -lGL -lX11
";
installPhase = "
ensureDir $out/bin
cp glxinfo glxgears $out/bin
";
postFixup = "
for i in $out/bin/*; do
patchelf --set-rpath /var/state/opengl-driver/lib:$(patchelf --print-rpath $i) $i
done
";
}