From 67d28e0d93c1ca4af8935708bf09fd24c4dd2ee5 Mon Sep 17 00:00:00 2001 From: furedea <132188853+furedea@users.noreply.github.com> Date: Thu, 22 Oct 2026 19:15:50 +0900 Subject: [PATCH] build: add pinned cargo-dist to the dev shell Pin cargo-dist 0.30.2 to match cargo-dist-version in Cargo.toml and CARGO_DIST_VERSION in release_artifacts.yml, so agents no longer need `nix shell nixpkgs#cargo-dist`. Refs furedea/dotfiles#264 Co-Authored-By: Claude Sonnet 5.5 --- flake.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/flake.nix b/flake.nix index 825c618..1562158 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,23 @@ let system = "aarch64-darwin"; pkgs = import nixpkgs { inherit system; }; + # Must match cargo-dist-version in Cargo.toml and CARGO_DIST_VERSION in release_artifacts.yml. + cargoDist = pkgs.cargo-dist.overrideAttrs ( + finalAttrs: _: { + version = "0.30.2"; + src = pkgs.fetchFromGitHub { + owner = "axodotdev"; + repo = "cargo-dist"; + tag = "v${finalAttrs.version}"; + hash = "sha256-1stUmm7rtNB2z2srOzDvQ9QaGsS0CySBOHt118vmJoM="; + }; + cargoHash = "sha256-Il5PVJHoNdifqUcXxKR+j+Lgga0kIsl7IJp9oGanZ+c="; + cargoDeps = pkgs.rustPlatform.fetchCargoVendor { + inherit (finalAttrs) src; + hash = finalAttrs.cargoHash; + }; + } + ); package = pkgs.rustPlatform.buildRustPackage { pname = "apple-mail-cli"; inherit ((builtins.fromTOML (builtins.readFile ./Cargo.toml)).package) version; @@ -36,6 +53,7 @@ devShells.${system}.default = pkgs.mkShell { packages = [ + cargoDist # lefthook before 2.1.6 runs hooks under a pty, which agent sandboxes deny. nixpkgs-unstable.legacyPackages.${system}.lefthook ]