build-support/agda: Make includePaths configurable

This commit is contained in:
Manuel Bärenz 2021-02-05 14:48:07 +01:00
parent 39067594f5
commit 58ec6ce9b5

View File

@ -49,6 +49,7 @@ let
, meta
, buildInputs ? []
, everythingFile ? "./Everything.agda"
, includePaths ? []
, libraryName ? pname
, libraryFile ? "${libraryName}.agda-lib"
, buildPhase ? null
@ -57,6 +58,7 @@ let
, ...
}: let
agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
in
{
inherit libraryName libraryFile;
@ -67,7 +69,7 @@ let
buildPhase = if buildPhase != null then buildPhase else ''
runHook preBuild
agda -i ${dirOf everythingFile} ${everythingFile}
agda ${includePathArgs} ${everythingFile}
runHook postBuild
'';