forked from mirrors/nixpkgs
build-support/agda: Make includePaths configurable
This commit is contained in:
parent
39067594f5
commit
58ec6ce9b5
|
@ -49,6 +49,7 @@ let
|
||||||
, meta
|
, meta
|
||||||
, buildInputs ? []
|
, buildInputs ? []
|
||||||
, everythingFile ? "./Everything.agda"
|
, everythingFile ? "./Everything.agda"
|
||||||
|
, includePaths ? []
|
||||||
, libraryName ? pname
|
, libraryName ? pname
|
||||||
, libraryFile ? "${libraryName}.agda-lib"
|
, libraryFile ? "${libraryName}.agda-lib"
|
||||||
, buildPhase ? null
|
, buildPhase ? null
|
||||||
|
@ -57,6 +58,7 @@ let
|
||||||
, ...
|
, ...
|
||||||
}: let
|
}: let
|
||||||
agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
|
agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
|
||||||
|
includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit libraryName libraryFile;
|
inherit libraryName libraryFile;
|
||||||
|
@ -67,7 +69,7 @@ let
|
||||||
|
|
||||||
buildPhase = if buildPhase != null then buildPhase else ''
|
buildPhase = if buildPhase != null then buildPhase else ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
agda -i ${dirOf everythingFile} ${everythingFile}
|
agda ${includePathArgs} ${everythingFile}
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue