@@ -314,14 +314,17 @@ in {
314 rootAndSubDir = src: rec {
314 rootAndSubDir = src: rec {
315 subDir = src.origSubDir or "";
315 subDir = src.origSubDir or "";
318+ then src # if there was no subdir use the original src
317− # Use `cleanSourceWith` to make sure the `filter` is still used
320+ # Use `cleanSourceWith` to make sure the `filter` is still used
318− if src ? origSrc && src ? filter && subDir != ""
321+ if src ? origSrc && src ? filter
319− then haskellLib.cleanSourceWith {
322+ then haskellLib.cleanSourceWith {
320− name = src.name or "source" + "-root";
323+ name = src.name or "source" + "-root";
321− src = src.origSrc;
324+ src = src.origSrc;
322− # Not passing src.origSubDir so that the result points `origSrc`
325+ # Not passing src.origSubDir so that the result points `origSrc`
323− inherit (src) filter;
326+ inherit (src) filter;
325− else src.origSrc or src;
328+ else src.origSrc or src; # If there is a subDir and origSrc (but no filter) use origSrc