···639639 unmatchedDefns = [];
640640 }
641641 else if optionDecls != [] then
642642- if all (x: x.options.type.name == "submodule") optionDecls
642642+ if all (x: x.options.type.name or null == "submodule") optionDecls
643643 # Raw options can only be merged into submodules. Merging into
644644 # attrsets might be nice, but ambiguous. Suppose we have
645645 # attrset as a `attrsOf submodule`. User declares option
+49
lib/path/default.nix
···271271 second argument: "${toString path2}" with root "${toString path2Deconstructed.root}"'';
272272 joinRelPath components;
273273274274+ /*
275275+ Split the filesystem root from a [path](https://nixos.org/manual/nix/stable/language/values.html#type-path).
276276+ The result is an attribute set with these attributes:
277277+ - `root`: The filesystem root of the path, meaning that this directory has no parent directory.
278278+ - `subpath`: The [normalised subpath string](#function-library-lib.path.subpath.normalise) that when [appended](#function-library-lib.path.append) to `root` returns the original path.
279279+280280+ Laws:
281281+ - [Appending](#function-library-lib.path.append) the `root` and `subpath` gives the original path:
282282+283283+ p ==
284284+ append
285285+ (splitRoot p).root
286286+ (splitRoot p).subpath
287287+288288+ - Trying to get the parent directory of `root` using [`readDir`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-readDir) returns `root` itself:
289289+290290+ dirOf (splitRoot p).root == (splitRoot p).root
291291+292292+ Type:
293293+ splitRoot :: Path -> { root :: Path, subpath :: String }
294294+295295+ Example:
296296+ splitRoot /foo/bar
297297+ => { root = /.; subpath = "./foo/bar"; }
298298+299299+ splitRoot /.
300300+ => { root = /.; subpath = "./."; }
301301+302302+ # Nix neutralises `..` path components for all path values automatically
303303+ splitRoot /foo/../bar
304304+ => { root = /.; subpath = "./bar"; }
305305+306306+ splitRoot "/foo/bar"
307307+ => <error>
308308+ */
309309+ splitRoot = path:
310310+ assert assertMsg
311311+ (isPath path)
312312+ "lib.path.splitRoot: Argument is of type ${typeOf path}, but a path was expected";
313313+ let
314314+ deconstructed = deconstructPath path;
315315+ in {
316316+ root = deconstructed.root;
317317+ subpath = joinRelPath deconstructed.components;
318318+ };
319319+274320 /* Whether a value is a valid subpath string.
321321+322322+ A subpath string points to a specific file or directory within an absolute base directory.
323323+ It is a stricter form of a relative path that excludes `..` components, since those could escape the base directory.
275324276325 - The value is a string
277326
···371371 config.set \
372372 ./declare-set.nix ./declare-enable-nested.nix
373373374374+# Check that that merging of option collisions doesn't depend on type being set
375375+checkConfigError 'The option .group..*would be a parent of the following options, but its type .<no description>. does not support nested options.\n\s*- option.s. with prefix .group.enable..*' config.group.enable ./merge-typeless-option.nix
376376+374377# Test that types.optionType merges types correctly
375378checkConfigOutput '^10$' config.theOption.int ./optionTypeMerging.nix
376379checkConfigOutput '^"hello"$' config.theOption.str ./optionTypeMerging.nix
···199199 gnome.adwaita-icon-theme
200200 gtk3.out # for gtk-launch program
201201 onboard
202202+ orca # elementary/greeter#668
202203 qgnomeplatform
203204 sound-theme-freedesktop
204205 xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
···1919 "-X main.version=${version}"
2020 ];
21212222- passthru.updateScript = nix-update-script {
2323- attrPath = pname;
2424- };
2222+ passthru.updateScript = nix-update-script { };
25232624 meta = with lib; {
2725 description = "A tool to simplify storing secrets that should be accessible in the shell environment in your git repo.";