treewide: drop some unnecessary toString calls (#527924)

This commit is contained in:
Philip Taron
2026-06-07 13:03:10 +00:00
committed by GitHub
7 changed files with 13 additions and 16 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ let
cleanSourceFilter =
name: type:
let
baseName = baseNameOf (toString name);
baseName = baseNameOf name;
in
!(
# Filter out version control software files/directories
@@ -270,7 +270,7 @@ let
filter =
name: type:
let
base = baseNameOf (toString name);
base = baseNameOf name;
in
type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts;
in
+1 -1
View File
@@ -35,7 +35,7 @@ let
lib.listToAttrs (map mkEtcFile cfg.package.filesInstalledToEtc);
extraTrustedKeys =
let
mkName = p: "pki/fwupd/${baseNameOf (toString p)}";
mkName = p: "pki/fwupd/${baseNameOf p}";
mkEtcFile = p: lib.nameValuePair (mkName p) { source = p; };
in
lib.listToAttrs (map mkEtcFile cfg.extraTrustedKeys);
@@ -122,7 +122,7 @@ in
stdenvNoCC.mkDerivation (
{
name = baseNameOf (toString src);
name = baseNameOf src;
}
// optionalAttrs
// forcedAttrs
@@ -4347,7 +4347,7 @@ rec {
sourceFilter =
name: type:
let
baseName = baseNameOf (toString name);
baseName = baseNameOf name;
in
!(
# Filter out git
+1 -1
View File
@@ -29,7 +29,7 @@
args:
let
name = if args ? name then args.name else baseNameOf (toString args.src);
name = args.name or (baseNameOf args.src);
deprecationReplacement = lib.pipe args.replacements [
lib.toList
(map (lib.splitString " "))
@@ -71,7 +71,7 @@ let
;
src = monorepoSrc;
versionDir =
(toString ../.) + "/${if (gitRelease != null) then "git" else lib.versions.major release_version}";
../. + "/${if (gitRelease != null) then "git" else lib.versions.major release_version}";
getVersionFile =
p:
builtins.path {
@@ -95,15 +95,12 @@ let
matchBefore && matchAfter;
patchDir =
toString
(
if constraints == null then
{ path = metadata.versionDir; }
else
(lib.findFirst matchConstraint { path = metadata.versionDir; } constraints)
).path;
if constraints == null then
metadata.versionDir
else
(lib.findFirst matchConstraint { path = metadata.versionDir; } constraints).path;
in
"${patchDir}/${p}";
patchDir + ("/" + p);
};
};
+1 -1
View File
@@ -26,7 +26,7 @@ let
];
resolvedLogoName =
if (logoFile != null && logoName == null) then
lib.strings.removeSuffix ".png" (baseNameOf (toString logoFile))
lib.strings.removeSuffix ".png" (baseNameOf logoFile)
else
logoName;
in