···423423 else if isInt x then "int"
424424 else "string";
425425426426+ /* deprecated:
427427+428428+ For historical reasons, imap has an index starting at 1.
429429+430430+ But for consistency with the rest of the library we want an index
431431+ starting at zero.
432432+ */
433433+ imap = imap1;
426434}
+10-4
lib/lists.nix
···7777 */
7878 foldl' = builtins.foldl' or foldl;
79798080- /* Map with index
8080+ /* Map with index starting from 0
81818282- FIXME(zimbatm): why does this start to count at 1?
8282+ Example:
8383+ imap0 (i: v: "${v}-${toString i}") ["a" "b"]
8484+ => [ "a-0" "b-1" ]
8585+ */
8686+ imap0 = f: list: genList (n: f n (elemAt list n)) (length list);
8787+8888+ /* Map with index starting from 1
83898490 Example:
8585- imap (i: v: "${v}-${toString i}") ["a" "b"]
9191+ imap1 (i: v: "${v}-${toString i}") ["a" "b"]
8692 => [ "a-1" "b-2" ]
8793 */
8888- imap = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
9494+ imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
89959096 /* Map and concatenate the result.
9197
···9898 /* Close a set of modules under the ‘imports’ relation. */
9999 closeModules = modules: args:
100100 let
101101- toClosureList = file: parentKey: imap (n: x:
101101+ toClosureList = file: parentKey: imap1 (n: x:
102102 if isAttrs x || isFunction x then
103103 let key = "${parentKey}:anon-${toString n}"; in
104104 unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
+2-2
lib/strings.nix
···3333 concatImapStrings (pos: x: "${toString pos}-${x}") ["foo" "bar"]
3434 => "1-foo2-bar"
3535 */
3636- concatImapStrings = f: list: concatStrings (lib.imap f list);
3636+ concatImapStrings = f: list: concatStrings (lib.imap1 f list);
37373838 /* Place an element between each element of a list
3939···7070 concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ]
7171 => "6-3-2"
7272 */
7373- concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list);
7373+ concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap1 f list);
74747575 /* Construct a Unix-style search path consisting of each `subDir"
7676 directory of the given list of packages.
+4-4
lib/types.nix
···179179 description = "list of ${elemType.description}s";
180180 check = isList;
181181 merge = loc: defs:
182182- map (x: x.value) (filter (x: x ? value) (concatLists (imap (n: def:
182182+ map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
183183 if isList def.value then
184184- imap (m: def':
184184+ imap1 (m: def':
185185 (mergeDefinitions
186186 (loc ++ ["[definition ${toString n}-entry ${toString m}]"])
187187 elemType
···220220 if isList def.value then
221221 { inherit (def) file;
222222 value = listToAttrs (
223223- imap (elemIdx: elem:
223223+ imap1 (elemIdx: elem:
224224 { name = elem.name or "unnamed-${toString defIdx}.${toString elemIdx}";
225225 value = elem;
226226 }) def.value);
···233233 name = "loaOf";
234234 description = "list or attribute set of ${elemType.description}s";
235235 check = x: isList x || isAttrs x;
236236- merge = loc: defs: attrOnly.merge loc (imap convertIfList defs);
236236+ merge = loc: defs: attrOnly.merge loc (imap1 convertIfList defs);
237237 getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name?>"]);
238238 getSubModules = elemType.getSubModules;
239239 substSubModules = m: loaOf (elemType.substSubModules m);
+2-1
maintainers/scripts/update-python-libraries
···9191 if release['filename'].endswith(extension):
9292 # TODO: In case of wheel we need to do further checks!
9393 sha256 = release['digests']['sha256']
9494-9494+ else:
9595+ sha256 = None
9596 return version, sha256
96979798
···6262 for i in *
6363 do
6464 cd $i
6565+ # Files within the guest additions ISO are using DOS line endings
6666+ sed -re '/^(@@|---|\+\+\+)/!s/$/\r/' ${../linux-4.12.patch} \
6767+ | patch -d vboxguest -p4
6568 find . -type f | xargs sed 's/depmod -a/true/' -i
6669 make
6770 cd ..
···4747 --leave-dotGit Keep the .git directories.
4848 --fetch-submodules Fetch submodules.
4949 --builder Clone as fetchgit does, but url, rev, and out option are mandatory.
5050+ --quiet Only print the final json summary.
5051"
5152 exit 1
5253}
···670670 haste-compiler = markBroken (self.callPackage ../tools/haskell/haste/haste-compiler.nix { inherit overrideCabal; super-haste-compiler = super.haste-compiler; });
671671672672 # tinc is a new build driver a la Stack that's not yet available from Hackage.
673673- tinc = self.callPackage ../tools/haskell/tinc {};
673673+ tinc = self.callPackage ../tools/haskell/tinc { inherit (pkgs) cabal-install cabal2nix; };
674674675675 # Tools that use gtk2hs-buildtools now depend on them in a custom-setup stanza
676676 cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
···2233stdenv.mkDerivation rec {
44 name = "libbsd-${version}";
55- version = "0.8.4";
55+ version = "0.8.5";
6677 src = fetchurl {
88 url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz";
99- sha256 = "1cya8bv976ijv5yy1ix3pzbnmp9k2qqpgw3dx98k2w0m55jg2yi1";
99+ sha256 = "0a2vq0xdhs3yyj91b0612f19fakg7a9xlqy2f993128kyhjd0ivn";
1010 };
11111212 # darwin changes configure.ac which means we need to regenerate
···11-{ stdenv, fetchurl, buildOcaml, calendar, csv, re }:
11+{ stdenv, fetchurl, buildOcaml, ocaml, calendar, csv, re }:
22+33+if !stdenv.lib.versionAtLeast ocaml.version "4"
44+then throw "pgocaml is not available for OCaml ${ocaml.version}"
55+else
2637buildOcaml {
48 name = "pgocaml";
···499499 KVM_APIC_ARCHITECTURE y
500500 ''}
501501 KVM_ASYNC_PF y
502502- ${optionalString (versionAtLeast version "4.0") ''
502502+ ${optionalString ((versionAtLeast version "4.0") && (versionOlder version "4.12")) ''
503503 KVM_COMPAT? y
504504 ''}
505505 ${optionalString (versionOlder version "4.12") ''
···123123 # to be adapted
124124 zfsStable = common {
125125 # comment/uncomment if breaking kernel versions are known
126126- incompatibleKernelVersion = "4.12";
126126+ incompatibleKernelVersion = null;
127127128128 version = "0.6.5.10";
129129···139139 };
140140 zfsUnstable = common {
141141 # comment/uncomment if breaking kernel versions are known
142142- incompatibleKernelVersion = null;
142142+ incompatibleKernelVersion = "4.12";
143143144144 version = "0.7.0-rc4";
145145
···7373 # Take the list and disallow custom overrides in all but the final stage,
7474 # and allow it in the final flag. Only defaults this boolean field if it
7575 # isn't already set.
7676- withAllowCustomOverrides = lib.lists.imap
7676+ withAllowCustomOverrides = lib.lists.imap1
7777 (index: stageFun: prevStage:
7878 # So true by default for only the first element because one
7979 # 1-indexing. Since we reverse the list, this means this is true
···11+# Copyright 2013 Google Inc. All Rights Reserved.
22+#
33+# Licensed under the Apache License, Version 2.0 (the "License");
44+# you may not use this file except in compliance with the License.
55+# You may obtain a copy of the License at
66+#
77+# http://www.apache.org/licenses/LICENSE-2.0
88+#
99+# Unless required by applicable law or agreed to in writing, software
1010+# distributed under the License is distributed on an "AS IS" BASIS,
1111+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212+# See the License for the specific language governing permissions and
1313+# limitations under the License.
1414+1515+"""Auth for the Google Cloud SDK.
1616+"""
1717+1818+from googlecloudsdk.calliope import base
1919+2020+2121+@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
2222+class Alpha(base.Group):
2323+ """Alpha versions of gcloud commands."""
+23
pkgs/tools/admin/google-cloud-sdk/beta__init__.py
···11+# Copyright 2013 Google Inc. All Rights Reserved.
22+#
33+# Licensed under the Apache License, Version 2.0 (the "License");
44+# you may not use this file except in compliance with the License.
55+# You may obtain a copy of the License at
66+#
77+# http://www.apache.org/licenses/LICENSE-2.0
88+#
99+# Unless required by applicable law or agreed to in writing, software
1010+# distributed under the License is distributed on an "AS IS" BASIS,
1111+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212+# See the License for the specific language governing permissions and
1313+# limitations under the License.
1414+1515+"""Auth for the Google Cloud SDK.
1616+"""
1717+1818+from googlecloudsdk.calliope import base
1919+2020+2121+@base.ReleaseTracks(base.ReleaseTrack.BETA)
2222+class Beta(base.Group):
2323+ """Beta versions of gcloud commands."""