about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-03-31 12:01:07 +0000
committerGitHub <noreply@github.com>2024-03-31 12:01:07 +0000
commitb4bf622e464f47c69fefb43746c531044b630d59 (patch)
tree1100872ef436b91ab7dfdc8086aaccf698072025 /pkgs/build-support
parent6b7b5776bef8eed645f63725ce31fa0946f997ff (diff)
parent9bc8f11e8747a23d3333ed480a5078072827bab3 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/agda/default.nix8
-rw-r--r--pkgs/build-support/agda/lib.nix8
2 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix
index d8f55226ed134..44c9ade02ffb8 100644
--- a/pkgs/build-support/agda/default.nix
+++ b/pkgs/build-support/agda/default.nix
@@ -45,10 +45,9 @@ let
     mkdir -p $out/bin
     makeWrapper ${Agda}/bin/agda $out/bin/agda \
       --add-flags "--with-compiler=${ghc}/bin/ghc" \
-      --add-flags "--library-file=${library-file}" \
-      --add-flags "--local-interfaces"
+      --add-flags "--library-file=${library-file}"
     ln -s ${Agda}/bin/agda-mode $out/bin/agda-mode
-    ''; # Local interfaces has been added for now: See https://github.com/agda/agda/issues/4526
+    '';
 
   withPackages = arg: if isAttrs arg then withPackages' arg else withPackages' { pkgs = arg; };
 
@@ -90,13 +89,14 @@ let
         buildPhase = if buildPhase != null then buildPhase else ''
           runHook preBuild
           agda ${includePathArgs} ${everythingFile}
+          rm ${everythingFile} ${lib.interfaceFile Agda.version everythingFile}
           runHook postBuild
         '';
 
         installPhase = if installPhase != null then installPhase else ''
           runHook preInstall
           mkdir -p $out
-          find -not \( -path ${everythingFile} -or -path ${lib.interfaceFile everythingFile} \) -and \( ${concatMapStringsSep " -or " (p: "-name '*.${p}'") (extensions ++ extraExtensions)} \) -exec cp -p --parents -t "$out" {} +
+          find \( ${concatMapStringsSep " -or " (p: "-name '*.${p}'") (extensions ++ extraExtensions)} \) -exec cp -p --parents -t "$out" {} +
           runHook postInstall
         '';
 
diff --git a/pkgs/build-support/agda/lib.nix b/pkgs/build-support/agda/lib.nix
index e6e391b2ceddf..63fa6ccddba6b 100644
--- a/pkgs/build-support/agda/lib.nix
+++ b/pkgs/build-support/agda/lib.nix
@@ -2,11 +2,13 @@
 {
   /* Returns the Agda interface file to a given Agda file.
   *
+  * The resulting path may not be normalized.
+  *
   * Examples:
-  * interfaceFile "Everything.agda" == "Everything.agdai"
-  * interfaceFile "src/Everything.lagda.tex" == "src/Everything.agdai"
+  * interfaceFile pkgs.agda.version "./Everything.agda" == "_build/2.6.4.3/agda/./Everything.agdai"
+  * interfaceFile pkgs.agda.version "src/Everything.lagda.tex" == "_build/2.6.4.3/agda/src/Everything.agdai"
   */
-  interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex|typ))?'' agdaFile) + "agdai";
+  interfaceFile = agdaVersion: agdaFile: "_build/" + agdaVersion + "/agda/" + lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex|typ))?'' agdaFile) + "agdai";
 
   /* Takes an arbitrary derivation and says whether it is an agda library package
   *  that is not marked as broken.