{ pkgs }: pkgs.rustPlatform.buildRustPackage { pname = "garage-k2v-client"; version = pkgs.garage.version; src = pkgs.garage.src; cargoHash = pkgs.garage.cargoHash; preBuild = '' cd src/k2v-client ''; postBuild = '' cd - ''; installPhase = '' mkdir -p $out/bin find target -executable -type f -name k2v-cli -exec cp {} $out/bin/ \; ''; # Don't check otherwise we cannot cd - in postBuild # (but would have to do it after the tests instead.) doCheck = false; buildFeatures = [ "cli" "serde/std" ]; }