summary refs log tree commit diff
path: root/pkgs/development/libraries/fltk
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2009-03-06 23:21:28 +0000
committerMarc Weber <marco-oweber@gmx.de>2009-03-06 23:21:28 +0000
commitb56ed358510c2c2f44af2dd5bd278c24a0b77bcd (patch)
tree3209e32b4745e13d189faeb3b5f3b61c3f9b30ca /pkgs/development/libraries/fltk
parent51289a41b011209fdf5955f3a9e1d3e69d70c5be (diff)
downloadnixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.tar
nixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.tar.gz
nixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.tar.bz2
nixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.tar.lz
nixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.tar.xz
nixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.tar.zst
nixpkgs-b56ed358510c2c2f44af2dd5bd278c24a0b77bcd.zip
replacing applyAndFun by lib.defaultOverridableDelayableArgs
applyAndFun has a bug resulting in the same arg beeing added more than
once when using a concatenating merge function for the attr set.

I've tried giving the function a name "overridableDelayableArgs" which
resembles its usage much more.

important refactoring:
  applyAndFun had .fun and .funMerge only when passing the merge
  function lib.mergeOrApply

  composableDerivation {
    initial = {
      ...
    };
  }

to

  overridableDelayableArgs has always .replace and .merge
  composableDerivation {} {
    ...
  }

svn path=/nixpkgs/trunk/; revision=14428
Diffstat (limited to 'pkgs/development/libraries/fltk')
-rw-r--r--pkgs/development/libraries/fltk/default.nix72
1 files changed, 35 insertions, 37 deletions
diff --git a/pkgs/development/libraries/fltk/default.nix b/pkgs/development/libraries/fltk/default.nix
index 6632088ade7..d3a9f9ea3e8 100644
--- a/pkgs/development/libraries/fltk/default.nix
+++ b/pkgs/development/libraries/fltk/default.nix
@@ -1,47 +1,45 @@
 args: with args;
 let inherit (args.composableDerivation) composableDerivation edf; in
-composableDerivation {
-  initial = {
+composableDerivation {} {
 
-    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";
-    };
+  src = args.fetchurl {
+    url = ftp://ftp.easysw.com/pub/fltk/snapshots/fltk-2.0.x-r6483.tar.bz2;
+    sha256 = "1n8b53r5p0zb4sbvr6pj8aasls4zjwksv1sdc3r3pzb20fikp5jb";
+  };
 
-    propagatedBuildInputs=[x11 inputproto libXi freeglut];
+  propagatedBuildInputs=[x11 inputproto libXi freeglut];
 
-    buildInputs = [ args.pkgconfig ];
+  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;
-    };
+  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;
-    };
+  meta = {
+      description = "a C++ cross platform lightweight gui library binding";
+      homepage = http://www.fltk.org;
   };
 }