nixpkgs/pkgs/development/libraries/fltk/default.nix
Daiderd Jordan 78623f492c
fltk: add cf-private on darwin
Undefined symbols for architecture x86_64:
      "_NSDefaultRunLoopMode", referenced from:
          fl_open_display() in Fl_cocoa.o
          fl_ready() in Fl_cocoa.o
          fl_wait(double) in Fl_cocoa.o
      "_OBJC_CLASS_$_NSArray", referenced from:
          objc-class-ref in Fl_cocoa.o
      "_OBJC_CLASS_$_NSData", referenced from:
          objc-class-ref in Fl_Sys_Menu_Bar.o
      "_OBJC_CLASS_$_NSDate", referenced from:
          objc-class-ref in Fl_cocoa.o
      "_OBJC_CLASS_$_NSDictionary", referenced from:
          objc-class-ref in Fl_cocoa.o
      "_OBJC_CLASS_$_NSURL", referenced from:
          objc-class-ref in Fl_Native_File_Chooser_MAC.o
    ld: symbol(s) not found for architecture x86_64
2018-11-07 23:47:24 +01:00

51 lines
1.2 KiB
Nix

{ stdenv, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
, libtiff, freetype, cf-private, Cocoa, AGL, GLUT
}:
let
version = "1.3.4";
in stdenv.mkDerivation {
name = "fltk-${version}";
src = fetchurl {
url = "http://fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
sha256 = "13y57pnayrkfzm8azdfvysm8b77ysac8zhhdsh8kxmb0x3203ay8";
};
patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
libGLU_combined
libjpeg
zlib
libpng
libXft
];
configureFlags = [
"--enable-gl"
"--enable-largefile"
"--enable-shared"
"--enable-threads"
"--enable-xft"
];
propagatedBuildInputs = [ inputproto ]
++ (if stdenv.isDarwin
then [ Cocoa AGL GLUT freetype libtiff cf-private /* Needed for NSDefaultRunLoopMode */ ]
else [ xlibsWrapper libXi freeglut ]);
enableParallelBuilding = true;
meta = {
description = "A C++ cross-platform lightweight GUI library";
homepage = http://www.fltk.org;
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
license = stdenv.lib.licenses.gpl2;
};
}