2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, xlibsWrapper, xorgproto, libXi
|
2019-11-07 16:39:41 +00:00
|
|
|
, freeglut, libGL, libGLU, libjpeg, zlib, libXft, libpng
|
2019-06-19 18:05:27 +00:00
|
|
|
, libtiff, freetype, Cocoa, AGL, GLUT
|
2016-05-22 14:50:31 +00:00
|
|
|
}:
|
2007-08-20 10:42:09 +00:00
|
|
|
|
2018-07-11 15:36:39 +00:00
|
|
|
let
|
2019-03-10 10:12:42 +00:00
|
|
|
version = "1.3.5";
|
2019-06-19 18:05:27 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "fltk";
|
|
|
|
inherit version;
|
2007-08-20 10:42:09 +00:00
|
|
|
|
2010-07-28 18:01:17 +00:00
|
|
|
src = fetchurl {
|
2019-11-16 00:41:23 +00:00
|
|
|
url = "https://www.fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
|
2019-03-10 10:12:42 +00:00
|
|
|
sha256 = "00jp24z1818k9n6nn6lx7qflqf2k13g4kxr0p8v1d37kanhb4ac7";
|
2009-03-06 23:21:28 +00:00
|
|
|
};
|
2007-08-20 10:42:09 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
|
2016-10-23 04:51:29 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-11-07 16:39:41 +00:00
|
|
|
buildInputs = [ libGLU libGL libjpeg zlib libpng libXft ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
|
2018-07-11 15:36:39 +00:00
|
|
|
|
2019-06-19 18:05:27 +00:00
|
|
|
propagatedBuildInputs = [ xorgproto ]
|
|
|
|
++ (if stdenv.isDarwin
|
|
|
|
then [ freetype libtiff ]
|
|
|
|
else [ xlibsWrapper libXi freeglut ]);
|
2018-07-11 15:36:39 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-gl"
|
|
|
|
"--enable-largefile"
|
|
|
|
"--enable-shared"
|
|
|
|
"--enable-threads"
|
|
|
|
"--enable-xft"
|
|
|
|
];
|
|
|
|
|
2016-05-26 08:35:29 +00:00
|
|
|
enableParallelBuilding = true;
|
2008-12-20 01:20:35 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-05-22 14:50:31 +00:00
|
|
|
description = "A C++ cross-platform lightweight GUI library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.fltk.org";
|
2019-06-19 18:05:27 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
license = licenses.gpl2;
|
2007-08-20 10:42:09 +00:00
|
|
|
};
|
2008-12-20 01:20:35 +00:00
|
|
|
}
|