2021-01-18 20:01:31 +01:00
|
|
|
{ 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"
|
|
|
|
*/
|
2023-10-22 23:51:42 +02:00
|
|
|
interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex|typ))?'' agdaFile) + "agdai";
|
2021-01-26 13:01:48 +01:00
|
|
|
|
|
|
|
/* Takes an arbitrary derivation and says whether it is an agda library package
|
|
|
|
* that is not marked as broken.
|
|
|
|
*/
|
|
|
|
isUnbrokenAgdaPackage = pkg: pkg.isAgdaDerivation or false && !pkg.meta.broken;
|
2021-01-18 20:01:31 +01:00
|
|
|
}
|