@@ -49,6 +49,7 @@ let
50 , buildInputs ? []
50 , buildInputs ? []
51 , everythingFile ? "./Everything.agda"
51 , everythingFile ? "./Everything.agda"
52 , libraryName ? pname
53 , libraryName ? pname
53 , libraryFile ? "${libraryName}.agda-lib"
54 , libraryFile ? "${libraryName}.agda-lib"
54 , buildPhase ? null
55 , buildPhase ? null
@@ -57,6 +58,7 @@ let
59 agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
60 agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
61+ includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
62 inherit libraryName libraryFile;
64 inherit libraryName libraryFile;
@@ -67,7 +69,7 @@ let
68 buildPhase = if buildPhase != null then buildPhase else ''
70 buildPhase = if buildPhase != null then buildPhase else ''
69 runHook preBuild
71 runHook preBuild
70− agda -i ${dirOf everythingFile} ${everythingFile}
72+ agda ${includePathArgs} ${everythingFile}
71 runHook postBuild
73 runHook postBuild