about summary refs log tree commit diff
path: root/home/modules/development/agda.nix
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-06-15T15·54-0400
committerGriffin Smith <root@gws.fyi>2020-06-15T15·54-0400
commitf59e705eca2f3dc5a1cc7d9a9fad62ac67b95a04 (patch)
treed7bbb5773cc61c53f5b4ebf495752826cee639d8 /home/modules/development/agda.nix
parent3c61742a3740a2f56433dd4334f15f735e523756 (diff)
break out an agda.nix
Diffstat (limited to 'home/modules/development/agda.nix')
-rw-r--r--home/modules/development/agda.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/home/modules/development/agda.nix b/home/modules/development/agda.nix
new file mode 100644
index 0000000000..7a197e907f
--- /dev/null
+++ b/home/modules/development/agda.nix
@@ -0,0 +1,61 @@
+{ config, lib, pkgs, ... }:
+
+let
+
+  nixpkgs-unstable = import <nixpkgs-unstable> {};
+
+  agda-categories = with nixpkgs-unstable.agdaPackages; mkDerivation rec {
+    pname = "agda-categories";
+    version = "2128fab";
+    src = pkgs.fetchFromGitHub {
+      owner = "agda";
+      repo = "agda-categories";
+      rev = version;
+      sha256 = "08mc20qaz9vp5rhi60rh8wvjkg5aby3bgwwdhfnxha1663qf1q24";
+    };
+
+    buildInputs = [ standard-library ];
+  };
+
+in
+
+{
+  imports = [
+    ../lib/cloneRepo.nix
+  ];
+
+  home.packages = with pkgs; [
+    (nixpkgs-unstable.agda.withPackages
+      (p: with p; [
+        p.standard-library
+
+      ]))
+  ];
+
+  grfn.impure.clonedRepos = {
+    agda-stdlib = {
+      github = "agda/agda-stdlib";
+      path = "code/agda-stdlib";
+    };
+
+    agda-categories = {
+      github = "agda/agda-categories";
+      path = "code/agda-categories";
+    };
+
+    categories-examples = {
+      github = "agda/categories-examples";
+      path = "code/categories-examples";
+    };
+  };
+
+  home.file.".agda/defaults".text = ''
+    standard-library
+  '';
+
+  home.file.".agda/libraries".text = ''
+    ${config.home.homeDirectory}/code/agda-stdlib/standard-library.agda-lib
+    ${config.home.homeDirectory}/code/agda-categories/agda-categories.agda-lib
+  '';
+
+}