-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
65 lines (57 loc) · 1.52 KB
/
flake.nix
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
62
63
64
65
{
description = "JOSE implementation in OCaml";
nixConfig = {
extra-substituters = "https://ocaml.nix-cache.com";
extra-trusted-public-keys = "ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=";
};
inputs = {
nixpkgs.url = "github:nix-ocaml/nix-overlays";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.treefmt-nix.flakeModule
];
systems = ["x86_64-linux" "aarch64-darwin"];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}: {
treefmt = {
projectRootFile = "flake.nix";
programs = {
alejandra.enable = true;
ocamlformat = {
inherit pkgs;
configFile = ./.ocamlformat;
enable = true;
};
};
};
packages = pkgs.ocamlPackages.callPackage ./nix/generic.nix {
inherit (inputs) nix-filter;
doCheck = true;
};
devShells.default = pkgs.mkShell {
inputsFrom = with self'.packages; [
jose
];
packages = with pkgs.ocamlPackages; [
ocaml
dune
ocaml-lsp
ocamlformat
dune-release
odoc
];
};
};
};
}