summary refs log tree commit diff
path: root/pkgs/build-support/agda/lib.nix
blob: 976151a8283c6f81a9853109744806148322408c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
{ lib }:
{
  /* Returns the Agda interface file to a given Agda file.
  *
  * Examples:
  * interfaceFile "Everything.agda" == "Everything.agdai"
  * interfaceFile "src/Everything.lagda.tex" == "src/Everything.agdai"
  */
  interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex))?'' agdaFile) + "agdai";
}