2023-02-16 17:41:37 +00:00
|
|
|
{ lib, stdenv, fetchurl, libICE, libXext, libXi, libXrandr, libXxf86vm, libGL, libGLU, cmake
|
|
|
|
, testers
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "freeglut";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "3.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-16 17:41:37 +00:00
|
|
|
url = "mirror://sourceforge/freeglut/freeglut-${finalAttrs.version}.tar.gz";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-PAvLkV2bGAqX7a69ARt6HeVFg6g4ZE3NQrsOoMbz6uw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-11-02 22:02:43 +00:00
|
|
|
buildInputs = [ libICE libXext libXi libXrandr libXxf86vm libGL libGLU ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
cmakeFlags = lib.optionals stdenv.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DOPENGL_INCLUDE_DIR=${libGL}/include"
|
|
|
|
"-DOPENGL_gl_LIBRARY:FILEPATH=${libGL}/lib/libGL.dylib"
|
|
|
|
"-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib"
|
|
|
|
"-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
|
|
|
|
"-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
|
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Create and manage windows containing OpenGL contexts";
|
|
|
|
longDescription = ''
|
|
|
|
FreeGLUT is an open source alternative to the OpenGL Utility Toolkit
|
|
|
|
(GLUT) library. GLUT (and hence FreeGLUT) allows the user to create and
|
|
|
|
manage windows containing OpenGL contexts on a wide range of platforms
|
|
|
|
and also read the mouse, keyboard and joystick functions. FreeGLUT is
|
|
|
|
intended to be a full replacement for GLUT, and has only a few
|
|
|
|
differences.
|
|
|
|
'';
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://freeglut.sourceforge.net/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-02-16 17:41:37 +00:00
|
|
|
pkgConfigModules = [ "glut" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
})
|