aboutsummaryrefslogtreecommitdiffstats
path: root/deps/relational_engine_lib.nix
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2024-10-27 01:53:18 -0300
committerGitHub <noreply@github.com>2024-10-27 01:53:18 -0300
commitfcb5613755b08fcb7ae73a3826b1cdce40e2747f (patch)
treee9f1df3a4e0d9b2bb38fdc432edeae21424dbe99 /deps/relational_engine_lib.nix
parent2eab114a120c7818861c0640ecdc300cf7366e53 (diff)
downloadSakura-fcb5613755b08fcb7ae73a3826b1cdce40e2747f.tar.gz
Sakura-fcb5613755b08fcb7ae73a3826b1cdce40e2747f.zip
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
Diffstat (limited to '')
-rw-r--r--deps/relational_engine_lib.nix30
1 files changed, 13 insertions, 17 deletions
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
'';
}