nixpkgs/pkgs/development/libraries/fltk/default.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorgproto, libXi
2018-07-11 16:36:39 +01:00
, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
, libtiff, freetype, cf-private, Cocoa, AGL, GLUT
2016-05-22 15:50:31 +01:00
}:
2018-07-11 16:36:39 +01:00
let
version = "1.3.5";
2018-07-11 16:36:39 +01:00
in stdenv.mkDerivation {
2016-05-22 15:50:31 +01:00
name = "fltk-${version}";
src = fetchurl {
2016-05-22 15:50:31 +01:00
url = "http://fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
sha256 = "00jp24z1818k9n6nn6lx7qflqf2k13g4kxr0p8v1d37kanhb4ac7";
};
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"
];
propagatedBuildInputs = [ xorgproto ]
2016-07-14 21:14:09 +01:00
++ (if stdenv.isDarwin
then [ Cocoa AGL GLUT freetype libtiff cf-private /* Needed for NSDefaultRunLoopMode */ ]
2016-07-14 21:14:09 +01:00
else [ xlibsWrapper libXi freeglut ]);
2016-05-26 09:35:29 +01:00
enableParallelBuilding = true;
meta = {
2016-05-22 15:50:31 +01:00
description = "A C++ cross-platform lightweight GUI library";
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;
};
2016-05-22 15:50:31 +01:00
}