Fix build for Nix 2.24
Dependencies
- [2]
YW5FM2MIPut code for new Nix versions at the top in if/else macros - [3]
GCOWWL5GCrusty debug header - [4]
RPUKW357Fix build for Nix 2.23 - [5]
7YS2X7JJFix compilation against older Nix versions (tested with 2.13.6) - [6]
H5RKFV7YDon't directly execute Pijul from fetcher - [7]
3KEFKH5FImport existing code - [8]
U5AKEHEQFix build for Nix 2.19 to 2.21
Change contents
- replacement in src/fetcher.cpp at line 40
#if NIX_VERSION >= 0x021800#if NIX_VERSION >= 0x022400[[nodiscard]] std::optional<Input> inputFromURL(const Settings &settings, const ParsedURL &url, bool requireTree) const override#elif NIX_VERSION >= 0x021800 - edit in src/fetcher.cpp at line 71
#if NIX_VERSION >= 0x022400return inputFromAttrs(settings, attrs);#else - edit in src/fetcher.cpp at line 75
#endif - edit in src/fetcher.cpp at line 80
#if NIX_VERSION >= 0x022400[[nodiscard]] std::optional<Input> inputFromAttrs(const Settings &settings, const Attrs &attrs) const override#else - edit in src/fetcher.cpp at line 84
#endif - edit in src/fetcher.cpp at line 102
#if NIX_VERSION >= 0x022400Input input(settings);#else - edit in src/fetcher.cpp at line 106
#endif - replacement in src/fetcher.cpp at line 438
if (!fetchSettings.allowDirty) {#if NIX_VERSION >= 0x022400auto settings = *input.settings;#elseauto settings = fetchSettings;#endifif (!settings.allowDirty) { - replacement in src/fetcher.cpp at line 448
if (fetchSettings.warnDirty) {if (settings.warnDirty) { - replacement in src/fetcher.cpp at line 473
#if NIX_VERSION >= 0x022300#if NIX_VERSION >= 0x022400auto storePath = store->addToStore(input.getName(), {getFSSourceAccessor(), CanonPath(actualPath)}, ContentAddressMethod::Raw::NixArchive, HashAlgorithm::SHA256, {}, filter);#elif NIX_VERSION >= 0x022300