summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-07-13 12:46:12 +0200
committerGitHub <noreply@github.com>2018-07-13 12:46:12 +0200
commita659bb01a9ab8394703c1d2dcae5cbed34b0c262 (patch)
tree8ce516851d452f7e0e017fb0db69998413b47489 /pkgs/development/libraries
parent32f4fcaefe64944cbcbb96352ada4c578200ebff (diff)
parent497679725edad2361f4a1f70d3cca6691c57cea0 (diff)
downloadnixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.tar
nixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.tar.gz
nixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.tar.bz2
nixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.tar.lz
nixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.tar.xz
nixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.tar.zst
nixlib-a659bb01a9ab8394703c1d2dcae5cbed34b0c262.zip
Merge pull request #43364 from FRidh/fltk
fltk: get rid of composableDerivation
Diffstat (limited to 'pkgs/development/libraries')
-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;