foot: cache stimuliFile more aggressively

stimuliFile would get rebuild with every change in version, since the
stimulusGenerator derivation would depend on the version string. Since
the script often doesn't change between releases, this causes
unnecessary rebuilds and cache duplication.

Additionally we add a test to passthru which checks if the hash of the
script is still up to date: By making its name depend on the version
string, it'll get rebuild on every version change, even if the hash
stays the same. This way we can detect new hash mismatches.

+8 -2
+8 -2
pkgs/applications/terminal-emulators/foot/default.nix
··· 36 # 37 # For every bump, make sure that the hash is still accurate. 38 stimulusGenerator = stdenv.mkDerivation { 39 - pname = "foot-generate-alt-random-writes"; 40 - inherit version; 41 42 src = fetchurl { 43 url = "https://codeberg.org/dnkl/foot/raw/tag/${version}/scripts/generate-alt-random-writes.py"; ··· 185 noPgo = foot.override { 186 allowPgo = false; 187 }; 188 }; 189 190 meta = with lib; {
··· 36 # 37 # For every bump, make sure that the hash is still accurate. 38 stimulusGenerator = stdenv.mkDerivation { 39 + name = "foot-generate-alt-random-writes"; 40 41 src = fetchurl { 42 url = "https://codeberg.org/dnkl/foot/raw/tag/${version}/scripts/generate-alt-random-writes.py"; ··· 184 noPgo = foot.override { 185 allowPgo = false; 186 }; 187 + 188 + # By changing name, this will get rebuilt everytime we change version, 189 + # even if the hash stays the same. Consequently it'll fail if we introduce 190 + # a hash mismatch when updating. 191 + stimulus-script-is-current = stimulusGenerator.src.overrideAttrs (_: { 192 + name = "generate-alt-random-writes-${version}.py"; 193 + }); 194 }; 195 196 meta = with lib; {