017ff431fe
Write counterpart of read_bytes. Despite its name, we mostly use it to write strings (as in ascii strings) to the wire. We also extract the padding calculation in its own function. Change-Id: I8d936e989961107261b3089e4275acbd2c093a7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/11230 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
42 lines
1,011 B
Nix
42 lines
1,011 B
Nix
{ depot, pkgs, ... }:
|
|
|
|
let
|
|
crate2nix = pkgs.callPackage ./Cargo.nix {
|
|
defaultCrateOverrides = {
|
|
tvix-castore = prev: {
|
|
PROTO_ROOT = depot.tvix.castore.protos.protos;
|
|
nativeBuildInputs = protobufDep prev;
|
|
};
|
|
|
|
tvix-store = prev: {
|
|
PROTO_ROOT = depot.tvix.store.protos.protos;
|
|
nativeBuildInputs = protobufDep prev;
|
|
};
|
|
};
|
|
};
|
|
protobufDep = prev: (prev.nativeBuildInputs or [ ]) ++ [ pkgs.buildPackages.protobuf ];
|
|
in
|
|
{
|
|
shell = (import ./shell.nix { inherit pkgs; });
|
|
tvix-daemon = crate2nix.rootCrate.build;
|
|
clippy = pkgs.stdenv.mkDerivation {
|
|
src = ./.;
|
|
cargoDeps = crate2nix.allWorkspaceMembers;
|
|
name = "tvix-daemon-clippy";
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
cargo
|
|
clippy
|
|
pkg-config
|
|
protobuf
|
|
rustc
|
|
rustPlatform.cargoSetupHook
|
|
];
|
|
|
|
buildPhase = "cargo clippy --tests --all-features --benches --examples | tee $out";
|
|
};
|
|
meta.ci.targets = [
|
|
"tvix-daemon"
|
|
"shell"
|
|
];
|
|
}
|