Skip to content

Commit bfb7ef8

Browse files
committedJul 9, 2017
Merge branch 'master' into staging
Mass rebuilds incoming. The mass-rebuild situation got really messy this weekend.
2 parents d10c3cc + 466e7e2 commit bfb7ef8

File tree

131 files changed

+2608
-1939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+2608
-1939
lines changed
 

‎doc/cross-compilation.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
</para>
3838
<para>
3939
In Nixpkgs, these three platforms are defined as attribute sets under the names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal>.
40-
All three are always defined at the top level, so one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
41-
<programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...</programlisting>
40+
All three are always defined as attributes in the standard environment, and at the top level. That means one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
41+
<programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...buildPlatform...</programlisting>, or just off <varname>stdenv</varname>:
42+
<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>.
4243
</para>
4344
<variablelist>
4445
<varlistentry>

‎lib/lists.nix

+8
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,12 @@ rec {
477477
*/
478478
subtractLists = e: filter (x: !(elem x e));
479479

480+
/* Test if two lists have no common element.
481+
It should be slightly more efficient than (intersectLists a b == [])
482+
*/
483+
mutuallyExclusive = a: b:
484+
(builtins.length a) == 0 ||
485+
(!(builtins.elem (builtins.head a) b) &&
486+
mutuallyExclusive (builtins.tail a) b);
487+
480488
}

0 commit comments

Comments
 (0)
Please sign in to comment.