summary refs log tree commit diff
path: root/pkgs/build-support/agda/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/agda/default.nix')
-rw-r--r--pkgs/build-support/agda/default.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix
index d268bc3b122..a513d50d04c 100644
--- a/pkgs/build-support/agda/default.nix
+++ b/pkgs/build-support/agda/default.nix
@@ -21,7 +21,6 @@ in
         sourceDirectories = filter (y: !(y == null)) x.sourceDirectories;
         propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
         propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
-        extraBuildFlags = filter (y : ! (y == null)) x.extraBuildFlags;
         everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
       };
 
@@ -50,11 +49,11 @@ in
         # would make a direct copy of the whole thing.
         topSourceDirectories = [ "src" ];
 
-        # Extra stuff to pass to the Agda binary.
-        extraBuildFlags = [ "-i ." ];
-        buildFlags = let r = map (x: "-i " + x + "/share/agda") self.buildDepends;
-                         d = map (x : "-i " + x) (self.sourceDirectories ++ self.topSourceDirectories);
-                     in unwords (r ++ d ++ self.extraBuildFlags);
+        # FIXME: `dirOf self.everythingFile` is what we really want, not hardcoded "./"
+        includeDirs = let r = map (x: x + "/share/agda") self.buildDepends;
+                          d = self.sourceDirectories ++ self.topSourceDirectories;
+                      in r ++ d ++ [ "." ];
+        buildFlags = unwords (map (x: "-i " + x) self.includeDirs);
 
         # We expose this as a mere convenience for any tools.
         AGDA_PACKAGE_PATH = concatMapStrings (x: x + ":") self.buildDepends;