@@ -58,16 +58,20 @@ in
58 hsSourceDirs = builtins.map (d: combinePaths subDir d) component.hsSourceDirs
58 hsSourceDirs = builtins.map (d: combinePaths subDir d) component.hsSourceDirs
59 ++ (if component.hsSourceDirs == [] then [subDir] else []);
59 ++ (if component.hsSourceDirs == [] then [subDir] else []);
60 includeDirs = builtins.map (d: combinePaths subDir d) component.includeDirs;
60 includeDirs = builtins.map (d: combinePaths subDir d) component.includeDirs;
61− dirsNeeded = builtins.map (d: combinePaths subDir d) (
61+ # paths that will be needed (used to check if a parent dir should be included)
63+ # These already include subDir
63 ++ hsSourceDirs
65 ++ hsSourceDirs
64 ++ includeDirs
66 ++ includeDirs
65− ++ package.licenseFiles
66− ++ package.extraSrcFiles
67− ++ component.extraSrcFiles
68− ++ package.extraDocFiles
69 ++ builtins.map (f: dataDir + f) package.dataFiles
67 ++ builtins.map (f: dataDir + f) package.dataFiles
70− ++ otherSourceFiles);
68+ ++ otherSourceFiles
69+ ++ builtins.map (d: combinePaths subDir d) (
70+ # These need the subDir added
72+ ++ package.extraSrcFiles
73+ ++ component.extraSrcFiles
74+ ++ package.extraDocFiles);
71 fileMatch = dir: list:
75 fileMatch = dir: list:
73 prefixes = builtins.map (f: combinePaths dir f) (
77 prefixes = builtins.map (f: combinePaths dir f) (