2018-12-31 04:40:47 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorgproto, libXi
|
2018-07-11 17:36:39 +02:00
|
|
|
, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
|
2018-11-07 19:50:54 +01:00
|
|
|
, libtiff, freetype, cf-private, Cocoa, AGL, GLUT
|
2016-05-22 16:50:31 +02:00
|
|
|
}:
|
2007-08-20 12:42:09 +02:00
|
|
|
|
2018-07-11 17:36:39 +02:00
|
|
|
let
|
2019-03-10 11:12:42 +01:00
|
|
|
version = "1.3.5";
|
2018-07-11 17:36:39 +02:00
|
|
|
in stdenv.mkDerivation {
|
2016-05-22 16:50:31 +02:00
|
|
|
name = "fltk-${version}";
|
2007-08-20 12:42:09 +02:00
|
|
|
|
2010-07-28 20:01:17 +02:00
|
|
|
src = fetchurl {
|
2016-05-22 16:50:31 +02:00
|
|
|
url = "http://fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
|
2019-03-10 11:12:42 +01:00
|
|
|
sha256 = "00jp24z1818k9n6nn6lx7qflqf2k13g4kxr0p8v1d37kanhb4ac7";
|
2009-03-07 00:21:28 +01:00
|
|
|
};
|
2007-08-20 12:42:09 +02:00
|
|
|
|
2016-10-23 06:51:29 +02:00
|
|
|
patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
|
|
|
|
|
2016-05-26 10:35:29 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-07-11 17:36:39 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libGLU_combined
|
|
|
|
libjpeg
|
|
|
|
zlib
|
|
|
|
libpng
|
|
|
|
libXft
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-gl"
|
|
|
|
"--enable-largefile"
|
|
|
|
"--enable-shared"
|
|
|
|
"--enable-threads"
|
|
|
|
"--enable-xft"
|
|
|
|
];
|
|
|
|
|
2018-12-31 04:40:47 +01:00
|
|
|
propagatedBuildInputs = [ xorgproto ]
|
2016-07-14 22:14:09 +02:00
|
|
|
++ (if stdenv.isDarwin
|
2018-11-07 19:50:54 +01:00
|
|
|
then [ Cocoa AGL GLUT freetype libtiff cf-private /* Needed for NSDefaultRunLoopMode */ ]
|
2016-07-14 22:14:09 +02:00
|
|
|
else [ xlibsWrapper libXi freeglut ]);
|
2008-12-20 02:20:35 +01:00
|
|
|
|
2016-05-26 10:35:29 +02:00
|
|
|
enableParallelBuilding = true;
|
2008-12-20 02:20:35 +01:00
|
|
|
|
2009-03-07 00:21:28 +01:00
|
|
|
meta = {
|
2016-05-22 16:50:31 +02:00
|
|
|
description = "A C++ cross-platform lightweight GUI library";
|
2010-07-28 20:01:17 +02:00
|
|
|
homepage = http://www.fltk.org;
|
2016-07-14 22:14:09 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
2016-05-22 16:50:31 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2007-08-20 12:42:09 +02:00
|
|
|
};
|
2016-05-22 16:50:31 +02:00
|
|
|
|
2008-12-20 02:20:35 +01:00
|
|
|
}
|