diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 1280ecab56c0bbf4214f28547630b334bbdb1229..49061f27d1375d2e1939bf5081abfed5a2255615 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1013,8 +1013,11 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source, std::unique_ptr<AbstractHashSink> hashSink; if (info.ca == "") hashSink = std::make_unique<HashSink>(htSHA256); - else + else { + if (!info.references.empty()) + settings.requireExperimentalFeature("ca-references"); hashSink = std::make_unique<HashModuloSink>(htSHA256, storePathToHash(info.path)); + } LambdaSource wrapperSource([&](unsigned char * data, size_t len) -> size_t { size_t n = source.read(data, len); diff --git a/src/nix/hash.cc b/src/nix/hash.cc index 53a9fd20437156d1d019c3bb05411a835366fea8..d7451376c4a54e35ed1b8be8b8b50a7a8a4ecb2b 100644 --- a/src/nix/hash.cc +++ b/src/nix/hash.cc @@ -26,11 +26,13 @@ struct CmdHash : Command mkFlag() .longName("type") .mkHashTypeFlag(&ht); + #if 0 mkFlag() .longName("modulo") .description("compute hash modulo specified string") .labels({"modulus"}) .dest(&modulus); + #endif expectArgs("paths", &paths); }