git.iko.soy/typeable/nixpkgs
on master help sign in
build-support/agda: Make includePaths configurable
commit58ec6ce9b587c763636ceff916bcd41de87c9748 authorManuel Bärenz <programming@manuelbaerenz.de> dateFri 5 Feb 2021, 14:48 (6 years ago) parent3906759
1 file changed+3−1
pkgs/build-support/agda/default.nix+3−1
pkgs/build-support/agda/default.nix+3−1
@@ -49,6 +49,7 @@ let
4949 , meta
5050 , buildInputs ? []
5151 , everythingFile ? "./Everything.agda"
52+ , includePaths ? []
5253 , libraryName ? pname
5354 , libraryFile ? "${libraryName}.agda-lib"
5455 , buildPhase ? null
@@ -57,6 +58,7 @@ let
5758 , ...
5859 }: let
5960 agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
61+ includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
6062 in
6163 {
6264 inherit libraryName libraryFile;
@@ -67,7 +69,7 @@ let
6769
6870 buildPhase = if buildPhase != null then buildPhase else ''
6971 runHook preBuild
70− agda -i ${dirOf everythingFile} ${everythingFile}
72+ agda ${includePathArgs} ${everythingFile}
7173 runHook postBuild
7274 '';
7375