Skip to content

Commit

Permalink
Merge branch 'master' into staging-next
Browse files Browse the repository at this point in the history
Hydra: ?compare=1468896
  • Loading branch information
vcunat committed Jul 14, 2018
2 parents 4bd4e3e + 6d05789 commit 0f01215
Show file tree
Hide file tree
Showing 721 changed files with 20,415 additions and 20,781 deletions.
8 changes: 8 additions & 0 deletions .dir-locals.el
@@ -0,0 +1,8 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((nil
(bug-reference-bug-regexp . "\\(\\(?:[Ii]ssue \\|[Ff]ixe[ds] \\|[Rr]esolve[ds]? \\|[Cc]lose[ds]? \\|[Pp]\\(?:ull [Rr]equest\\|[Rr]\\) \\|(\\)#\\([0-9]+\\))?\\)")
(bug-reference-url-format . "https://github.com/NixOS/nixpkgs/issues/%s"))
(nix-mode
(tab-width . 2)))
2 changes: 1 addition & 1 deletion doc/cross-compilation.xml
Expand Up @@ -305,7 +305,7 @@
</section>

<section>
<title>Cross packagaing cookbook</title>
<title>Cross packaging cookbook</title>

<para>
Some frequently problems when packaging for cross compilation are good to
Expand Down
2 changes: 1 addition & 1 deletion doc/functions.xml
Expand Up @@ -521,7 +521,7 @@ merge:"diff3"
<callout arearefs='ex-dockerTools-buildImage-2'>
<para>
<varname>tag</varname> specifies the tag of the resulting image. By
default it's <literal>latest</literal>.
default it's <literal>null</literal>, which indicates that the nix output hash will be used as tag.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-3'>
Expand Down
2 changes: 1 addition & 1 deletion doc/introduction.chapter.md
Expand Up @@ -30,7 +30,7 @@ Packages, including the Nix packages collection, are distributed through
distributed for users of Nix on non-NixOS distributions through the channel
`nixpkgs`. Users of NixOS generally use one of the `nixos-*` channels, e.g.
`nixos-16.03`, which includes all packages and modules for the stable NixOS
16.03. The purpose of stable NixOS releases are generally only given
16.03. Stable NixOS releases are generally only given
security updates. More up to date packages and modules are available via the
`nixos-unstable` channel.

Expand Down
5 changes: 3 additions & 2 deletions lib/attrsets.nix
Expand Up @@ -195,8 +195,9 @@ rec {
{ x = "foo"; y = "bar"; }
=> { x = "x-foo"; y = "y-bar"; }
*/
mapAttrs = f: set:
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set));
mapAttrs = builtins.mapAttrs or
(f: set:
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set)));


/* Like `mapAttrs', but allows the name of each attribute to be
Expand Down
15 changes: 9 additions & 6 deletions lib/generators.nix
Expand Up @@ -177,13 +177,15 @@ rec {

# PLIST handling
toPlist = {}: v: let
expr = ind: x: with builtins;
if isNull x then "" else
if isBool x then bool ind x else
if isInt x then int ind x else
isFloat = builtins.isFloat or (x: false);
expr = ind: x: with builtins;
if isNull x then "" else
if isBool x then bool ind x else
if isInt x then int ind x else
if isString x then str ind x else
if isList x then list ind x else
if isAttrs x then attrs ind x else
if isList x then list ind x else
if isAttrs x then attrs ind x else
if isFloat x then float ind x else
abort "generators.toPlist: should never happen (v = ${v})";

literal = ind: x: ind + x;
Expand All @@ -192,6 +194,7 @@ rec {
int = ind: x: literal ind "<integer>${toString x}</integer>";
str = ind: x: literal ind "<string>${x}</string>";
key = ind: x: literal ind "<key>${x}</key>";
float = ind: x: literal ind "<real>${toString x}</real>";

indent = ind: expr "\t${ind}";

Expand Down
2 changes: 1 addition & 1 deletion lib/lists.nix
Expand Up @@ -101,7 +101,7 @@ rec {
concatMap (x: [x] ++ ["z"]) ["a" "b"]
=> [ "a" "z" "b" "z" ]
*/
concatMap = f: list: concatLists (map f list);
concatMap = builtins.concatMap or (f: list: concatLists (map f list));

/* Flatten the argument into a single list; that is, nested lists are
spliced into the top-level lists.
Expand Down

0 comments on commit 0f01215

Please sign in to comment.