summary refs log tree commit diff
path: root/pkgs/development/libraries/fltk
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2008-12-20 01:20:35 +0000
committerMarc Weber <marco-oweber@gmx.de>2008-12-20 01:20:35 +0000
commite996113be7f41f067aaefac881c540b5ceb8d2d4 (patch)
tree177f16552ca2d05020c3d45a0b45502556a09502 /pkgs/development/libraries/fltk
parent5ab6464edb9bbc2a9aa15122ffc02b57ad236bb7 (diff)
downloadnixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar
nixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.gz
nixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.bz2
nixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.lz
nixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.xz
nixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.zst
nixpkgs-e996113be7f41f067aaefac881c540b5ceb8d2d4.zip
removed mkDerivationByConfiguration, using composableDerivation instead
qgis, vim_configurable both work now

svn path=/nixpkgs/trunk/; revision=13661
Diffstat (limited to 'pkgs/development/libraries/fltk')
-rw-r--r--pkgs/development/libraries/fltk/default.nix60
1 files changed, 36 insertions, 24 deletions
diff --git a/pkgs/development/libraries/fltk/default.nix b/pkgs/development/libraries/fltk/default.nix
index 10034035ef1..6632088ade7 100644
--- a/pkgs/development/libraries/fltk/default.nix
+++ b/pkgs/development/libraries/fltk/default.nix
@@ -1,35 +1,47 @@
-args:
-( args.mkDerivationByConfiguration {
-    flagConfig = {
-      mandatory = { propagatedBuildInputs=["x11" "inputproto" "libXi"]; 
-                    blocks = ["cygwin" "quartz"]; }; # cgywin quartz and much more not yet tested
-      cygwin = { cfgOption = "--enable-cygwin"; }; #         use the CygWin libraries default=no
-      debug = { cfgOption = "--enable-debug"; }; #          turn on debugging default=no
-      gl = { cfgOption = "--enable-gl"; buildInputs = [ "mesa" ]; }; #             turn on OpenGL support default=yes
-      shared = { cfgOption = "--enable-shared"; }; #         turn on shared libraries default=no
-      threads = { cfgOption = "--enable-threads"; }; #        enable multi-threading support
-      quartz = { cfgOption = "--enable-quartz"; buildInputs = "quartz"; }; # don't konw yet what quartz is #         use Quartz instead of Quickdraw (default=no)
-      largefile = { cfgOption = "--disable-largefile"; }; #     omit support for large files
-      useNixLibs = { implies = [ "nixjpeg" "nixpng" "nixzlib" ]; }; # use nix libraries only
-      nixjpeg = { cfgOption = "--disable-localjpeg"; buildInputs = "libjpeg"; }; #      use local JPEG library, default=auto
-      nixzlib = { cfgOption = "--disable-localzlib"; buildInputs = "zlib"; }; #      use local ZLIB library, default=auto
-      nixpng = { cfgOption = "--disable-localpng"; buildInputs = "libpng"; }; #       use local PNG library, default=auto
-      xinerama = { cfgOption = "--enable-xinerama"; buildInputs = "xinerama"; }; #       turn on Xinerama support default=no
-      xft = { cfgOption = "--enable-xft"; buildInputs="xft"; }; #            turn on Xft support default=no
-      xdbe = { cfgOption = "--enable-xdbe"; }; #           turn on Xdbe support default=no
-    }; 
+args: with args;
+let inherit (args.composableDerivation) composableDerivation edf; in
+composableDerivation {
+  initial = {
 
-    extraAttrs = co : {
-      name = "fltk-2.0.x-r6483";
+    name = "fltk-2.0.x-r6483";
 
     src = args.fetchurl {
       url = ftp://ftp.easysw.com/pub/fltk/snapshots/fltk-2.0.x-r6483.tar.bz2;
       sha256 = "1n8b53r5p0zb4sbvr6pj8aasls4zjwksv1sdc3r3pzb20fikp5jb";
     };
 
-    meta = { 
+    propagatedBuildInputs=[x11 inputproto libXi freeglut];
+
+    buildInputs = [ args.pkgconfig ];
+
+    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 = [ mesa ]; }; }  #             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;
+    };
+
+    meta = {
         description = "a C++ cross platform lightweight gui library binding";
         homepage = http://www.fltk.org;
     };
   };
-} ) args
+}