summary refs log tree commit diff
path: root/pkgs/build-support/agda
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/agda')
-rw-r--r--pkgs/build-support/agda/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix
index 42c406dbcdc..9fe9aa45798 100644
--- a/pkgs/build-support/agda/default.nix
+++ b/pkgs/build-support/agda/default.nix
@@ -1,6 +1,6 @@
 # Builder for Agda packages.
 
-{ stdenv, lib, self, Agda, runCommandNoCC, makeWrapper, writeText, ghcWithPackages, nixosTests }:
+{ stdenv, lib, self, Agda, runCommand, makeWrapper, writeText, ghcWithPackages, nixosTests }:
 
 with lib.strings;
 
@@ -15,7 +15,7 @@ let
     '';
     pname = "agdaWithPackages";
     version = Agda.version;
-  in runCommandNoCC "${pname}-${version}" {
+  in runCommand "${pname}-${version}" {
     inherit pname version;
     nativeBuildInputs = [ makeWrapper ];
     passthru = {
@@ -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
         '';