Skip to content

Commit 6cafadf

Browse files
committed
docs(nix): explain crane deps cache key
Document why the dependency-only crane arguments exclude pricing inputs and use a stable version. The comments keep the cache-key split understandable without changing build behaviour.
1 parent 6d8c029 commit 6cafadf

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎nix/static-package.nix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ in
4141
];
4242
buildInputs = [ ];
4343
};
44+
# Share the same deps-only cache key, then add static target settings.
4445
staticDepsOnlyArgs = config.packages.ccusage.passthru.depsOnlyArgs // {
4546
cargoExtraArgs = "-p ccusage --bin ccusage --target ${linuxStaticTarget}";
4647
nativeBuildInputs = with staticPkgs; [

‎package.nix‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ let
3535
libiconv
3636
];
3737
};
38+
# Keep the dependency artifact keyed only by inputs that affect Cargo deps.
39+
# Pricing snapshots and release versions are embedded by the final package.
3840
depsOnlyArgs = builtins.removeAttrs commonArgs [ "CCUSAGE_PRICING_JSON_PATH" ] // {
3941
version = "0.0.0";
4042
};

0 commit comments

Comments
 (0)