1 { lib, stdenv, fetchurl, libGLU, libXmu, libXi, libXext
7 stdenv.mkDerivation rec {
12 url = "mirror://sourceforge/glew/glew-${version}.tgz";
13 sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
16 buildInputs = if stdenv.isDarwin then [ AGL ] else [ libXmu libXi libXext ];
17 propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
19 outputs = [ "out" "dev" ];
22 sed -i 's|lib64|lib|' config/Makefile.linux
23 ${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
24 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
28 buildFlags = [ "all" ];
29 installFlags = [ "install.all" ];
32 export GLEW_DEST="$out"
36 mkdir -pv $out/share/doc/glew
37 mkdir -p $dev/lib/pkgconfig
38 cp glew*.pc $dev/lib/pkgconfig
39 cp -r README.txt LICENSE.txt doc $out/share/doc/glew
43 "SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}"
47 description = "An OpenGL extension loading library for C(++)";
48 homepage = "http://glew.sourceforge.net/";
49 license = licenses.free; # different files under different licenses
50 #["BSD" "GLX" "SGI-B" "GPL2"]
51 platforms = platforms.mesaPlatforms;