Arboricx bundle format 1.1
We don't need SHA verification or Merkle dags in our transport bundle. Content stores can handle both bundle and term verification and hashing.
This commit is contained in:
44
flake.nix
44
flake.nix
@@ -122,6 +122,48 @@
|
||||
'';
|
||||
};
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# JS FFI host
|
||||
# ------------------------------------------------------------------
|
||||
tricuJs = pkgs.buildNpmPackage {
|
||||
pname = "tricu-js";
|
||||
version = "0.1.0";
|
||||
src = ./ext/js;
|
||||
npmDepsHash = "sha256-81C7tsNcbyZVhm3uqiWdDQxp5LAXXO9aueHdMDztCfM=";
|
||||
nativeBuildInputs = [ pkgs.nodejs tricuZig ];
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/
|
||||
cp -r . $out/lib/
|
||||
cp ${tricuZig}/lib/libarboricx.so $out/lib/src
|
||||
'';
|
||||
};
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# JS FFI host tests (separate target)
|
||||
# ------------------------------------------------------------------
|
||||
tricuJsTests = pkgs.stdenv.mkDerivation {
|
||||
pname = "tricu-js-tests";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ pkgs.nodejs tricuZig ];
|
||||
buildPhase = "true";
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
export ARBORICX_LIB=${tricuZig}/lib/libarboricx.so
|
||||
export LD_LIBRARY_PATH=${tricuZig}/lib:$LD_LIBRARY_PATH
|
||||
ulimit -s 32768
|
||||
|
||||
cd ext/js
|
||||
# node_modules are pre-fetched by buildNpmPackage; copy them in
|
||||
cp -r ${tricuJs}/lib/tricu-js/node_modules .
|
||||
npm test
|
||||
|
||||
mkdir -p $out
|
||||
echo "All JS tests passed" > $out/result
|
||||
'';
|
||||
};
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# PHP FFI tests (separate target)
|
||||
# ------------------------------------------------------------------
|
||||
@@ -157,6 +199,8 @@
|
||||
packages.tricu-zig-tests = tricuZigTests;
|
||||
packages.tricu-php = tricuPhp;
|
||||
packages.tricu-php-tests = tricuPhpTests;
|
||||
packages.tricu-js = tricuJs;
|
||||
packages.tricu-js-tests = tricuJsTests;
|
||||
|
||||
checks.${packageName} = tricuPackageTests;
|
||||
checks.default = tricuPackageTests;
|
||||
|
||||
Reference in New Issue
Block a user