-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
74 lines (63 loc) · 1.37 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
66
67
68
69
70
71
72
73
74
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = inputs: let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
python = pkgs.python312;
ocamlPackages = pkgs.ocamlPackages;
ocamlLibs = p:
with p; [
containers
alcotest
angstrom
iter
yojson
re
re2
fmt
ppx_deriving
ppx_derivers
qcheck
qcheck-alcotest
];
ocamlCore = p:
with p; [
ocaml
findlib
dune_3
ocaml-lsp
];
pythonLibs = p:
with p; [
#hy
z3
#sympy
#numpy
pytest
hypothesis
];
extraPackages = p:
with p; [
pup
];
in {
devShells.${system} = {
ocaml = pkgs.mkShell {
nativeBuildInputs = ocamlCore ocamlPackages;
buildInputs = ocamlLibs ocamlPackages;
};
python = python.env;
python-full = (python.withPackages pythonLibs).env;
gleam = pkgs.mkShell {packages = with pkgs; [beamPackages.erlang gleam];};
default = pkgs.mkShell {
nativeBuildInputs =
(ocamlCore ocamlPackages)
++ [(python.withPackages pythonLibs)];
packages =
extraPackages pkgs
++ ocamlLibs ocamlPackages
++ (with pkgs; [gleam]);
};
};
};
}