1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-03 07:31:00 +01:00

TextHashMethod -> TextIngestionMethod, gate with XP feature

I suppose we can use `dynamic-derivations` for the few things we neeed.
This commit is contained in:
John Ericson 2023-04-17 19:02:45 -04:00
parent f56c4a5bdf
commit 668377f217
11 changed files with 53 additions and 29 deletions

View file

@ -2427,7 +2427,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
"output path %1% without valid stats info",
actualPath);
if (outputHash.method == ContentAddressMethod { FileIngestionMethod::Flat } ||
outputHash.method == ContentAddressMethod { TextHashMethod {} })
outputHash.method == ContentAddressMethod { TextIngestionMethod {} })
{
/* The output path should be a regular file without execute permission. */
if (!S_ISREG(st->st_mode) || (st->st_mode & S_IXUSR) != 0)
@ -2441,7 +2441,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
std::string oldHashPart { scratchPath->hashPart() };
HashModuloSink caSink { outputHash.hashType, oldHashPart };
std::visit(overloaded {
[&](const TextHashMethod &) {
[&](const TextIngestionMethod &) {
readFile(actualPath, caSink);
},
[&](const FileIngestionMethod & m2) {