chartdb: init at 1.19.0 by Malix-Labs · Pull Request #473469 · NixOS/nixpkgs · GitHub from @Sigmanificient :
⋯ the goal of
finalAttrsis to bring full overid-ability such that i can do:my-pkg.overrideAttrs (prev: { version = "new-version"; src = fetchNewSources { ... }; })and this alone care to change the
meta.changelogwhich usesfinalAttrs.version(for instance, this is just an example)
This made me curious about if overridden nix pkgs still cache hit?
For example: nixpkgs/pkgs/by-name/ch/chartdb/package.nix at d5b46bfdb487f89918470286c070fed9ebe17a9d · NixOS/nixpkgs · GitHub
...
buildNpmPackage (finalAttrs: {
pname = "chartdb";
version = "1.19.0"; # https://github.com/chartdb/chartdb/releases
src = fetchFromGitHub {
owner = "chartdb";
repo = "chartdb";
rev = "v${finalAttrs.version}";
hash = "sha256-vRnxvX86K0Nm+h/jWN1YRJXknYsq3nBhpxRA12m9kfU=";
};
...
Let’s imagine that this package’s version v1.18.0 is already cached in https://cache.nixos.org/.
Will a user overriding version to v1.18.0 (and the mandatory src fetchFromGitHub’s hash of course) hit the version cached in https://cache.nixos.org/ or will the cache miss (and thus I guess building the package from source)?
Otherwise, should a channel / nixpkgs flake input that has the specific package to v1.18.0 as its latest be pinned?
Is there any documentation about this?