about summary refs log tree commit diff
path: root/users/picnoir/tvix-daemon/default.nix
diff options
context:
space:
mode:
authorPicnoir <picnoir@alternativebit.fr>2024-03-21T15·09+0100
committerpicnoir picnoir <picnoir@alternativebit.fr>2024-04-03T11·25+0000
commit017ff431fe0b3c860e4ddb45e54bbd8b3b2b459d (patch)
treee40ee35e29e5accd1fa6b3cd7d8e72d0931ca0e5 /users/picnoir/tvix-daemon/default.nix
parentf7cdbbef452b0e1901be4e66567bfef8e5d5809d (diff)
feat(tvix/nix-compat): introduce write_bytes r/7843
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
Diffstat (limited to 'users/picnoir/tvix-daemon/default.nix')
-rw-r--r--users/picnoir/tvix-daemon/default.nix18
1 files changed, 17 insertions, 1 deletions
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"