Commented someadditions out and corrected spelling - mkDerivationByConfiguration ruins all-packages.nix
svn path=/nixpkgs/trunk/; revision=9408
This commit is contained in:
parent
0de5cbedef
commit
3b8b925153
|
@ -209,10 +209,10 @@ rec {
|
||||||
|
|
||||||
# calls chooseOptionsByFlags2 with some preprocessing
|
# calls chooseOptionsByFlags2 with some preprocessing
|
||||||
# chooseOptionsByFlags2 returns an attribute set meant to be used to create new derivaitons.
|
# chooseOptionsByFlags2 returns an attribute set meant to be used to create new derivaitons.
|
||||||
# see mkDerivationByConfigruation in all-packages.nix and the examples given below.
|
# see mkDerivationByConfiguration in all-packages.nix and the examples given below.
|
||||||
# You can just copy paste them into all-packages.nix to test them..
|
# You can just copy paste them into all-packages.nix to test them..
|
||||||
|
|
||||||
chooseOptionsByFlags = { flagConfig, args, optionals ? [], defaults ? [],
|
/*chooseOptionsByFlags = { flagConfig, args, optionals ? [], defaults ? [],
|
||||||
collectExtraPhaseActions ? [] } :
|
collectExtraPhaseActions ? [] } :
|
||||||
let passedOptionals = filter ( x : __hasAttr x args ) optionals; # these are in optionals and in args
|
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>; }
|
# we simply merge in <optional_name> = { buildInputs = <arg.<optional_name>; pass = <arg.optional_name>; }
|
||||||
|
@ -223,7 +223,7 @@ rec {
|
||||||
passedOptionals ) );
|
passedOptionals ) );
|
||||||
|
|
||||||
in chooseOptionsByFlags2 flagConfigWithOptionals collectExtraPhaseActions args
|
in chooseOptionsByFlags2 flagConfigWithOptionals collectExtraPhaseActions args
|
||||||
( (getAttr ["flags"] defaults args) ++ passedOptionals);
|
( (getAttr ["flags"] defaults args) ++ passedOptionals);*/
|
||||||
|
|
||||||
chooseOptionsByFlags2 = flagConfig : collectExtraPhaseActions : args : flags :
|
chooseOptionsByFlags2 = flagConfig : collectExtraPhaseActions : args : flags :
|
||||||
let
|
let
|
||||||
|
@ -323,7 +323,7 @@ rec {
|
||||||
# * extra phase dependend commands can be added
|
# * extra phase dependend commands can be added
|
||||||
# Its easy to add your own stuff using co.collectAttrs or co.optsConcatStrs
|
# Its easy to add your own stuff using co.collectAttrs or co.optsConcatStrs
|
||||||
# ( perhaps this name will change?)
|
# ( perhaps this name will change?)
|
||||||
simpleFlagYesNoF = namePrefix : extraFlagAttrs : mkDerivationByConfigruation ( {
|
/* simpleFlagYesNoF = namePrefix : extraFlagAttrs : mkDerivationByConfiguration ( {
|
||||||
flagConfig = {
|
flagConfig = {
|
||||||
flag = { name = namePrefix + "simpleYes";
|
flag = { name = namePrefix + "simpleYes";
|
||||||
cfgOption = [ "--Yes" "--you-dont-need-a-list" ];
|
cfgOption = [ "--Yes" "--you-dont-need-a-list" ];
|
||||||
|
@ -380,7 +380,7 @@ rec {
|
||||||
";
|
";
|
||||||
configurePhase = co.extraConfigureCmd;
|
configurePhase = co.extraConfigureCmd;
|
||||||
};
|
};
|
||||||
} // extraFlagAttrs );
|
} // extraFlagAttrs ); */
|
||||||
|
|
||||||
|
|
||||||
simpleYes = simpleFlagYesNoF "" {} {
|
simpleYes = simpleFlagYesNoF "" {} {
|
||||||
|
|
|
@ -189,8 +189,8 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
# commented out because it's using the new configuration style proposal which is unstable
|
# commented out because it's using the new configuration style proposal which is unstable
|
||||||
/*
|
|
||||||
mkDerivationByConfigruation = { flagConfig ? {}, optionals ? [], defaults ? [],
|
/*mkDerivationByConfiguration = ({ flagConfig ? {}, optionals ? [], defaults ? [],
|
||||||
extraAttrs, collectExtraPhaseActions ? []} :
|
extraAttrs, collectExtraPhaseActions ? []} :
|
||||||
args: with args.lib; with args;
|
args: with args.lib; with args;
|
||||||
if ( __isAttrs extraAttrs ) then builtins.throw "the argument extraAttrs needs to be a function beeing passed co, but attribute set passed "
|
if ( __isAttrs extraAttrs ) then builtins.throw "the argument extraAttrs needs to be a function beeing passed co, but attribute set passed "
|
||||||
|
@ -199,8 +199,8 @@ rec {
|
||||||
args.stdenv.mkDerivation (
|
args.stdenv.mkDerivation (
|
||||||
{
|
{
|
||||||
inherit (co) configureFlags buildInputs /*flags* /;
|
inherit (co) configureFlags buildInputs /*flags* /;
|
||||||
} // extraAttrs co // co.pass // co.flags_prefixed );
|
} // extraAttrs co // co.pass // co.flags_prefixed ));*/
|
||||||
*/
|
|
||||||
|
|
||||||
# Check absence of non-used options
|
# Check absence of non-used options
|
||||||
checker = x: flag: opts: config:
|
checker = x: flag: opts: config:
|
||||||
|
@ -4141,12 +4141,12 @@ rec {
|
||||||
#inherit (xlibs) libX11;
|
#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 {
|
jackaudio = import ../misc/jackaudio {
|
||||||
inherit mkDerivationByConfigruation
|
inherit mkDerivationByConfiguration
|
||||||
ncurses lib stdenv fetchurl;
|
ncurses lib stdenv fetchurl;
|
||||||
flags = [ "posix_shm" "timestamps"];
|
flags = [ "posix_shm" "timestamps"];
|
||||||
};
|
};*/
|
||||||
|
|
||||||
keynav = import ../tools/X11/keynav {
|
keynav = import ../tools/X11/keynav {
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
|
|
Loading…
Reference in a new issue