Put code for new Nix versions at the top in if/else macros

dblsaiko
Mar 24, 2024, 8:30 PM
YW5FM2MIJ2LBZFBLOZ53VMQZAR3PHI2PTUUXSXLQD6EIRB342OEAC

Dependencies

  • [2] 7YS2X7JJ Fix compilation against older Nix versions (tested with 2.13.6)
  • [3] 3KEFKH5F Import existing code

Change contents

  • replacement in src/fetcher.cpp at line 39
    [3.956][2.37:64]()
    #if NIX_VERSION < 0x021800
    [3.956]
    [2.64]
    #if NIX_VERSION >= 0x021800
    [[nodiscard]] std::optional<Input> inputFromURL(const ParsedURL &url, bool requireTree) const override
    #else
  • edit in src/fetcher.cpp at line 43
    [2.153][2.153:159](),[2.159][3.956:1063](),[3.956][3.956:1063]()
    #else
    [[nodiscard]] std::optional<Input> inputFromURL(const ParsedURL &url, bool requireTree) const override