summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2007-10-06 18:17:47 +0000
committerMichael Raskin <7c6f434c@mail.ru>2007-10-06 18:17:47 +0000
commit8c7f2153818ce63533177f144305a88932ff042c (patch)
tree94fd7860cdf8ec7ffe55e496598e927344a6b86c /pkgs
parent7aec010f6a5e378df111b2f6c421d5bc9d687d29 (diff)
Uncommented mkDerivationByName. Now it doesn't break everything
svn path=/nixpkgs/trunk/; revision=9415
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/lib/default-unstable.nix8
-rw-r--r--pkgs/top-level/all-packages.nix13
2 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/lib/default-unstable.nix b/pkgs/lib/default-unstable.nix
index b718383e5446d..2de6ce19b95e0 100644
--- a/pkgs/lib/default-unstable.nix
+++ b/pkgs/lib/default-unstable.nix
@@ -212,7 +212,7 @@ rec {
   # see mkDerivationByConfiguration in all-packages.nix and the examples given below.
   # You can just copy paste them into all-packages.nix to test them..
 
-  /*chooseOptionsByFlags = { flagConfig, args, optionals ? [], defaults ? [],
+  chooseOptionsByFlags = { flagConfig, args, optionals ? [], defaults ? [],
                            collectExtraPhaseActions ? [] } :
     let passedOptionals = filter ( x : __hasAttr x args ) optionals; # these are in optionals and in args
         # we simply merge in <optional_name> = { buildInputs = <arg.<optional_name>; pass = <arg.optional_name>; }
@@ -223,7 +223,7 @@ rec {
                passedOptionals ) );
 
     in chooseOptionsByFlags2 flagConfigWithOptionals collectExtraPhaseActions args 
-       ( (getAttr ["flags"] defaults args) ++ passedOptionals);*/
+       ( (getAttr ["flags"] defaults args) ++ passedOptionals);
 
   chooseOptionsByFlags2 = flagConfig : collectExtraPhaseActions : args : flags :
     let   
@@ -323,7 +323,7 @@ rec {
   # * extra phase dependend commands can be added
   #   Its easy to add your own stuff using co.collectAttrs or co.optsConcatStrs 
   #   ( perhaps this name will change?)
-/*  simpleFlagYesNoF = namePrefix : extraFlagAttrs : mkDerivationByConfiguration ( {
+  simpleFlagYesNoF = namePrefix : extraFlagAttrs : mkDerivationByConfiguration ( {
     flagConfig = {
       flag    = { name = namePrefix + "simpleYes"; 
                   cfgOption = [ "--Yes" "--you-dont-need-a-list" ]; 
@@ -380,7 +380,7 @@ rec {
       ";
     configurePhase = co.extraConfigureCmd;
     };
-  } // extraFlagAttrs ); */
+  } // extraFlagAttrs ); 
 
 
   simpleYes = simpleFlagYesNoF "" {} {
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 00961d8f2c55e..5b93cf9590165 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -124,6 +124,7 @@ rec {
   lib = library;
 
   library = import ../lib;
+  lib_unstable = import ../lib/default-unstable.nix;
 
   # Return an attribute from the Nixpkgs configuration file, or
   # a default value if the attribute doesn't exist.
@@ -190,16 +191,16 @@ rec {
 
   # commented out because it's using the new configuration style proposal which is unstable
   
-  /*mkDerivationByConfiguration = ({ flagConfig ? {}, optionals ? [], defaults ? [],  
+  mkDerivationByConfiguration = ({ flagConfig ? {}, optionals ? [], defaults ? [],  
         extraAttrs, collectExtraPhaseActions ? []} :
-    args: with args.lib; with args;
+    args: with args.lib_unstable; with args;
     if ( __isAttrs extraAttrs ) then builtins.throw "the argument extraAttrs needs to be a function beeing passed co, but attribute set passed "
     else
     let co = chooseOptionsByFlags { inherit args flagConfig optionals defaults collectExtraPhaseActions; }; in
       args.stdenv.mkDerivation ( 
       {
-        inherit (co) configureFlags buildInputs /*flags* /;
-      } // extraAttrs co  // co.pass // co.flags_prefixed ));*/
+        inherit (co) configureFlags buildInputs /*flags*/;
+      } // extraAttrs co  // co.pass // co.flags_prefixed ));
   
 
   # Check absence of non-used options
@@ -4145,12 +4146,12 @@ rec {
     #inherit (xlibs) libX11;
   #};
 
-  /*# using the new configuration style proposal which is unstable
+  # using the new configuration style proposal which is unstable
   jackaudio = import ../misc/jackaudio {
    inherit mkDerivationByConfiguration 
            ncurses lib stdenv fetchurl;
    flags = [ "posix_shm" "timestamps"];
-  };*/
+  };
  
   keynav = import ../tools/X11/keynav {
 	inherit stdenv fetchurl;