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