2024-06-27 00:17:01 +00:00
|
|
|
{ agda-pkg, runCommand, writeShellScriptBin, writeTextFile, agdaPackages }:
|
2024-06-26 23:18:25 +00:00
|
|
|
|
2024-06-27 00:17:01 +00:00
|
|
|
let
|
|
|
|
libraryFile =
|
|
|
|
with agdaPackages;
|
|
|
|
writeTextFile {
|
|
|
|
name = "agda-libraries";
|
|
|
|
text = ''
|
2024-10-21 11:42:10 +00:00
|
|
|
${agdaPackages.cubical.src}/cubical.agda-lib
|
|
|
|
${agdaPackages.standard-library.src}/standard-library.agda-lib
|
2024-06-27 00:17:01 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
# Add an extra layer of indirection here to prevent all of GHC from being pulled in
|
|
|
|
wtf = runCommand "agda-bin" { } ''
|
|
|
|
cp ${agda-pkg}/bin/agda $out
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
|
|
|
|
writeShellScriptBin "agda" ''
|
|
|
|
set -euo pipefail
|
|
|
|
exec ${wtf} --library-file=${libraryFile} $@
|
|
|
|
''
|