1 { lib, stdenv, fetchurl, libICE, libXext, libXi, libXrandr, libXxf86vm, libGL, libGLU, cmake
5 stdenv.mkDerivation (finalAttrs: {
10 url = "mirror://sourceforge/freeglut/freeglut-${finalAttrs.version}.tar.gz";
11 sha256 = "sha256-PAvLkV2bGAqX7a69ARt6HeVFg6g4ZE3NQrsOoMbz6uw=";
14 outputs = [ "out" "dev" ];
16 nativeBuildInputs = [ cmake ];
17 buildInputs = [ libICE libXext libXi libXrandr libXxf86vm libGL libGLU ];
19 cmakeFlags = lib.optionals stdenv.isDarwin [
20 "-DOPENGL_INCLUDE_DIR=${libGL}/include"
21 "-DOPENGL_gl_LIBRARY:FILEPATH=${libGL}/lib/libGL.dylib"
22 "-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib"
23 "-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
24 "-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
27 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
30 description = "Create and manage windows containing OpenGL contexts";
32 FreeGLUT is an open source alternative to the OpenGL Utility Toolkit
33 (GLUT) library. GLUT (and hence FreeGLUT) allows the user to create and
34 manage windows containing OpenGL contexts on a wide range of platforms
35 and also read the mouse, keyboard and joystick functions. FreeGLUT is
36 intended to be a full replacement for GLUT, and has only a few
39 homepage = "https://freeglut.sourceforge.net/";
40 license = licenses.mit;
41 pkgConfigModules = [ "glut" ];
42 platforms = platforms.all;
43 maintainers = [ maintainers.bjornfor ];