nixpkgs/pkgs/development/libraries/glew/default.nix

34 lines
900 B
Nix
Raw Normal View History

{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }:
stdenv.mkDerivation rec {
2013-12-18 15:31:59 +01:00
name = "glew-1.10.0";
src = fetchurl {
url = "mirror://sourceforge/glew/${name}.tgz";
2013-12-18 15:31:59 +01:00
sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
};
2013-10-24 12:01:53 +02:00
buildInputs = [ x11 libXmu libXi ];
propagatedBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux
'';
2013-10-24 12:01:53 +02:00
buildPhase = "make all";
installPhase = ''
2013-10-24 12:01:53 +02:00
GLEW_DEST=$out make install.all
mkdir -pv $out/share/doc/glew
mkdir -p $out/lib/pkgconfig
cp glew*.pc $out/lib/pkgconfig
cp -r README.txt LICENSE.txt doc $out/share/doc/glew
'';
meta = {
description = "An OpenGL extension loading library for C(++)";
homepage = http://glew.sourceforge.net/;
license = ["BSD" "GLX" "SGI-B" "GPL2"]; # License description copied from gentoo-1.4.0
};
}