forked from mirrors/nixpkgs
* Die tabs die. Also, renamed FullDepEntry and PackEntry to
fullDepEntry and packEntry for consistency. svn path=/nixpkgs/trunk/; revision=15549
This commit is contained in:
parent
27152e987a
commit
2f33cdec38
|
@ -13,64 +13,45 @@ Usage:
|
|||
See trace/nixpkgs/trunk/pkgs/top-level/builder-defs.nix for some predefined build steps
|
||||
|
||||
*/
|
||||
args:
|
||||
with args;
|
||||
with lib;
|
||||
let
|
||||
inherit (builtins)
|
||||
head tail isList isAttrs;
|
||||
args:
|
||||
|
||||
with args;
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (builtins) head tail isList isAttrs;
|
||||
in
|
||||
|
||||
rec {
|
||||
|
||||
/*
|
||||
let shelllib = rec {
|
||||
a= {
|
||||
text = "aaaa";
|
||||
deps = [b c];
|
||||
};
|
||||
b = {
|
||||
text = "b";
|
||||
};
|
||||
c = {
|
||||
text = "c";
|
||||
deps = [];
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
[textClosure [shelllib.a]
|
||||
textclosure shelllib.a];
|
||||
textClosureDupList = arg:
|
||||
if isList arg then
|
||||
textClosureDupList {text = ""; deps = arg;}
|
||||
else
|
||||
concatLists (map textClosureDupList arg.deps) ++ [arg];
|
||||
|
||||
|
||||
*/
|
||||
|
||||
textClosureDupList = arg:
|
||||
(
|
||||
if isList arg then
|
||||
textClosureDupList {text = ""; deps = arg;}
|
||||
else
|
||||
(concatLists (map textClosureDupList arg.deps)) ++ [arg]
|
||||
);
|
||||
textClosureDupListOverridable = predefined: arg:
|
||||
if isList arg then
|
||||
textClosureDupListOverridable predefined {text = ""; deps = arg;}
|
||||
else if isAttrs arg then
|
||||
concatLists (map (textClosureDupListOverridable predefined) arg.deps) ++ [arg]
|
||||
else
|
||||
textClosureDupListOverridable predefined (getAttr [arg] [] predefined);
|
||||
|
||||
textClosureDupListOverridable = predefined: arg:
|
||||
(
|
||||
if isList arg then
|
||||
textClosureDupListOverridable predefined {text = ""; deps = arg;}
|
||||
else if isAttrs arg then
|
||||
(concatLists (map (textClosureDupListOverridable predefined) arg.deps)) ++ [arg]
|
||||
else
|
||||
textClosureDupListOverridable predefined (getAttr [arg] [] predefined)
|
||||
);
|
||||
textClosureListOverridable = predefined: arg:
|
||||
map (x: x.text) (uniqList {inputList = textClosureDupListOverridable predefined arg;});
|
||||
|
||||
textClosureOverridable = predefined: arg: concatStringsSep "\n" (textClosureListOverridable predefined arg);
|
||||
|
||||
textClosureMapOveridable = f: predefined: arg:
|
||||
concatStringsSep "\n" (map f (textClosureListOverridable predefined arg));
|
||||
|
||||
textClosureListOverridable = predefined: arg:
|
||||
(map (x : x.text)
|
||||
(uniqList {inputList = textClosureDupListOverridable predefined arg;}));
|
||||
textClosureOverridable = predefined: arg: concatStringsSep "\n" (textClosureListOverridable predefined arg);
|
||||
|
||||
textClosureMapOveridable = f: predefined: arg:
|
||||
concatStringsSep "\n" (map f (textClosureListOverridable predefined arg));
|
||||
noDepEntry = text: {inherit text; deps = [];};
|
||||
fullDepEntry = text: deps: {inherit text deps;};
|
||||
packEntry = deps: {inherit deps; text="";};
|
||||
|
||||
noDepEntry = text : {inherit text;deps = [];};
|
||||
FullDepEntry = text : deps: {inherit text deps;};
|
||||
PackEntry = deps: {inherit deps; text="";};
|
||||
# Old names - don't use.
|
||||
FullDepEntry = fullDepEntry;
|
||||
PackEntry = packEntry;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue