Rename misc.nix -> deprecated.nix

This commit is contained in:
Eelco Dolstra 2015-07-23 17:41:35 +02:00
parent 637e35deb9
commit 0ae8b365b3
6 changed files with 5 additions and 7 deletions

View File

@ -6,7 +6,6 @@ with {
inherit (import ./default.nix) fold; inherit (import ./default.nix) fold;
inherit (import ./strings.nix) concatStringsSep; inherit (import ./strings.nix) concatStringsSep;
inherit (import ./lists.nix) concatMap concatLists all deepSeqList; inherit (import ./lists.nix) concatMap concatLists all deepSeqList;
inherit (import ./misc.nix) maybeAttr;
}; };
rec { rec {
@ -86,7 +85,7 @@ rec {
foldAttrs = op: nul: list_of_attrs: foldAttrs = op: nul: list_of_attrs:
fold (n: a: fold (n: a:
fold (name: o: fold (name: o:
o // (listToAttrs [{inherit name; value = op n.${name} (maybeAttr name nul a); }]) o // (listToAttrs [{inherit name; value = op n.${name} (a.${name} or nul); }])
) a (attrNames n) ) a (attrNames n)
) {} list_of_attrs; ) {} list_of_attrs;

View File

@ -11,7 +11,7 @@ let
types = import ./types.nix; types = import ./types.nix;
meta = import ./meta.nix; meta = import ./meta.nix;
debug = import ./debug.nix; debug = import ./debug.nix;
misc = import ./misc.nix; misc = import ./deprecated.nix;
maintainers = import ./maintainers.nix; maintainers = import ./maintainers.nix;
platforms = import ./platforms.nix; platforms = import ./platforms.nix;
systems = import ./systems.nix; systems = import ./systems.nix;

View File

@ -203,8 +203,6 @@ rec {
in in
work startSet [] []; work startSet [] [];
genericClosure = builtins.genericClosure or lazyGenericClosure;
innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else
innerModifySumArgs f x (a // b); innerModifySumArgs f x (a // b);
modifySumArgs = f: x: innerModifySumArgs f x {}; modifySumArgs = f: x: innerModifySumArgs f x {};

View File

@ -4,7 +4,6 @@ let lib = import ./default.nix; in
with import ./trivial.nix; with import ./trivial.nix;
with import ./lists.nix; with import ./lists.nix;
with import ./misc.nix;
with import ./attrsets.nix; with import ./attrsets.nix;
with import ./strings.nix; with import ./strings.nix;

View File

@ -210,6 +210,7 @@ rec {
# standard GNU Autoconf scripts. # standard GNU Autoconf scripts.
enableFeature = enable: feat: "--${if enable then "enable" else "disable"}-${feat}"; enableFeature = enable: feat: "--${if enable then "enable" else "disable"}-${feat}";
# Create a fixed width string with additional prefix to match required width # Create a fixed width string with additional prefix to match required width
fixedWidthString = width: filler: str: fixedWidthString = width: filler: str:
let let
@ -219,6 +220,7 @@ rec {
assert strw <= width; assert strw <= width;
if strw == width then str else filler + fixedWidthString reqWidth filler str; if strw == width then str else filler + fixedWidthString reqWidth filler str;
# Format a number adding leading zeroes up to fixed width # Format a number adding leading zeroes up to fixed width
fixedWidthNumber = width: n: fixedWidthString width "0" (toString n); fixedWidthNumber = width: n: fixedWidthString width "0" (toString n);
} }

View File

@ -22,7 +22,7 @@ rec {
inherit (builtins) inherit (builtins)
pathExists readFile isBool isFunction pathExists readFile isBool isFunction
isInt add sub lessThan isInt add sub lessThan
seq deepSeq; seq deepSeq genericClosure;
# Return the Nixpkgs version number. # Return the Nixpkgs version number.
nixpkgsVersion = nixpkgsVersion =