-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
61 lines (57 loc) · 1.64 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
parts.url = "github:hercules-ci/flake-parts";
parts.inputs.nixpkgs-lib.follows = "nixpkgs";
systems.url = "github:nix-systems/default";
};
outputs = inputs: inputs.parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
perSystem = { pkgs, system, ... }: {
_module.args = {
lib = with inputs; builtins // nixpkgs.lib // parts.lib;
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(final: prev: {
ocamlPackages = prev.ocamlPackages.overrideScope (_: prev': {
mirage-crypto-rng = prev'.mirage-crypto-rng.overrideAttrs (_: {
# https://github.com/mirage/mirage-crypto/issues/216
# https://github.com/nixos/nixpkgs/pull/356634
doCheck = !(with final.stdenv; isDarwin && isAarch64);
});
});
})
];
};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
dune_3
ocaml
ocamlformat
sops
] ++ (with ocamlPackages; [
angstrom
cohttp
cohttp-lwt
cohttp-lwt-unix
core
lambdasoup
lwt
mrmime
ocaml-print-intf
odoc
ptime
uri
utop
]);
};
formatter = pkgs.writeShellScriptBin "formatter" ''
${pkgs.deno}/bin/deno fmt readme.md
${pkgs.dune_3}/bin/dune fmt
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt .
'';
};
};
}