Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib }: 2{ 3 /* Returns the Agda interface file to a given Agda file. 4 * 5 * Examples: 6 * interfaceFile "Everything.agda" == "Everything.agdai" 7 * interfaceFile "src/Everything.lagda.tex" == "src/Everything.agdai" 8 */ 9 interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex))?'' agdaFile) + "agdai"; 10 11 /* Takes an arbitrary derivation and says whether it is an agda library package 12 * that is not marked as broken. 13 */ 14 isUnbrokenAgdaPackage = pkg: pkg.isAgdaDerivation or false && !pkg.meta.broken; 15}