mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
build-support/agda: Make includePaths configurable
This commit is contained in:
parent
39067594f5
commit
58ec6ce9b5
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user