infrastructure/machines/storage01/tvix-cache/package/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-23 20:47:25 +02:00
{
lib,
2024-07-23 20:47:25 +02:00
fetchgit,
rustPlatform,
protobuf,
runCommand,
}:
let
tvix-hash = "sha256-It3brj6SX+9OIGyKsITnNLjzDnB7CBCZDS+S7arRiWY=";
2024-07-23 20:47:25 +02:00
tvix-src = fetchgit {
name = "tvix";
url = "https://git.dgnum.eu/mdebray/tvl-depot";
rev = "3389c550b92d8b631f75e5a77e244fe698e4b4b2";
2024-07-23 20:47:25 +02:00
hash = tvix-hash;
};
protos = runCommand "tvix-protos" { } ''
mkdir $out
cd ${tvix-src}/tvix #remove tvix maybe
find . -name '*.proto' -exec install -D {} $out/{} \;
'';
in
rustPlatform.buildRustPackage rec {
pname = "multitenant-binary-cache";
version = "0.1.0";
src = fetchgit {
url = "https://git.lix.systems/sinavir/multitenant-tvix-binary-cache.git";
rev = "0d4c5ca8f75e156f9485fc085e93e85260e2e843";
hash = "sha256-OmXud+MhF2M02ofqDOnmazf190vu91i6RZ2y0NdA8oU=";
2024-07-23 20:47:25 +02:00
};
PROTO_ROOT = protos;
nativeBuildInputs = [ protobuf ];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"bigtable_rs-0.2.10" = "sha256-2NC3rHbS2rdD0Rnovymn1xaR22KaR6yzWr298wOPxlY=";
2024-07-23 20:47:25 +02:00
"nar-bridge-0.1.0" = tvix-hash;
};
};
cargoHash = "";
meta = { };
}