Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
26 lines
753 B
Nix
26 lines
753 B
Nix
{ lib }:
|
|
{
|
|
/*
|
|
Returns the Agda interface file to a given Agda file.
|
|
*
|
|
* The resulting path may not be normalized.
|
|
*
|
|
* Examples:
|
|
* interfaceFile pkgs.agda.version "./Foo.agda" == "_build/AGDA_VERSION/agda/./Foo.agdai"
|
|
* interfaceFile pkgs.agda.version "src/Foo.lagda.tex" == "_build/AGDA_VERSION/agda/src/Foo.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.
|
|
*/
|
|
isUnbrokenAgdaPackage = pkg: pkg.isAgdaDerivation or false && !pkg.meta.broken;
|
|
}
|