From 58ec6ce9b587c763636ceff916bcd41de87c9748 Mon Sep 17 00:00:00 2001 From: Manuel Bärenz Date: Fri, 5 Feb 2021 14:48:07 +0100 Subject: build-support/agda: Make includePaths configurable --- pkgs/build-support/agda/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 99cc1259023..5df02fbd5c1 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -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 ''; -- cgit 1.4.1