···423 else if isInt x then "int"
424 else "string";
42500000000426}
···423 else if isInt x then "int"
424 else "string";
425426+ /* deprecated:
427+428+ For historical reasons, imap has an index starting at 1.
429+430+ But for consistency with the rest of the library we want an index
431+ starting at zero.
432+ */
433+ imap = imap1;
434}
+10-4
lib/lists.nix
···77 */
78 foldl' = builtins.foldl' or foldl;
7980- /* Map with index
8182- FIXME(zimbatm): why does this start to count at 1?
0000008384 Example:
85- imap (i: v: "${v}-${toString i}") ["a" "b"]
86 => [ "a-1" "b-2" ]
87 */
88- imap = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
8990 /* Map and concatenate the result.
91
···77 */
78 foldl' = builtins.foldl' or foldl;
7980+ /* Map with index starting from 0
8182+ Example:
83+ imap0 (i: v: "${v}-${toString i}") ["a" "b"]
84+ => [ "a-0" "b-1" ]
85+ */
86+ imap0 = f: list: genList (n: f n (elemAt list n)) (length list);
87+88+ /* Map with index starting from 1
8990 Example:
91+ imap1 (i: v: "${v}-${toString i}") ["a" "b"]
92 => [ "a-1" "b-2" ]
93 */
94+ imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
9596 /* Map and concatenate the result.
97
···98 /* Close a set of modules under the ‘imports’ relation. */
99 closeModules = modules: args:
100 let
101- toClosureList = file: parentKey: imap (n: x:
102 if isAttrs x || isFunction x then
103 let key = "${parentKey}:anon-${toString n}"; in
104 unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
···98 /* Close a set of modules under the ‘imports’ relation. */
99 closeModules = modules: args:
100 let
101+ toClosureList = file: parentKey: imap1 (n: x:
102 if isAttrs x || isFunction x then
103 let key = "${parentKey}:anon-${toString n}"; in
104 unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
+2-2
lib/strings.nix
···33 concatImapStrings (pos: x: "${toString pos}-${x}") ["foo" "bar"]
34 => "1-foo2-bar"
35 */
36- concatImapStrings = f: list: concatStrings (lib.imap f list);
3738 /* Place an element between each element of a list
39···70 concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ]
71 => "6-3-2"
72 */
73- concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list);
7475 /* Construct a Unix-style search path consisting of each `subDir"
76 directory of the given list of packages.
···33 concatImapStrings (pos: x: "${toString pos}-${x}") ["foo" "bar"]
34 => "1-foo2-bar"
35 */
36+ concatImapStrings = f: list: concatStrings (lib.imap1 f list);
3738 /* Place an element between each element of a list
39···70 concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ]
71 => "6-3-2"
72 */
73+ concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap1 f list);
7475 /* Construct a Unix-style search path consisting of each `subDir"
76 directory of the given list of packages.
+4-4
lib/types.nix
···179 description = "list of ${elemType.description}s";
180 check = isList;
181 merge = loc: defs:
182- map (x: x.value) (filter (x: x ? value) (concatLists (imap (n: def:
183 if isList def.value then
184- imap (m: def':
185 (mergeDefinitions
186 (loc ++ ["[definition ${toString n}-entry ${toString m}]"])
187 elemType
···220 if isList def.value then
221 { inherit (def) file;
222 value = listToAttrs (
223- imap (elemIdx: elem:
224 { name = elem.name or "unnamed-${toString defIdx}.${toString elemIdx}";
225 value = elem;
226 }) def.value);
···233 name = "loaOf";
234 description = "list or attribute set of ${elemType.description}s";
235 check = x: isList x || isAttrs x;
236- merge = loc: defs: attrOnly.merge loc (imap convertIfList defs);
237 getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name?>"]);
238 getSubModules = elemType.getSubModules;
239 substSubModules = m: loaOf (elemType.substSubModules m);
···179 description = "list of ${elemType.description}s";
180 check = isList;
181 merge = loc: defs:
182+ map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
183 if isList def.value then
184+ imap1 (m: def':
185 (mergeDefinitions
186 (loc ++ ["[definition ${toString n}-entry ${toString m}]"])
187 elemType
···220 if isList def.value then
221 { inherit (def) file;
222 value = listToAttrs (
223+ imap1 (elemIdx: elem:
224 { name = elem.name or "unnamed-${toString defIdx}.${toString elemIdx}";
225 value = elem;
226 }) def.value);
···233 name = "loaOf";
234 description = "list or attribute set of ${elemType.description}s";
235 check = x: isList x || isAttrs x;
236+ merge = loc: defs: attrOnly.merge loc (imap1 convertIfList defs);
237 getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name?>"]);
238 getSubModules = elemType.getSubModules;
239 substSubModules = m: loaOf (elemType.substSubModules m);
+2-1
maintainers/scripts/update-python-libraries
···91 if release['filename'].endswith(extension):
92 # TODO: In case of wheel we need to do further checks!
93 sha256 = release['digests']['sha256']
94-095 return version, sha256
9697
···91 if release['filename'].endswith(extension):
92 # TODO: In case of wheel we need to do further checks!
93 sha256 = release['digests']['sha256']
94+ else:
95+ sha256 = None
96 return version, sha256
9798
···81 fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
8283 # Upstream source
84- version = "7.0.1";
8586 lang = "en-US";
87···91 "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
92 "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
93 ];
94- sha256 = "1zmczf1bpbd85zcrs5qw91d1xmplikbna5xs053jnjl6pbbq1fs9";
95 };
9697 "i686-linux" = fetchurl {
···99 "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
100 "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
101 ];
102- sha256 = "0mdlgmqkryg0i55jgf3x1nnjni0x45g1xcjwsfacsck3m70v4flq";
103 };
104 };
105in
···190191 // Stop obnoxious first-run redirection.
192 lockPref("noscript.firstRunRedirection", false);
000000193 EOF
194195 # Hard-code path to TBB fonts; see also FONTCONFIG_FILE in
···232233 # Initialize the Tor data directory.
234 mkdir -p "\$HOME/TorBrowser/Data/Tor"
000235236 # Initialize the browser profile state. Note that the only data
237 # copied from the Store payload is the initial bookmark file, which is
···81 fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
8283 # Upstream source
84+ version = "7.0.2";
8586 lang = "en-US";
87···91 "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
92 "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
93 ];
94+ sha256 = "0xdw8mvyxz9vaxikzsj4ygzp36m4jfhvhqfiyaiiywpf39rqpkqr";
95 };
9697 "i686-linux" = fetchurl {
···99 "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
100 "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
101 ];
102+ sha256 = "0m522i8zih5sj18dyzk9im7gmpmrbf96657v38m3pxn4ci38b83z";
103 };
104 };
105in
···190191 // Stop obnoxious first-run redirection.
192 lockPref("noscript.firstRunRedirection", false);
193+194+ // Insist on using IPC for communicating with Tor
195+ //
196+ // Defaults to creating $TBB_HOME/TorBrowser/Data/Tor/{socks,control}.socket
197+ lockPref("extensions.torlauncher.control_port_use_ipc", true);
198+ lockPref("extensions.torlauncher.socks_port_use_ipc", true);
199 EOF
200201 # Hard-code path to TBB fonts; see also FONTCONFIG_FILE in
···238239 # Initialize the Tor data directory.
240 mkdir -p "\$HOME/TorBrowser/Data/Tor"
241+242+ # TBB will fail if ownership is too permissive
243+ chmod 0700 "\$HOME/TorBrowser/Data/Tor"
244245 # Initialize the browser profile state. Note that the only data
246 # copied from the Store payload is the initial bookmark file, which is
···62 for i in *
63 do
64 cd $i
00065 find . -type f | xargs sed 's/depmod -a/true/' -i
66 make
67 cd ..
···62 for i in *
63 do
64 cd $i
65+ # Files within the guest additions ISO are using DOS line endings
66+ sed -re '/^(@@|---|\+\+\+)/!s/$/\r/' ${../linux-4.12.patch} \
67+ | patch -d vboxguest -p4
68 find . -type f | xargs sed 's/depmod -a/true/' -i
69 make
70 cd ..
···47 --leave-dotGit Keep the .git directories.
48 --fetch-submodules Fetch submodules.
49 --builder Clone as fetchgit does, but url, rev, and out option are mandatory.
050"
51 exit 1
52}
···47 --leave-dotGit Keep the .git directories.
48 --fetch-submodules Fetch submodules.
49 --builder Clone as fetchgit does, but url, rev, and out option are mandatory.
50+ --quiet Only print the final json summary.
51"
52 exit 1
53}
···670 haste-compiler = markBroken (self.callPackage ../tools/haskell/haste/haste-compiler.nix { inherit overrideCabal; super-haste-compiler = super.haste-compiler; });
671672 # tinc is a new build driver a la Stack that's not yet available from Hackage.
673- tinc = self.callPackage ../tools/haskell/tinc {};
674675 # Tools that use gtk2hs-buildtools now depend on them in a custom-setup stanza
676 cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
···670 haste-compiler = markBroken (self.callPackage ../tools/haskell/haste/haste-compiler.nix { inherit overrideCabal; super-haste-compiler = super.haste-compiler; });
671672 # tinc is a new build driver a la Stack that's not yet available from Hackage.
673+ tinc = self.callPackage ../tools/haskell/tinc { inherit (pkgs) cabal-install cabal2nix; };
674675 # Tools that use gtk2hs-buildtools now depend on them in a custom-setup stanza
676 cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
···23stdenv.mkDerivation rec {
4 name = "libbsd-${version}";
5- version = "0.8.4";
67 src = fetchurl {
8 url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz";
9- sha256 = "1cya8bv976ijv5yy1ix3pzbnmp9k2qqpgw3dx98k2w0m55jg2yi1";
10 };
1112 # darwin changes configure.ac which means we need to regenerate
···23stdenv.mkDerivation rec {
4 name = "libbsd-${version}";
5+ version = "0.8.5";
67 src = fetchurl {
8 url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz";
9+ sha256 = "0a2vq0xdhs3yyj91b0612f19fakg7a9xlqy2f993128kyhjd0ivn";
10 };
1112 # darwin changes configure.ac which means we need to regenerate
···1-{ stdenv, fetchurl, buildOcaml, calendar, csv, re }:
000023buildOcaml {
4 name = "pgocaml";
···1+{ stdenv, fetchurl, buildOcaml, ocaml, calendar, csv, re }:
2+3+if !stdenv.lib.versionAtLeast ocaml.version "4"
4+then throw "pgocaml is not available for OCaml ${ocaml.version}"
5+else
67buildOcaml {
8 name = "pgocaml";
···499 KVM_APIC_ARCHITECTURE y
500 ''}
501 KVM_ASYNC_PF y
502- ${optionalString (versionAtLeast version "4.0") ''
503 KVM_COMPAT? y
504 ''}
505 ${optionalString (versionOlder version "4.12") ''
···499 KVM_APIC_ARCHITECTURE y
500 ''}
501 KVM_ASYNC_PF y
502+ ${optionalString ((versionAtLeast version "4.0") && (versionOlder version "4.12")) ''
503 KVM_COMPAT? y
504 ''}
505 ${optionalString (versionOlder version "4.12") ''
···123 # to be adapted
124 zfsStable = common {
125 # comment/uncomment if breaking kernel versions are known
126- incompatibleKernelVersion = "4.12";
127128 version = "0.6.5.10";
129···139 };
140 zfsUnstable = common {
141 # comment/uncomment if breaking kernel versions are known
142- incompatibleKernelVersion = null;
143144 version = "0.7.0-rc4";
145
···123 # to be adapted
124 zfsStable = common {
125 # comment/uncomment if breaking kernel versions are known
126+ incompatibleKernelVersion = null;
127128 version = "0.6.5.10";
129···139 };
140 zfsUnstable = common {
141 # comment/uncomment if breaking kernel versions are known
142+ incompatibleKernelVersion = "4.12";
143144 version = "0.7.0-rc4";
145
···73 # Take the list and disallow custom overrides in all but the final stage,
74 # and allow it in the final flag. Only defaults this boolean field if it
75 # isn't already set.
76- withAllowCustomOverrides = lib.lists.imap
77 (index: stageFun: prevStage:
78 # So true by default for only the first element because one
79 # 1-indexing. Since we reverse the list, this means this is true
···73 # Take the list and disallow custom overrides in all but the final stage,
74 # and allow it in the final flag. Only defaults this boolean field if it
75 # isn't already set.
76+ withAllowCustomOverrides = lib.lists.imap1
77 (index: stageFun: prevStage:
78 # So true by default for only the first element because one
79 # 1-indexing. Since we reverse the list, this means this is true
···1+# Copyright 2013 Google Inc. All Rights Reserved.
2+#
3+# Licensed under the Apache License, Version 2.0 (the "License");
4+# you may not use this file except in compliance with the License.
5+# You may obtain a copy of the License at
6+#
7+# http://www.apache.org/licenses/LICENSE-2.0
8+#
9+# Unless required by applicable law or agreed to in writing, software
10+# distributed under the License is distributed on an "AS IS" BASIS,
11+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+# See the License for the specific language governing permissions and
13+# limitations under the License.
14+15+"""Auth for the Google Cloud SDK.
16+"""
17+18+from googlecloudsdk.calliope import base
19+20+21+@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
22+class Alpha(base.Group):
23+ """Alpha versions of gcloud commands."""
+23
pkgs/tools/admin/google-cloud-sdk/beta__init__.py
···00000000000000000000000
···1+# Copyright 2013 Google Inc. All Rights Reserved.
2+#
3+# Licensed under the Apache License, Version 2.0 (the "License");
4+# you may not use this file except in compliance with the License.
5+# You may obtain a copy of the License at
6+#
7+# http://www.apache.org/licenses/LICENSE-2.0
8+#
9+# Unless required by applicable law or agreed to in writing, software
10+# distributed under the License is distributed on an "AS IS" BASIS,
11+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+# See the License for the specific language governing permissions and
13+# limitations under the License.
14+15+"""Auth for the Google Cloud SDK.
16+"""
17+18+from googlecloudsdk.calliope import base
19+20+21+@base.ReleaseTracks(base.ReleaseTrack.BETA)
22+class Beta(base.Group):
23+ """Beta versions of gcloud commands."""
+7
pkgs/tools/admin/google-cloud-sdk/default.nix
···26 sha256 = "7aa6094d1f9c87f4c2c4a6bdad6a1113aac5e72ea673e659d9acbb059dfd037e";
27 };
28029 buildInputs = [python27 makeWrapper];
3031 phases = [ "installPhase" "fixupPhase" ];
···33 installPhase = ''
34 mkdir -p "$out"
35 tar -xzf "$src" -C "$out" google-cloud-sdk
0000003637 # create wrappers with correct env
38 for program in gcloud bq gsutil git-credential-gcloud.sh; do