diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-26 15:30:53 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-26 15:30:53 -0300 |
| commit | e32ba6294781691846c3ab19281fe977350b4d0f (patch) | |
| tree | f38e92ba2fc03e966d7263c7ee2e0b5d7983ebae /flake.nix | |
| parent | be375a52da6174dfda5b68617d27e1542cc80499 (diff) | |
| download | Sakura-e32ba6294781691846c3ab19281fe977350b4d0f.tar.gz Sakura-e32ba6294781691846c3ab19281fe977350b4d0f.zip | |
preparation cleanup for RNT integration
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 96 |
1 files changed, 2 insertions, 94 deletions
@@ -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 ]; |
