1 { lib, stdenv, fetchurl, libXi, libXrandr, libXxf86vm, libGL, libGLU, xlibsWrapper, cmake }:
4 in stdenv.mkDerivation {
9 url = "mirror://sourceforge/freeglut/freeglut-${version}.tar.gz";
10 sha256 = "0s6sk49q8ijgbsrrryb7dzqx2fa744jhx1wck5cz5jia2010w06l";
13 outputs = [ "out" "dev" ];
15 nativeBuildInputs = [ cmake ];
16 buildInputs = [ libXi libXrandr libXxf86vm libGL libGLU xlibsWrapper ];
18 cmakeFlags = lib.optionals stdenv.isDarwin [
19 "-DOPENGL_INCLUDE_DIR=${libGL}/include"
20 "-DOPENGL_gl_LIBRARY:FILEPATH=${libGL}/lib/libGL.dylib"
21 "-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib"
22 "-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
23 "-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
27 description = "Create and manage windows containing OpenGL contexts";
29 FreeGLUT is an open source alternative to the OpenGL Utility Toolkit
30 (GLUT) library. GLUT (and hence FreeGLUT) allows the user to create and
31 manage windows containing OpenGL contexts on a wide range of platforms
32 and also read the mouse, keyboard and joystick functions. FreeGLUT is
33 intended to be a full replacement for GLUT, and has only a few
36 homepage = "http://freeglut.sourceforge.net/";
37 license = licenses.mit;
38 platforms = platforms.all;
39 maintainers = [ maintainers.bjornfor ];