2021-02-05 17:12:51 +00: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"
|
|
|
|
*/
|
|
|
|
interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex))?'' agdaFile) + "agdai";
|
2021-10-17 09:34:42 +00: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-02-05 17:12:51 +00:00
|
|
|
}
|