fltk: get rid of composableDerivation

This commit is contained in:
Frederik Rietdijk 2018-07-11 17:36:39 +02:00
parent c7af2af455
commit 497679725e
2 changed files with 24 additions and 38 deletions

View File

@ -1,7 +1,5 @@
{ stdenv, fetchurl, pkgconfig, fltk, openexr, libGLU_combined, openexr_ctl }:
assert fltk.glSupport;
stdenv.mkDerivation {
name ="openexr_viewers-2.2.1";
@ -14,14 +12,14 @@ stdenv.mkDerivation {
./configure --prefix=$out --with-fltk-config=${fltk}/bin/fltk-config
'';
buildPahse = ''
buildPhase = ''
make LDFLAGS="`fltk-config --ldflags` -lGL -lfltk_gl"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openexr fltk libGLU_combined openexr_ctl ];
meta = {
meta = {
description = "Application for viewing OpenEXR images on a display at various exposure settings";
homepage = http://openexr.com;
platforms = stdenv.lib.platforms.linux;

View File

@ -1,13 +1,11 @@
{ stdenv, composableDerivation, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
, freeglut, libGLU_combined, libjpeg, zlib, libXinerama, libXft, libpng
, cfg ? {}
{ stdenv, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
, darwin, libtiff, freetype
}:
let inherit (composableDerivation) edf; in
let version = "1.3.4"; in
composableDerivation.composableDerivation {} {
let
version = "1.3.4";
in stdenv.mkDerivation {
name = "fltk-${version}";
src = fetchurl {
@ -18,6 +16,23 @@ composableDerivation.composableDerivation {} {
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 (with darwin.apple_sdk.frameworks; [Cocoa AGL GLUT freetype libtiff])
@ -25,33 +40,6 @@ composableDerivation.composableDerivation {} {
enableParallelBuilding = true;
flags =
# this could be tidied up (?).. eg why does it require freeglut without glSupport?
edf { name = "cygwin"; } # use the CygWin libraries default=no
// edf { name = "debug"; } # turn on debugging default=no
// edf { name = "gl"; enable = { buildInputs = [ libGLU_combined ]; }; } # turn on OpenGL support default=yes
// edf { name = "shared"; } # turn on shared libraries default=no
// edf { name = "threads"; } # enable multi-threading support
// edf { name = "quartz"; enable = { buildInputs = "quartz"; }; } # don't konw yet what quartz is # use Quartz instead of Quickdraw (default=no)
// edf { name = "largefile"; } # omit support for large files
// edf { name = "localjpeg"; disable = { buildInputs = [libjpeg]; }; } # use local JPEG library, default=auto
// edf { name = "localzlib"; disable = { buildInputs = [zlib]; }; } # use local ZLIB library, default=auto
// edf { name = "localpng"; disable = { buildInputs = [libpng]; }; } # use local PNG library, default=auto
// edf { name = "xinerama"; enable = { buildInputs = [libXinerama]; }; } # turn on Xinerama support default=no
// edf { name = "xft"; enable = { buildInputs=[libXft]; }; } # turn on Xft support default=no
// edf { name = "xdbe"; }; # turn on Xdbe support default=no
cfg = {
largefileSupport = true; # is default
glSupport = true; # doesn't build without it. Why?
localjpegSupport = false;
localzlibSupport = false;
localpngSupport = false;
sharedSupport = true;
threadsSupport = true;
xftSupport = true;
} // cfg;
meta = {
description = "A C++ cross-platform lightweight GUI library";
homepage = http://www.fltk.org;