summaryrefslogtreecommitdiff
path: root/devenv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'devenv.nix')
-rw-r--r--devenv.nix123
1 files changed, 123 insertions, 0 deletions
diff --git a/devenv.nix b/devenv.nix
new file mode 100644
index 0000000..113b74c
--- /dev/null
+++ b/devenv.nix
@@ -0,0 +1,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/
+}