From fcb5613755b08fcb7ae73a3826b1cdce40e2747f Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 27 Oct 2024 01:53:18 -0300 Subject: State of the world with Merkle Tree composition of files (#2) * file state hash calculation with history on replace and insert * add state transitions with linear hashing * add test * format dune files * nix format * delete shared flake * disable fmt check on flake * add nix formatter to flake shell --- deps/relational_engine_lib.nix | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'deps/relational_engine_lib.nix') diff --git a/deps/relational_engine_lib.nix b/deps/relational_engine_lib.nix index b1d0488..a3ea22a 100644 --- a/deps/relational_engine_lib.nix +++ b/deps/relational_engine_lib.nix @@ -1,28 +1,24 @@ -{ pkgs, libressl ? pkgs.callPackage ./libressl.nix {}, merklecpp ? pkgs.callPackage ./merklecpp.nix {}, ... }: -let - shared_lib_extension = if pkgs.stdenv.isDarwin then "dylib" else "so"; -in -pkgs.stdenv.mkDerivation { +{ pkgs, libressl ? pkgs.callPackage ./libressl.nix { } +, merklecpp ? pkgs.callPackage ./merklecpp.nix { }, ... }: +let shared_lib_extension = if pkgs.stdenv.isDarwin then "dylib" else "so"; +in pkgs.stdenv.mkDerivation { name = "librelational_engine"; src = ../shared/librelational_engine; - nativeBuildInputs = [ - pkgs.cmake - pkgs.gcc - ]; + nativeBuildInputs = [ pkgs.cmake pkgs.gcc ]; buildInputs = [ libressl merklecpp ]; env = { - MERKLECPP_INCLUDE_PATH="${merklecpp}/include"; - LIBRESSL_INCLUDE_PATH="${libressl}/include"; - LIBRESSL_LIB_PATH="${libressl}/lib"; + MERKLECPP_INCLUDE_PATH = "${merklecpp}/include"; + LIBRESSL_INCLUDE_PATH = "${libressl}/include"; + LIBRESSL_LIB_PATH = "${libressl}/lib"; OS_LIB_EXTENSION = shared_lib_extension; }; buildPhase = '' - mkdir -p $out/lib - mkdir -p $out/include - cmake --build . --target relational_engine + mkdir -p $out/lib + mkdir -p $out/include + cmake --build . --target relational_engine ''; installPhase = '' - mv librelational_engine.${shared_lib_extension} $out/lib/librelational_engine.${shared_lib_extension} - cp $src/library.h $out/include/library.h + mv librelational_engine.${shared_lib_extension} $out/lib/librelational_engine.${shared_lib_extension} + cp $src/library.h $out/include/library.h ''; } -- cgit v1.2.3