1 { lib, stdenv, fetchurl, pkg-config, xlibsWrapper, xorgproto, libXi
2 , freeglut, libGL, libGLU, libjpeg, zlib, libXft, libpng
3 , libtiff, freetype, Cocoa, AGL, GLUT
15 url = "https://www.fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
16 sha256 = "00jp24z1818k9n6nn6lx7qflqf2k13g4kxr0p8v1d37kanhb4ac7";
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 enableParallelBuilding = true;
41 description = "A C++ cross-platform lightweight GUI library";
42 homepage = "https://www.fltk.org";
43 platforms = platforms.linux ++ platforms.darwin;
44 license = licenses.gpl2;