diff --git a/lib/sources.nix b/lib/sources.nix index 43a374c16e73..81b8a8c77178 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -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 diff --git a/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix index 1c059bf39e64..91e1afd1067e 100644 --- a/nixos/modules/services/hardware/fwupd.nix +++ b/nixos/modules/services/hardware/fwupd.nix @@ -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); diff --git a/pkgs/build-support/replace-vars/replace-vars-with.nix b/pkgs/build-support/replace-vars/replace-vars-with.nix index c863c6fb617f..abbb9a1cc1a0 100644 --- a/pkgs/build-support/replace-vars/replace-vars-with.nix +++ b/pkgs/build-support/replace-vars/replace-vars-with.nix @@ -122,7 +122,7 @@ in stdenvNoCC.mkDerivation ( { - name = baseNameOf (toString src); + name = baseNameOf src; } // optionalAttrs // forcedAttrs diff --git a/pkgs/build-support/rust/build-rust-crate/test/rcgen-crates.nix b/pkgs/build-support/rust/build-rust-crate/test/rcgen-crates.nix index 804308ed216f..563500ed0092 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/rcgen-crates.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/rcgen-crates.nix @@ -4347,7 +4347,7 @@ rec { sourceFilter = name: type: let - baseName = baseNameOf (toString name); + baseName = baseNameOf name; in !( # Filter out git diff --git a/pkgs/build-support/substitute/substitute.nix b/pkgs/build-support/substitute/substitute.nix index 431a97c9b1ba..050e259f4eb1 100644 --- a/pkgs/build-support/substitute/substitute.nix +++ b/pkgs/build-support/substitute/substitute.nix @@ -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 " ")) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 2a88fecc0b6e..cd15cd6f36a5 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -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); }; }; diff --git a/pkgs/kde/plasma/breeze-plymouth/default.nix b/pkgs/kde/plasma/breeze-plymouth/default.nix index d85dd1861a10..ccb7c6d9d3f0 100644 --- a/pkgs/kde/plasma/breeze-plymouth/default.nix +++ b/pkgs/kde/plasma/breeze-plymouth/default.nix @@ -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