about summary refs log tree commit diff
path: root/pkgs/build-support/agda
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2015-05-18 04:21:50 +0000
committerJohn Ericson <Ericson2314@Yahoo.com>2015-05-18 12:33:00 -0400
commitae444ea4c4e12853e9791d6c567964e345fea922 (patch)
tree93f039ed6ccd9a912faafc6474dac80f053a1b8d /pkgs/build-support/agda
parent95c1c686a371954751003c8108f9b6bd49a5338b (diff)
downloadnixlib-ae444ea4c4e12853e9791d6c567964e345fea922.tar
nixlib-ae444ea4c4e12853e9791d6c567964e345fea922.tar.gz
nixlib-ae444ea4c4e12853e9791d6c567964e345fea922.tar.bz2
nixlib-ae444ea4c4e12853e9791d6c567964e345fea922.tar.lz
nixlib-ae444ea4c4e12853e9791d6c567964e345fea922.tar.xz
nixlib-ae444ea4c4e12853e9791d6c567964e345fea922.tar.zst
nixlib-ae444ea4c4e12853e9791d6c567964e345fea922.zip
agda: Remove `extraBuildFlags`
This is unused, future users can just use override `buildFlags`
and extend/replace as needed. `includeDirs` is provided for this
purpose.

We should add `dirOf self.everythingFile` rather than `.`, but
`dirOf` breaks on relative paths so that is not an option.
Diffstat (limited to 'pkgs/build-support/agda')
-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 d268bc3b122a..a513d50d04c7 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;