about summary refs log tree commit diff
path: root/home/modules/development/agda.nix
blob: 7a197e907f3c2dab90a2ac082e2d604ddc53a077 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
  '';

}