From 017ff431fe0b3c860e4ddb45e54bbd8b3b2b459d Mon Sep 17 00:00:00 2001 From: Picnoir Date: Thu, 21 Mar 2024 16:09:43 +0100 Subject: feat(tvix/nix-compat): introduce write_bytes 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 Tested-by: BuildkiteCI --- users/picnoir/tvix-daemon/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'users') diff --git a/users/picnoir/tvix-daemon/default.nix b/users/picnoir/tvix-daemon/default.nix index 68aa12d0e291..e9004e408208 100644 --- a/users/picnoir/tvix-daemon/default.nix +++ b/users/picnoir/tvix-daemon/default.nix @@ -1,4 +1,4 @@ -{ depot, lib, pkgs, ... }: +{ depot, pkgs, ... }: let crate2nix = pkgs.callPackage ./Cargo.nix { @@ -19,6 +19,22 @@ 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" -- cgit 1.4.1