blob: 113b74c7676e5704a658da5bacac1f3dd7ab8198 (
plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
{
pkgs,
lib,
config,
inputs,
...
}: let
opkgs = import inputs.ocaml {system = pkgs.system;};
murmur = opkgs.ocamlPackages.buildDunePackage {
pname = "murmur3";
version = "0.4";
src = pkgs.fetchFromGitHub {
owner = "polwex";
repo = "ocaml-murmur3";
rev = "be8ef049b515ccc1adc7393975e0f4a12a95dcb0";
sha256 = "oojBUIo8YIzVxAau4jwToYinemuDKYwaX+2OaZ28mW0=";
};
};
in {
# nixConfig = {
# extra-substituters = "https://anmonteiro.nix-cache.workers.dev";
# extra-trusted-public-keys = "ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=";
# };
# https://devenv.sh/basics/
env.GREET = "devenv";
#rust
env.LIBCLANG_PATH = pkgs.lib.makeLibraryPath [pkgs.llvmPackages_latest.libclang.lib];
#ocaml
# overlays = [
# inputs.ocaml.overlays.default
# (final: prev: {
# ocamlPackages = prev.ocaml-ng.ocamlPackages_5_3;
# ocaml = prev.ocaml-ng.ocamlPackages_5_3.ocaml;
# })
# ];
# https://devenv.sh/packages/
packages = with pkgs;
[
git
#rust
openssl
pkg-config
clang
zig_0_14
opkgs.ocamlPackages.lmdb
(python312.withPackages (py: [py.requests]))
]
++ (with opkgs.ocamlPackages; [
ocaml
dune_3
opam
findlib
merlin
utop
odoc
ocaml-lsp
ocp-indent
ocamlformat
#
#
cmdliner
logs
zarith
cmdliner
logs
eio_main
lmdb
domainslib
piaf
murmur
ctypes
ctypes-foreign
# testing
alcotest
qcheck
qcheck-alcotest
landmarks
]);
# https://devenv.sh/languages/
languages.rust.enable = true;
# languages.ocaml = {
# enable = true;
# };
# https://devenv.sh/processes/
# processes.dev.exec = "${lib.getExe pkgs.watchexec} -n -- ls -la";
# https://devenv.sh/services/
# services.postgres.enable = true;
# https://devenv.sh/scripts/
scripts.hello.exec = ''
echo hello from $GREET
'';
# https://devenv.sh/basics/
enterShell = ''
hello # Run scripts directly
git --version # Use packages
'';
# https://devenv.sh/tasks/
# tasks = {
# "myproj:setup".exec = "mytool build";
# "devenv:enterShell".after = [ "myproj:setup" ];
# };
# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
git --version | grep --color=auto "${pkgs.git.version}"
'';
# https://devenv.sh/git-hooks/
# git-hooks.hooks.shellcheck.enable = true;
# See full reference at https://devenv.sh/reference/options/
}
|