Skip to content

Commit

Permalink
Merge pull request #104 from JonathanLorimer/provide-working-agda
Browse files Browse the repository at this point in the history
Add agda binary that works with cornelis to nix
  • Loading branch information
isovector authored Dec 31, 2022
2 parents e91a17a + dc33b82 commit 4e2e28b
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 2 deletions.
54 changes: 52 additions & 2 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
url = "github:edolstra/flake-compat";
flake = false;
};

agda.url = "github:agda/agda/4d36cb37f8bfb765339b808b13356d760aa6f0ec";
};

outputs = {
self,
nixpkgs,
flake-utils,
agda,
...
}: let
name = "cornelis";
Expand Down Expand Up @@ -57,6 +60,21 @@
inherit system;
overlays = builtins.attrValues self.overlays;
};
agdaPkgs = import nixpkgs {
inherit system;
overlays = [ agda.overlay ];
};
agdaPackage = agdaPkgs.agda.withPackages (p: [
(p.standard-library.overrideAttrs (oldAttrs: {
version = "2.0-experimental";
src = pkgs.fetchFromGitHub {
repo = "agda-stdlib";
owner = "agda";
rev = "experimental";
sha256 = "sha256-l2+8myyJSufXpt1Opf65AJaTMiHMDeYYbuvkvzbCjDo=";
};
}))
]);
in {
packages =
builtins.listToAttrs (
Expand All @@ -72,8 +90,13 @@

${name} = pkgs.${name};
default = pkgs.${name};
agda = agdaPackage;
};

apps = {
agda = flake-utils.lib.mkApp { drv = self.packages.${system}.agda; exePath = "/bin/agda"; };
};

formatter = pkgs.alejandra;
}
);
Expand Down

0 comments on commit 4e2e28b

Please sign in to comment.