diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-05 23:42:15 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-05 23:42:15 -0300 |
| commit | 8c640a262969ef44cd8bc0e0abe95e2a54f4c3f5 (patch) | |
| tree | 84f9ddd9e41236fb7a6f540aab07e65db9bc93cb /deps/relational_engine_lib.nix | |
| parent | 295c6a5a1f2b0db9d756ffe7bf413553a0c02737 (diff) | |
| download | Sakura-8c640a262969ef44cd8bc0e0abe95e2a54f4c3f5.tar.gz Sakura-8c640a262969ef44cd8bc0e0abe95e2a54f4c3f5.zip | |
ocaml re-migration
Diffstat (limited to 'deps/relational_engine_lib.nix')
| -rw-r--r-- | deps/relational_engine_lib.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/deps/relational_engine_lib.nix b/deps/relational_engine_lib.nix new file mode 100644 index 0000000..475ce00 --- /dev/null +++ b/deps/relational_engine_lib.nix @@ -0,0 +1,28 @@ +{ 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 ]; + buildInputs = [ + libressl + # merklecpp + ]; + env = { + # 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 + ''; + installPhase = '' + mv librelational_engine.${shared_lib_extension} $out/lib/librelational_engine.${shared_lib_extension} + cp $src/library.h $out/include/library.h + ''; +} |
