diff --git a/pkgs/tools/graphics/glxinfo/default.nix b/pkgs/tools/graphics/glxinfo/default.nix new file mode 100644 index 000000000000..8ebf5e816fd8 --- /dev/null +++ b/pkgs/tools/graphics/glxinfo/default.nix @@ -0,0 +1,29 @@ +{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 + "; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 87eccd91ca29..d32118f98f7c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -328,6 +328,10 @@ rec { inherit fetchurl stdenv; }; + glxinfo = import ../tools/graphics/glxinfo { + inherit fetchurl stdenv x11 mesa; + }; + gnugrep = useFromStdenv (stdenv ? gnugrep) stdenv.gnugrep (import ../tools/text/gnugrep { inherit fetchurl stdenv pcre;