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

47 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorgproto, libXi
2018-07-11 17:36:39 +02:00
, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
2019-06-19 20:05:27 +02:00
, libtiff, freetype, Cocoa, AGL, GLUT
2016-05-22 16:50:31 +02:00
}:
2018-07-11 17:36:39 +02:00
let
version = "1.3.5";
2019-06-19 20:05:27 +02:00
in
stdenv.mkDerivation {
2019-08-13 23:52:01 +02:00
pname = "fltk";
inherit version;
src = fetchurl {
2016-05-22 16:50:31 +02: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 10:35:29 +02:00
nativeBuildInputs = [ pkgconfig ];
2019-06-19 20:05:27 +02:00
buildInputs = [ libGLU_combined libjpeg zlib libpng libXft ]
++ stdenv.lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
2018-07-11 17:36:39 +02:00
2019-06-19 20:05:27 +02:00
propagatedBuildInputs = [ xorgproto ]
++ (if stdenv.isDarwin
then [ freetype libtiff ]
else [ xlibsWrapper libXi freeglut ]);
2018-07-11 17:36:39 +02:00
configureFlags = [
"--enable-gl"
"--enable-largefile"
"--enable-shared"
"--enable-threads"
"--enable-xft"
];
2016-05-26 10:35:29 +02:00
enableParallelBuilding = true;
2019-06-19 20:05:27 +02:00
meta = with stdenv.lib; {
2016-05-22 16:50:31 +02:00
description = "A C++ cross-platform lightweight GUI library";
homepage = http://www.fltk.org;
2019-06-19 20:05:27 +02:00
platforms = platforms.linux ++ platforms.darwin;
license = licenses.gpl2;
};
}