diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2024-10-27 01:53:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-27 01:53:18 -0300 |
| commit | fcb5613755b08fcb7ae73a3826b1cdce40e2747f (patch) | |
| tree | e9f1df3a4e0d9b2bb38fdc432edeae21424dbe99 /deps | |
| parent | 2eab114a120c7818861c0640ecdc300cf7366e53 (diff) | |
| download | Sakura-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 'deps')
| -rw-r--r-- | deps/libressl.nix | 2 | ||||
| -rw-r--r-- | deps/merklecpp.nix | 21 | ||||
| -rw-r--r-- | deps/relational_engine_lib.nix | 30 |
3 files changed, 23 insertions, 30 deletions
diff --git a/deps/libressl.nix b/deps/libressl.nix index ad33870..a517dab 100644 --- a/deps/libressl.nix +++ b/deps/libressl.nix @@ -2,7 +2,7 @@ pkgs.stdenv.mkDerivation { name = "libressl-lib"; src = ./.; - buildInputs = with pkgs; [libressl.dev pkg-config]; + buildInputs = with pkgs; [ libressl.dev pkg-config ]; installPhase = '' mkdir -p $out/lib mkdir -p $out/include diff --git a/deps/merklecpp.nix b/deps/merklecpp.nix index 459a957..d130be6 100644 --- a/deps/merklecpp.nix +++ b/deps/merklecpp.nix @@ -2,19 +2,16 @@ pkgs.stdenv.mkDerivation rec { name = "merklecpp"; - src = pkgs.fetchFromGitHub { - owner = "microsoft"; - repo = "merklecpp"; - rev = "master"; - sha256 = "jJJ6FEn+AkMknqun0GkXh5DSXsJnFbdE7U8BQ7Dd/Fw="; - }; + src = pkgs.fetchFromGitHub { + owner = "microsoft"; + repo = "merklecpp"; + rev = "master"; + sha256 = "jJJ6FEn+AkMknqun0GkXh5DSXsJnFbdE7U8BQ7Dd/Fw="; + }; - prePatch = '' - ''; - configurePhase = '' - ''; - buildPhase = '' - ''; + prePatch = ""; + configurePhase = ""; + buildPhase = ""; installPhase = '' mkdir -p $out/include mv merklecpp.h $out/include/merklecpp.h 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 ''; } |
