diff --git a/nix/tools/mkFilter.nix b/nix/tools/mkFilter.nix index de71ffff1e..19dd1021ee 100644 --- a/nix/tools/mkFilter.nix +++ b/nix/tools/mkFilter.nix @@ -24,11 +24,13 @@ let root }: let allPathRootsAllowed = (length dirRootsToInclude) == 0; + # this removes superfluous slashes from the path + cleanRoot = "${toString (/. + root)}/"; in path: type: let baseName = baseNameOf (toString path); - subpath = elemAt (splitString "${toString root}/" path) 1; + subpath = elemAt (splitString cleanRoot path) 1; spdir = elemAt (splitString "/" subpath) 0; in lib.cleanSourceFilter path type && (