tests.fetchtorrent: avoid builtins.convertHash

This function wasn't added until Nix 2.19, so we shouldn't (yet) be
relying on it.
This commit is contained in:
Adam Dinwoodie
2025-11-12 17:54:55 +00:00
parent 845cd628a5
commit 081f217892

View File

@@ -62,17 +62,7 @@ let
# Fixed output derivation hash is identical for all derivations: the empty
# directory.
fetchtorrentWithHash =
args:
fetchtorrent (
{
hash = builtins.convertHash {
hash = emptyDirectory.outputHash;
toHashFormat = "sri";
hashAlgo = emptyDirectory.outputHashAlgo;
};
}
// args
);
args: fetchtorrent ({ hash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; } // args);
in
# Seems almost but not quite worth using lib.mapCartesianProduct...
builtins.mapAttrs (n: v: testers.invalidateFetcherByDrvHash fetchtorrentWithHash v) {