From e32ba6294781691846c3ab19281fe977350b4d0f Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 26 Sep 2026 15:30:53 -0300 Subject: preparation cleanup for RNT integration --- flake.nix | 96 ++------------------------------------------------------------- 1 file changed, 2 insertions(+), 94 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index e5c6ddf..01bc122 100644 --- a/flake.nix +++ b/flake.nix @@ -6,9 +6,9 @@ nix-filter.url = "github:numtide/nix-filter"; RNT = { type = "github"; - owner = "mmagueta"; + owner = "dont-rely-on-nulls"; repo = "RNT"; - ref = "663586b"; + ref = "master"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -37,12 +37,8 @@ include = [ ".ocamlformat" "dune-project" - (nix-filter.lib.inDirectory "bplustree") (nix-filter.lib.inDirectory "bin") (nix-filter.lib.inDirectory "lib") - (nix-filter.lib.inDirectory "prl_api") - (nix-filter.lib.inDirectory "shared") - (nix-filter.lib.inDirectory "test") ]; }; @@ -82,89 +78,6 @@ }; }; - checks = { - relational_engine = let - patchDuneCommand = - let subcmds = [ "build" "test" "runtest" "install" ]; - in lib.replaceStrings - (lib.lists.map (subcmd: "dune ${subcmd}") subcmds) - (lib.lists.map (subcmd: "dune ${subcmd} --display=short") - subcmds); - - in self.packages.${system}.relational_engine.overrideAttrs - (oldAttrs: { - name = "check-${oldAttrs.name}"; - doCheck = true; - buildPhase = patchDuneCommand oldAttrs.buildPhase; - checkPhase = patchDuneCommand oldAttrs.checkPhase; - installPhase = "touch $out"; - preCheck = '' - export CAML_LD_LIBRARY_PATH="${rnt}/lib''${CAML_LD_LIBRARY_PATH:+:$CAML_LD_LIBRARY_PATH}" - export LD_LIBRARY_PATH="${rnt}/lib''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" - export DYLD_LIBRARY_PATH="${rnt}/lib''${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" - ''; - }); - - dune-fmt = legacyPackages.runCommand "check-dune-fmt" { - nativeBuildInputs = [ - ocamlPackages.dune_3 - ocamlPackages.ocaml - legacyPackages.ocamlformat - ]; - } '' - echo "checking dune and ocaml formatting" - dune build \ - --display=short \ - --no-print-directory \ - --root="${sources.ocaml}" \ - --build-dir="$(pwd)/_build" \ - @fmt - touch $out - ''; - - dune-test = legacyPackages.runCommand "check-dune-test" { - nativeBuildInputs = [ - ocamlPackages.dune_3 - ocamlPackages.ocaml - legacyPackages.ocamlformat - ocamlPackages.ppx_inline_test - ocamlPackages.ppx_deriving - ocamlPackages.ppx_sexp_conv - ocamlPackages.lwt - ocamlPackages.lwt-exit - ocamlPackages.ctypes - ocamlPackages.ctypes-foreign - rnt - ppx_protocol_conv - ppx_protocol_conv_xml_light - ]; - } '' - echo "checking dune and ocaml formatting" - dune build \ - --display=short \ - --no-print-directory \ - --root="${sources.ocaml}" \ - --build-dir="$(pwd)/_build" \ - @fmt - touch $out - ''; - - # Check documentation generation - dune-doc = legacyPackages.runCommand "check-dune-doc" { - ODOC_WARN_ERROR = "true"; - nativeBuildInputs = - [ ocamlPackages.dune_3 ocamlPackages.ocaml ocamlPackages.odoc ]; - } '' - echo "checking ocaml documentation" - dune build \ - --display=short \ - --no-print-directory \ - --root="${sources.ocaml}" \ - --build-dir="$(pwd)/_build" \ - @doc - touch $out - ''; - }; devShells = { default = legacyPackages.mkShell { @@ -197,11 +110,6 @@ shellHook = '' export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH:+$CAML_LD_LIBRARY_PATH:}$(ocamlfind query num)" - export RNT_ROOT="${rnt}" - export CPATH="${rnt}/include''${CPATH:+:$CPATH}" - export LIBRARY_PATH="${rnt}/lib''${LIBRARY_PATH:+:$LIBRARY_PATH}" - export DYLD_LIBRARY_PATH="${rnt}/lib''${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" - export LD_LIBRARY_PATH="${rnt}/lib''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ''; inputsFrom = [ self.packages.${system}.relational_engine ]; -- cgit v1.2.3