1 { lib, stdenv, fetchurl, pkg-config, xlibsWrapper, xorgproto, libXi
2 , freeglut, libGLU, libGL, libjpeg, zlib, libXft, libpng
3 , libtiff, freetype, Cocoa, AGL, GLUT
7 version = "1.4.x-r13121";
15 url = "https://www.fltk.org/pub/fltk/snapshots/fltk-${version}.tar.gz";
16 sha256 = "1v8wxvxcbk99i82x2v5fpqg5vj8n7g8a38g30ry7nzcjn5sf3r63";
19 patches = lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
21 nativeBuildInputs = [ pkg-config ];
22 buildInputs = [ libGLU libGL libjpeg zlib libpng libXft ]
23 ++ lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
25 propagatedBuildInputs = [ xorgproto ]
26 ++ (if stdenv.isDarwin
27 then [ freetype libtiff ]
28 else [ xlibsWrapper libXi freeglut ]);
38 preConfigure = "make clean";
40 enableParallelBuilding = true;
43 description = "A C++ cross-platform lightweight GUI library";
44 homepage = "https://www.fltk.org";
45 platforms = platforms.linux ++ platforms.darwin;
46 license = licenses.gpl2;