summary refs log tree commit diff
path: root/pkgs/development/libraries/fltk/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/fltk/default.nix')
-rw-r--r--pkgs/development/libraries/fltk/default.nix56
1 files changed, 22 insertions, 34 deletions
diff --git a/pkgs/development/libraries/fltk/default.nix b/pkgs/development/libraries/fltk/default.nix
index ddc962d0aab6..405d80031e37 100644
--- a/pkgs/development/libraries/fltk/default.nix
+++ b/pkgs/development/libraries/fltk/default.nix
@@ -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;