summary refs log tree commit diff
path: root/pkgs/development/tools/parsing
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/tools/parsing
parent51289a41b011209fdf5955f3a9e1d3e69d70c5be (diff)
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/tools/parsing')
-rw-r--r--pkgs/development/tools/parsing/ragel/default.nix60
1 files changed, 29 insertions, 31 deletions
diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix
index f60d32f09ea26..2dec606254b41 100644
--- a/pkgs/development/tools/parsing/ragel/default.nix
+++ b/pkgs/development/tools/parsing/ragel/default.nix
@@ -5,40 +5,38 @@ let
   name = "ragel-${version}";
 in
 
-composableDerivation.composableDerivation {
-  initial = rec {
-    inherit name;
-    src = fetchurl {
-      url = "http://www.complang.org/ragel/${name}.tar.gz";
-      sha256 = "018cedc8a68be85cda330fc53d0bb8a1ca6ad39b1cf790eed0311e7baa5a2520";
-    };
+composableDerivation.composableDerivation {} {
+  inherit name;
+  src = fetchurl {
+    url = "http://www.complang.org/ragel/${name}.tar.gz";
+    sha256 = "018cedc8a68be85cda330fc53d0bb8a1ca6ad39b1cf790eed0311e7baa5a2520";
+  };
 
-    flags = {
-      doc = {
-        # require fig2dev & pdflatex (see README)
-        buildInputs = [transfig texLive];
-        # use post* because default values of buildPhase is empty.
-        postBuild = ''
-          pushd doc
-          make
-          popd
-        '';
-        postInstall = ''
-          pushd doc
-          make install
-          popd
-        '';
-      };
+  flags = {
+    doc = {
+      # require fig2dev & pdflatex (see README)
+      buildInputs = [transfig texLive];
+      # use post* because default values of buildPhase is empty.
+      postBuild = ''
+        pushd doc
+        make
+        popd
+      '';
+      postInstall = ''
+        pushd doc
+        make install
+        popd
+      '';
     };
+  };
 
-    cfg = {
-      docSupport = false;
-    };
+  cfg = {
+    docSupport = false;
+  };
 
-    meta = {
-      homepage = http://www.complang.org/ragel;
-      description = "State machine compiler";
-      license = "GPL-2";
-    };
+  meta = {
+    homepage = http://www.complang.org/ragel;
+    description = "State machine compiler";
+    license = "GPL-2";
   };
 }