Skip to content

Commit

Permalink
Leave out Agda library component
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack authored and michaelpj committed Apr 7, 2021
1 parent 3cebf41 commit 0d3d68e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions nix/pkgs/default.nix
Expand Up @@ -47,8 +47,7 @@ let
# - The 'agda-mode' executable
# - A 'version' attribute
#
# So we stitch one together here. It doesn't *seem* to need the library interface files,
# but it seems like they should be there so I added them too.
# So we stitch one together here.
#
# Furthermore, the agda builder uses a `ghcWithPackages` that has to have ieee754 available.
# We'd like it to use the same GHC as we have, if nothing else just to avoid depending on
Expand All @@ -62,7 +61,6 @@ let
paths = [
haskellNixAgda.components.exes.agda
haskellNixAgda.components.exes.agda-mode
haskellNixAgda.components.library
];
}) // { version = haskellNixAgda.identifier.version; };
frankenPkgs = pkgs // { haskellPackages = pkgs.haskellPackages // { ghcWithPackages = haskell.project.ghcWithPackages; }; };
Expand Down
5 changes: 3 additions & 2 deletions nix/pkgs/haskell/extra.nix
Expand Up @@ -33,14 +33,15 @@
# - manually compile the executable (fortunately it has no extra dependencies!) and do the
# compilation at the end of the library derivation.
packages.Agda.package.buildType = lib.mkForce "Simple";
packages.Agda.components.library.enableSeparateDataOutput = lib.mkForce true;
packages.Agda.components.library.postInstall = ''
# Compile the executable using the package DB we've just made, which contains
# the main Agda library
ghc src/main/Main.hs -package-db=$out/package.conf.d -o agda
# Find all the files in $out (would be $data if we had a separate data output)
# Find all the files in $data
shopt -s globstar
files=($out/**/*.agda)
files=($data/**/*.agda)
for f in "''${files[@]}" ; do
echo "Compiling $f"
# This is what the custom setup calls in the end
Expand Down

0 comments on commit 0d3d68e

Please sign in to comment.