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

50 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorgproto, libXi
2019-11-10 17:44:34 +01:00
, freeglut, libGLU, libGL, libjpeg, zlib, libXft, libpng
2019-06-19 20:05:27 +02:00
, libtiff, freetype, Cocoa, AGL, GLUT
2018-11-20 05:06:27 +01:00
}:
let
version = "1.4.x-r13121";
2019-06-19 20:05:27 +02:00
in
stdenv.mkDerivation {
2019-08-13 23:52:01 +02:00
pname = "fltk";
inherit version;
2018-11-20 05:06:27 +01:00
src = fetchurl {
url = "https://www.fltk.org/pub/fltk/snapshots/fltk-${version}.tar.gz";
2018-11-20 05:06:27 +01:00
sha256 = "1v8wxvxcbk99i82x2v5fpqg5vj8n7g8a38g30ry7nzcjn5sf3r63";
};
patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
nativeBuildInputs = [ pkgconfig ];
2019-11-10 17:44:34 +01:00
buildInputs = [ libGLU libGL libjpeg zlib libpng libXft ]
2019-06-19 20:05:27 +02:00
++ stdenv.lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
2018-11-20 05:06:27 +01:00
2019-06-19 20:05:27 +02:00
propagatedBuildInputs = [ xorgproto ]
++ (if stdenv.isDarwin
then [ freetype libtiff ]
else [ xlibsWrapper libXi freeglut ]);
2018-11-20 05:06:27 +01:00
configureFlags = [
"--enable-gl"
"--enable-largefile"
"--enable-shared"
"--enable-threads"
"--enable-xft"
];
2019-06-19 20:05:27 +02:00
preConfigure = "make clean";
2018-11-20 05:06:27 +01:00
enableParallelBuilding = true;
2019-06-19 20:05:27 +02:00
meta = with stdenv.lib; {
2018-11-20 05:06:27 +01:00
description = "A C++ cross-platform lightweight GUI library";
homepage = "https://www.fltk.org";
2019-06-19 20:05:27 +02:00
platforms = platforms.linux ++ platforms.darwin;
license = licenses.gpl2;
2018-11-20 05:06:27 +01:00
};
}