fltk: get rid of composableDerivation
This commit is contained in:
parent
c7af2af455
commit
497679725e
|
@ -1,7 +1,5 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, fltk, openexr, libGLU_combined, openexr_ctl }:
|
{ stdenv, fetchurl, pkgconfig, fltk, openexr, libGLU_combined, openexr_ctl }:
|
||||||
|
|
||||||
assert fltk.glSupport;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name ="openexr_viewers-2.2.1";
|
name ="openexr_viewers-2.2.1";
|
||||||
|
|
||||||
|
@ -14,14 +12,14 @@ stdenv.mkDerivation {
|
||||||
./configure --prefix=$out --with-fltk-config=${fltk}/bin/fltk-config
|
./configure --prefix=$out --with-fltk-config=${fltk}/bin/fltk-config
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPahse = ''
|
buildPhase = ''
|
||||||
make LDFLAGS="`fltk-config --ldflags` -lGL -lfltk_gl"
|
make LDFLAGS="`fltk-config --ldflags` -lGL -lfltk_gl"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ openexr fltk libGLU_combined openexr_ctl ];
|
buildInputs = [ openexr fltk libGLU_combined openexr_ctl ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Application for viewing OpenEXR images on a display at various exposure settings";
|
description = "Application for viewing OpenEXR images on a display at various exposure settings";
|
||||||
homepage = http://openexr.com;
|
homepage = http://openexr.com;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{ stdenv, composableDerivation, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
|
{ stdenv, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
|
||||||
, freeglut, libGLU_combined, libjpeg, zlib, libXinerama, libXft, libpng
|
, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
|
||||||
, cfg ? {}
|
|
||||||
, darwin, libtiff, freetype
|
, darwin, libtiff, freetype
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let inherit (composableDerivation) edf; in
|
let
|
||||||
|
version = "1.3.4";
|
||||||
let version = "1.3.4"; in
|
in stdenv.mkDerivation {
|
||||||
composableDerivation.composableDerivation {} {
|
|
||||||
name = "fltk-${version}";
|
name = "fltk-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -18,6 +16,23 @@ composableDerivation.composableDerivation {} {
|
||||||
patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
|
patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libGLU_combined
|
||||||
|
libjpeg
|
||||||
|
zlib
|
||||||
|
libpng
|
||||||
|
libXft
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-gl"
|
||||||
|
"--enable-largefile"
|
||||||
|
"--enable-shared"
|
||||||
|
"--enable-threads"
|
||||||
|
"--enable-xft"
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ inputproto ]
|
propagatedBuildInputs = [ inputproto ]
|
||||||
++ (if stdenv.isDarwin
|
++ (if stdenv.isDarwin
|
||||||
then (with darwin.apple_sdk.frameworks; [Cocoa AGL GLUT freetype libtiff])
|
then (with darwin.apple_sdk.frameworks; [Cocoa AGL GLUT freetype libtiff])
|
||||||
|
@ -25,33 +40,6 @@ composableDerivation.composableDerivation {} {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
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 = {
|
meta = {
|
||||||
description = "A C++ cross-platform lightweight GUI library";
|
description = "A C++ cross-platform lightweight GUI library";
|
||||||
homepage = http://www.fltk.org;
|
homepage = http://www.fltk.org;
|
||||||
|
|
Loading…
Reference in New Issue