fix(nixos): patch quill ledger.did during build

This commit is contained in:
2026-03-26 21:27:20 -07:00
committed by Kat Huang
parent 1c2fc23e6b
commit 59bdad2aad

View File

@@ -1,8 +1,28 @@
{ pkgs, ... }: { pkgs, ... }:
let
quillIcSrc = pkgs.fetchFromGitHub {
owner = "dfinity";
repo = "ic";
rev = "2f9ae6bf5eafed03599fd29475100aca9f78ae81";
hash = "sha256-QWJFsWZ9miWN4ql4xFXMQM1Y71nzgGCL57yAa0j7ch4=";
};
quillFixed = pkgs.quill.overrideAttrs (old: {
preBuild = (old.preBuild or "") + ''
# The vendored git dependency resolves ../ledger.did from source-git-*,
# not from the vendor root where nixpkgs currently copies it.
for dir in /build/quill-*-vendor/source-git-*; do
if [ -d "$dir" ]; then
cp ${quillIcSrc}/rs/rosetta-api/icp_ledger/ledger.did "$dir/ledger.did"
fi
done
'';
});
in
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ic-keysmith ic-keysmith
quill quillFixed
quill-qr quill-qr
]; ];
} }