From 6400eb9235c04f4ba646847b09acca2b2cb0383e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 25 Sep 2024 11:18:18 +0100 Subject: [PATCH] chore: switch to nix-ocaml --- .ocamlformat | 2 +- benchmarks/dune | 4 ++++ flake.lock | 63 +++++++++++++++++++++++++++++++++++++++++++++---- flake.nix | 4 ++-- 4 files changed, 65 insertions(+), 8 deletions(-) diff --git a/.ocamlformat b/.ocamlformat index ac1a5cd5..27ab73c3 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,3 +1,3 @@ -version=0.26.1 +version=0.26.2 profile=janestreet ocaml-version=4.08.0 diff --git a/benchmarks/dune b/benchmarks/dune index d636d7ae..c5ca7efd 100644 --- a/benchmarks/dune +++ b/benchmarks/dune @@ -1,3 +1,7 @@ +(env + (dev + (flags (:standard -w -58)))) + (executables (libraries re core base stdio threads core_bench core_unix.command_unix) (names benchmark)) diff --git a/flake.lock b/flake.lock index 42cbe1c8..1ed6dd1f 100644 --- a/flake.lock +++ b/flake.lock @@ -18,6 +18,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nix-filter": { "locked": { "lastModified": 1710156097, @@ -34,17 +52,37 @@ } }, "nixpkgs": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, "locked": { - "lastModified": 1727171788, - "narHash": "sha256-A/90Cxcq76DXLhoEn/VlPXN3EqoLJmXd1q0cuhAmEdg=", - "owner": "nixos", + "lastModified": 1727203675, + "narHash": "sha256-ibsyYaGi8KfmxkbNsy8eR1L6zT4WCAQzIEP9EcOoXJo=", + "owner": "nix-ocaml", + "repo": "nix-overlays", + "rev": "aaa9425cea232424d486f1123f5168f2a70346cc", + "type": "github" + }, + "original": { + "owner": "nix-ocaml", + "repo": "nix-overlays", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1727190658, + "narHash": "sha256-hO8ullPTzvBvwd+o0dzH8SDbkNcTuUQQhex5LW45heY=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "2232cae40679f8f1c1694f800d5ddaed6fc15409", + "rev": "5620491106cfe8c2db0628161b93830d66506ffc", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "repo": "nixpkgs", + "rev": "5620491106cfe8c2db0628161b93830d66506ffc", "type": "github" } }, @@ -69,6 +107,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 1612dfe3..d8723ebf 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs.nix-filter.url = "github:numtide/nix-filter"; inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.nixpkgs.url = "github:nixos/nixpkgs"; + inputs.nixpkgs.url = "github:nix-ocaml/nix-overlays"; outputs = { self, nixpkgs, flake-utils, nix-filter }: flake-utils.lib.eachDefaultSystem (system: @@ -26,7 +26,7 @@ }; devShells.default = pkgs.mkShell { inputsFrom = pkgs.lib.attrValues packages; - buildInputs = with pkgs.ocamlPackages; [ ocaml-lsp core_bench pkgs.ocamlformat_0_26_1 ]; + buildInputs = with pkgs.ocamlPackages; [ ocaml-lsp core_bench pkgs.ocamlformat_0_26_2 ]; }; }); }