Merge pull request #279188 from ncfavier/agda-debug

agda: enable debug printing
This commit is contained in:
Naïm Favier 2024-01-31 12:22:27 +01:00 committed by GitHub
commit 9965571f37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 6 deletions

View File

@ -345,7 +345,7 @@ self: super: ({
}) (disableCabalFlag "fixity-th" super.fourmolu);
# https://github.com/NixOS/nixpkgs/issues/149692
Agda = removeConfigureFlag "-foptimise-heavily" super.Agda;
Agda = disableCabalFlag "optimise-heavily" super.Agda;
} // lib.optionalAttrs pkgs.stdenv.isx86_64 { # x86_64-darwin

View File

@ -1114,10 +1114,16 @@ self: super: builtins.intersectAttrs super {
preCheck = "export CI=true";
}) super.aeson-typescript;
Agda = lib.pipe super.Agda [
# Enable extra optimisations which increase build time, but also
# later compiler performance, so we should do this for user's benefit.
# Flag added in Agda 2.6.2
Agda = appendConfigureFlag "-foptimise-heavily" super.Agda;
(enableCabalFlag "optimise-heavily")
# Enable debug printing, which worsens performance slightly but is
# very useful.
# Flag added in Agda 2.6.4.1, was always enabled before
(enableCabalFlag "debug")
];
# ats-format uses cli-setup in Setup.hs which is quite happy to write
# to arbitrary files in $HOME. This doesn't either not achieve anything

View File

@ -11,9 +11,13 @@ mkDerivation rec {
hash = "sha256-0U6s6sXdynk2IWRBDXBJCf7Gc+gE8AhR1PXZl0DS4yU=";
};
# We don't need anything in support; avoid installing LICENSE.agda
postPatch = ''
# We don't need anything in support; avoid installing LICENSE.agda
rm -rf support
# Remove verbosity options as they make Agda take longer and use more memory.
shopt -s globstar extglob
sed -Ei '/OPTIONS/s/ -v ?[^ #]+//g' src/**/*.@(agda|lagda.md)
'';
libraryName = "1lab";