treewide: apply nixfmt 1.2.0

This commit is contained in:
Dyego Aurélio 2026-01-22 18:37:56 -03:00
parent cd60f55468
commit 28096cc5e3
198 changed files with 351 additions and 351 deletions

View file

@ -191,7 +191,7 @@ in
if isStringLike path then
throw ''lib.fileset.maybeMissing: Argument ("${toString path}") is a string-like value, but it should be a path instead.''
else
throw ''lib.fileset.maybeMissing: Argument is of type ${typeOf path}, but it should be a path instead.''
throw "lib.fileset.maybeMissing: Argument is of type ${typeOf path}, but it should be a path instead."
else if !pathExists path then
_emptyWithoutBase
else
@ -443,7 +443,7 @@ in
lib.fileset.toSource: `root` (${toString root}) is a string-like value, but it should be a path instead.
Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
else
throw ''lib.fileset.toSource: `root` is of type ${typeOf root}, but it should be a path instead.''
throw "lib.fileset.toSource: `root` is of type ${typeOf root}, but it should be a path instead."
# Currently all Nix paths have the same filesystem root, but this could change in the future.
# See also ../path/README.md
else if !fileset._internalIsEmptyWithoutBase && rootFilesystemRoot != filesetFilesystemRoot then
@ -453,7 +453,7 @@ in
`fileset`: Filesystem root is "${toString filesetFilesystemRoot}"
Different filesystem roots are not supported.''
else if !pathExists root then
throw ''lib.fileset.toSource: `root` (${toString root}) is a path that does not exist.''
throw "lib.fileset.toSource: `root` (${toString root}) is a path that does not exist."
else if pathType root != "directory" then
throw ''
lib.fileset.toSource: `root` (${toString root}) is a file, but it should be a directory instead. Potential solutions:
@ -619,7 +619,7 @@ in
unions =
filesets:
if !isList filesets then
throw ''lib.fileset.unions: Argument is of type ${typeOf filesets}, but it should be a list instead.''
throw "lib.fileset.unions: Argument is of type ${typeOf filesets}, but it should be a list instead."
else
pipe filesets [
# Annotate the elements with context, used by _coerceMany for better errors
@ -808,16 +808,16 @@ in
fileFilter =
predicate: path:
if !isFunction predicate then
throw ''lib.fileset.fileFilter: First argument is of type ${typeOf predicate}, but it should be a function instead.''
throw "lib.fileset.fileFilter: First argument is of type ${typeOf predicate}, but it should be a function instead."
else if !isPath path then
if path._type or "" == "fileset" then
throw ''
lib.fileset.fileFilter: Second argument is a file set, but it should be a path instead.
If you need to filter files in a file set, use `intersection fileset (fileFilter pred ./.)` instead.''
else
throw ''lib.fileset.fileFilter: Second argument is of type ${typeOf path}, but it should be a path instead.''
throw "lib.fileset.fileFilter: Second argument is of type ${typeOf path}, but it should be a path instead."
else if !pathExists path then
throw ''lib.fileset.fileFilter: Second argument (${toString path}) is a path that does not exist.''
throw "lib.fileset.fileFilter: Second argument (${toString path}) is a path that does not exist."
else
_fileFilter predicate path;
@ -896,9 +896,9 @@ in
lib.fileset.fromSource: The source origin of the argument is a string-like value ("${toString path}"), but it should be a path instead.
Sources created from paths in strings cannot be turned into file sets, use `lib.sources` or derivations instead.''
else
throw ''lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead.''
throw "lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead."
else if !pathExists path then
throw ''lib.fileset.fromSource: The source origin (${toString path}) of the argument is a path that does not exist.''
throw "lib.fileset.fromSource: The source origin (${toString path}) of the argument is a path that does not exist."
else if isFiltered then
_fromSourceFilter path source.filter
else

View file

@ -211,7 +211,7 @@ rec {
${context} ("${toString value}") is a string-like value, but it should be a file set or a path instead.
Paths represented as strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
else
error ''${context} is of type ${typeOf value}, but it should be a file set or a path instead.''
error "${context} is of type ${typeOf value}, but it should be a file set or a path instead."
else if !pathExists value then
error ''
${context} (${toString value}) is a path that does not exist.

View file

@ -239,7 +239,7 @@ in
# The subpath string to append
subpath:
assert assertMsg (isPath path)
''lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected'';
"lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected";
assert assertMsg (isValid subpath) ''
lib.path.append: Second argument is not a valid subpath string:
${subpathInvalidReason subpath}'';

View file

@ -331,7 +331,7 @@ in
testAttrs = {
expectedError = {
type = "ThrownError";
msg = ''A definition for option `foo' is not of type `string or signed integer convertible to it.*'';
msg = "A definition for option `foo' is not of type `string or signed integer convertible to it.*";
};
};
};

View file

@ -867,7 +867,7 @@ runTests {
testEscapeNixIdentifierNoQuote = {
expr = strings.escapeNixIdentifier "foo";
expected = ''foo'';
expected = "foo";
};
testEscapeNixIdentifierNumber = {
@ -2634,7 +2634,7 @@ runTests {
sections = {
};
};
expected = '''';
expected = "";
};
testToINIWithGlobalSectionGlobalEmptyIsTheSameAsToINI =
@ -3002,12 +3002,12 @@ runTests {
testToLuaEmptyAttrSet = {
expr = generators.toLua { } { };
expected = ''{}'';
expected = "{}";
};
testToLuaEmptyList = {
expr = generators.toLua { } [ ];
expected = ''{}'';
expected = "{}";
};
testToLuaListOfVariousTypes = {
@ -3052,7 +3052,7 @@ runTests {
41
43
];
expected = ''{ 41, 43 }'';
expected = "{ 41, 43 }";
};
testToLuaEmptyBindings = {

View file

@ -1412,7 +1412,7 @@ rec {
else if builtins.isBool v then
boolToString v
else
''<${builtins.typeOf v}>'';
"<${builtins.typeOf v}>";
in
mkOptionType rec {
name = "enum";