From e0c5e8b7a48033fb82e18dbe74b75c9b8d1d641d Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Fri, 24 Jul 2026 08:25:38 +0000 Subject: [PATCH] fix(nix): pin capnpc source to immutable commit, not mutable main ref xbuild's capnpc package pinned src to shen390s/c-capnproto's `main` branch with a hardcoded sha256, so every upstream push broke `nix develop` with a fixed-output-derivation hash mismatch (bug-918, recurred 4x in this worktree). Override capnpc's src to a fetchFromGitHub pinned at an immutable commit instead. --- src/nixSupport/xce.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/nixSupport/xce.nix b/src/nixSupport/xce.nix index 65c47ede..63a4902a 100644 --- a/src/nixSupport/xce.nix +++ b/src/nixSupport/xce.nix @@ -35,6 +35,17 @@ stdenv.mkDerivation { struct2json (capnpc.overrideAttrs (oldAttrs: { separateDebugInfo = true; + # bug-918: upstream xbuild's capnpc package.nix pins src to the + # MUTABLE `main` ref of shen390s/c-capnproto with a hardcoded sha256, + # so it hard-breaks (fixed-output hash mismatch) every time that + # branch moves. Pin to an immutable commit here instead so this repo + # stops depending on upstream's moving target. + src = pkgs.fetchFromGitHub { + owner = "shen390s"; + repo = "c-capnproto"; + rev = "e45ff682c4756ac5067cbac6d0f282a8ea5f0155"; + sha256 = "sha256-9rTlcTia+s9ARGeTi+8auGvM0RkS+wZK7aIkzecaeSk="; + }; })) which findutils