Merge pull request #110512 from neosimsim/agda-dont-install-Everything
Agda don't install Everything module
This commit is contained in:
commit
8bf1bc692c
@ -23,6 +23,13 @@ in
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
assert (
|
||||
"${pkgs.agdaPackages.lib.interfaceFile "Everything.agda"}" == "Everything.agdai"
|
||||
), "wrong interface file for Everything.agda"
|
||||
assert (
|
||||
"${pkgs.agdaPackages.lib.interfaceFile "tmp/Everything.agda.md"}" == "tmp/Everything.agdai"
|
||||
), "wrong interface file for tmp/Everything.agda.md"
|
||||
|
||||
# Minimal script that typechecks
|
||||
machine.succeed("touch TestEmpty.agda")
|
||||
machine.succeed("agda TestEmpty.agda")
|
||||
|
@ -70,7 +70,7 @@ let
|
||||
installPhase = if installPhase != null then installPhase else ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
find \( ${concatMapStringsSep " -or " (p: "-name '*.${p}'") (extensions ++ extraExtensions)} \) -exec cp -p --parents -t "$out" {} +
|
||||
find -not \( -path ${everythingFile} -or -path ${lib.interfaceFile everythingFile} \) -and \( ${concatMapStringsSep " -or " (p: "-name '*.${p}'") (extensions ++ extraExtensions)} \) -exec cp -p --parents -t "$out" {} +
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
10
pkgs/build-support/agda/lib.nix
Normal file
10
pkgs/build-support/agda/lib.nix
Normal file
@ -0,0 +1,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";
|
||||
}
|
@ -14,6 +14,9 @@ mkDerivation rec {
|
||||
nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
|
||||
preConfigure = ''
|
||||
runhaskell GenerateEverything.hs
|
||||
# We will only build/consider Everything.agda, in particular we don't want Everything*.agda
|
||||
# do be copied to the store.
|
||||
rm EverythingSafe.agda EverythingSafeGuardedness.agda EverythingSafeSizedTypes.agda
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -11,6 +11,8 @@ let
|
||||
in {
|
||||
inherit mkDerivation;
|
||||
|
||||
lib = lib.extend (final: prev: import ../build-support/agda/lib.nix { lib = prev; });
|
||||
|
||||
agda = withPackages [] // { inherit withPackages; };
|
||||
|
||||
standard-library = callPackage ../development/libraries/agda/standard-library {
|
||||
|
Loading…
Reference in New Issue
Block a user