Fix build for Nix 2.23
Dependencies
- [2]
U5AKEHEQFix build for Nix 2.19 to 2.21 - [3]
H5RKFV7YDon't directly execute Pijul from fetcher - [4]
3KEFKH5FImport existing code
Change contents
- replacement in src/fetcher.cpp at line 17
#if NIX_VERSION >= 0x022100#if NIX_VERSION >= 0x022300#include <store-path-accessor.hh>#elif NIX_VERSION >= 0x022100 - edit in src/fetcher.cpp at line 224
#if NIX_VERSION >= 0x022300std::pair<ref<SourceAccessor>, Input> getAccessor(ref<Store> store, const Input &_input) const override#else - edit in src/fetcher.cpp at line 228
#endif - replacement in src/fetcher.cpp at line 257
const Attrs impureKey{{"type", "pijul"},{"name", name},{"url", repoUrl},};#if NIX_VERSION >= 0x022300std::optional<Cache::Key> key;#else - edit in src/fetcher.cpp at line 261
#endif - edit in src/fetcher.cpp at line 267
#if NIX_VERSION >= 0x022300key = {"pijul", {{"name", name},{"channel", *channel},{"state", *state},}};if (auto res = getCache()->lookupStorePath(*key, store)) {return {std::move(res->storePath), std::move(res->value)};}#else - edit in src/fetcher.cpp at line 289
#endif - edit in src/fetcher.cpp at line 292
#if NIX_VERSION >= 0x022300const Cache::Key impureKey{"pijul", {{"name", name},{"url", repoUrl},}};if (auto res = getCache()->lookupStorePath(impureKey, store)) {auto &infoAttrs = res->value;if ((!channel || *channel == getStrAttr(infoAttrs, "channel")) && (!state || *state == getStrAttr(infoAttrs, "state"))) {return {std::move(res->storePath), std::move(infoAttrs)};}}#elseconst Attrs impureKey{{"type", "pijul"},{"name", name},{"url", repoUrl},}; - edit in src/fetcher.cpp at line 319
#endif - edit in src/fetcher.cpp at line 324
#if NIX_VERSION >= 0x022300key = {"pijul", {{"name", name},}};#else - edit in src/fetcher.cpp at line 333
#endif - edit in src/fetcher.cpp at line 336
#if NIX_VERSION >= 0x022300mergeAttrs(key->second,#else - edit in src/fetcher.cpp at line 340
#endif - edit in src/fetcher.cpp at line 353
#if NIX_VERSION >= 0x022300getCache()->upsert(impureKey, store, infoAttrs, storePath);#else - edit in src/fetcher.cpp at line 357
#endif - edit in src/fetcher.cpp at line 360
#if NIX_VERSION >= 0x022300getCache()->upsert(*key, store, infoAttrs, storePath);#else - edit in src/fetcher.cpp at line 364
#endif - replacement in src/fetcher.cpp at line 395
#if NIX_VERSION >= 0x022100#if NIX_VERSION >= 0x022300auto path = PosixSourceAccessor::createAtRoot(repoDir);auto storePath = store->addToStore(inputName, path);#elif NIX_VERSION >= 0x022100 - replacement in src/fetcher.cpp at line 453
#if NIX_VERSION >= 0x022000#if NIX_VERSION >= 0x022300auto storePath = store->addToStore(input.getName(), {getFSSourceAccessor(), CanonPath(actualPath)}, FileIngestionMethod::Recursive, HashAlgorithm::SHA256, {}, filter);#elif NIX_VERSION >= 0x022000