Compiles with Lix (untested)

dblsaiko
Dec 8, 2024, 4:40 AM
NXYGNBPOV6WE3NR7ZPRF5ILQJMB2WTDEPMBM7447UCTT4NCD4DBQC

Dependencies

  • [2] HZA67MNO Fix build for Nix 2.24
  • [3] 65LJ73XH Fix build with Nix 2.22
  • [4] GCOWWL5G Crusty debug header
  • [5] H5RKFV7Y Don't directly execute Pijul from fetcher
  • [6] YW5FM2MI Put code for new Nix versions at the top in if/else macros
  • [7] RPUKW357 Fix build for Nix 2.23
  • [8] 3KEFKH5F Import existing code
  • [9] 7YS2X7JJ Fix compilation against older Nix versions (tested with 2.13.6)
  • [10] DYNXZQZV Uncouple some of the logic from Nix library and add basic tests
  • [11] U5AKEHEQ Fix build for Nix 2.19 to 2.21
  • [*] XGCRPWKL Move repo interaction into separate source file

Change contents

  • edit in src/fetcher.cpp at line 3
    [4.2275]
    [13.3464]
    #include "nixfeat.h"
  • replacement in src/fetcher.cpp at line 14
    [4.170][4.61:89]()
    #if NIX_VERSION >= 0x022000
    [4.170]
    [4.89]
    #ifdef NIX_HAS_POSIX_SOURCE_ACCESSOR_H
  • replacement in src/fetcher.cpp at line 18
    [4.133][4.0:28]()
    #if NIX_VERSION >= 0x022300
    [4.133]
    [4.28]
    #ifdef NIX_HAS_STORE_PATH_ACCESSOR_H
  • replacement in src/fetcher.cpp at line 20
    [4.62][4.62:92]()
    #elif NIX_VERSION >= 0x022100
    [4.62]
    [4.161]
    #elif defined(NIX_HAS_FS_INPUT_ACCESSOR_H)
  • replacement in src/fetcher.cpp at line 41
    [4.956][2.2:30]()
    #if NIX_VERSION >= 0x022400
    [4.956]
    [2.30]
    #if defined(NIX_INPUTFROMURL_HAS_SETTINGS_PARAM)
  • replacement in src/fetcher.cpp at line 43
    [2.163][2.163:193]()
    #elif NIX_VERSION >= 0x021800
    [2.163]
    [4.28]
    #elif defined(NIX_INPUTFROMURL_HAS_REQUIRETREE_PARAM)
  • replacement in src/fetcher.cpp at line 72
    [4.1702][2.194:222]()
    #if NIX_VERSION >= 0x022400
    [4.1702]
    [2.222]
    #if defined(NIX_INPUTFROMURL_HAS_SETTINGS_PARAM)
  • replacement in src/fetcher.cpp at line 81
    [4.1747][2.285:313]()
    #if NIX_VERSION >= 0x022400
    [4.1747]
    [2.313]
    #if defined(NIX_INPUTFROMURL_HAS_SETTINGS_PARAM)
  • replacement in src/fetcher.cpp at line 93
    [4.1933][4.202:229]()
    #if NIX_VERSION < 0x021900
    [4.1933]
    [4.1933]
    #ifndef NIX_INPUTSCHEME_EXTERNAL_URI_CHECKS
  • replacement in src/fetcher.cpp at line 103
    [4.2277][2.443:471]()
    #if NIX_VERSION >= 0x022400
    [4.2277]
    [2.471]
    #if defined(NIX_INPUTFROMURL_HAS_SETTINGS_PARAM)
  • replacement in src/fetcher.cpp at line 110
    [4.2328][4.238:265]()
    #if NIX_VERSION < 0x022100
    [4.2328]
    [4.2328]
    #ifndef NIX_INPUTSCHEME_EXTERNAL_LOCKED_CHECKS
  • replacement in src/fetcher.cpp at line 121
    [4.2497][4.274:301]()
    #if NIX_VERSION < 0x021900
    [4.2497]
    [4.2497]
    #ifndef NIX_INPUTSCHEME_EXTERNAL_URI_CHECKS
  • replacement in src/fetcher.cpp at line 151
    [4.3215][4.310:338]()
    #if NIX_VERSION >= 0x022100
    [4.3215]
    [4.338]
    #ifdef NIX_INPUTSCHEME_HAS_PRIVATE_FETCH
  • replacement in src/fetcher.cpp at line 172
    [4.3662][4.443:471]()
    #if NIX_VERSION >= 0x021900
    [4.3662]
    [4.471]
    #ifdef NIX_GETSOURCEPATH_IS_CONST
  • replacement in src/fetcher.cpp at line 191
    [4.560][4.560:588]()
    #if NIX_VERSION >= 0x021900
    [4.560]
    [4.588]
    #ifdef NIX_HAS_PUTFILE
  • replacement in src/fetcher.cpp at line 199
    [4.799][4.799:827]()
    #if NIX_VERSION >= 0x022100
    [4.799]
    [4.827]
    #ifdef NIX_CANONPATH_HAS_SLASH_OP
  • replacement in src/fetcher.cpp at line 219
    [4.1384][4.1384:1412]()
    #if NIX_VERSION >= 0x021900
    [4.1384]
    [4.1412]
    #ifdef NIX_INPUTSCHEME_EXTERNAL_URI_CHECKS
  • replacement in src/fetcher.cpp at line 231
    [4.1640][4.1640:1668]()
    #if NIX_VERSION >= 0x022100
    [4.1640]
    [4.1668]
    #ifdef NIX_INPUTSCHEME_EXTERNAL_LOCKED_CHECKS
  • replacement in src/fetcher.cpp at line 239
    [4.1831][4.93:121]()
    #if NIX_VERSION >= 0x022300
    [4.1831]
    [4.121]
    #ifdef NIX_INPUTSCHEME_USES_SOURCE_ACCESSOR
  • replacement in src/fetcher.cpp at line 259
    [4.338][4.2201:2229](),[4.4549][4.2201:2229]()
    #if NIX_VERSION >= 0x022000
    [4.338]
    [4.2229]
    #ifdef NIX_STORE_PARAM_IS_STORE_REF
  • replacement in src/fetcher.cpp at line 272
    [4.4838][4.244:272]()
    #if NIX_VERSION >= 0x022300
    [4.4838]
    [4.272]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 282
    [4.5098][4.326:354]()
    #if NIX_VERSION >= 0x022300
    [4.5098]
    [4.354]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 307
    [4.5484][4.682:710]()
    #if NIX_VERSION >= 0x022300
    [4.5484]
    [4.710]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 339
    [4.5924][4.1321:1349]()
    #if NIX_VERSION >= 0x022300
    [4.5924]
    [4.1349]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 351
    [4.6037][4.1442:1470]()
    #if NIX_VERSION >= 0x022300
    [4.6037]
    [4.1470]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 368
    [4.6403][4.1517:1545]()
    #if NIX_VERSION >= 0x022300
    [4.6403]
    [4.1545]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 375
    [4.6490][4.1632:1660]()
    #if NIX_VERSION >= 0x022300
    [4.6490]
    [4.1660]
    #ifdef NIX_HAS_CACHE_KEY_TYPE
  • replacement in src/fetcher.cpp at line 418
    [4.7976][4.1738:1766]()
    #if NIX_VERSION >= 0x022300
    [4.7976]
    [4.1766]
    #if defined(NIX_POSIX_SOURCE_ACCESSOR_V3)
  • replacement in src/fetcher.cpp at line 421
    [4.1891][4.1891:1921]()
    #elif NIX_VERSION >= 0x022100
    [4.1891]
    [4.2420]
    #elif defined(NIX_POSIX_SOURCE_ACCESSOR_V2)
  • replacement in src/fetcher.cpp at line 424
    [4.2577][4.2577:2607]()
    #elif NIX_VERSION >= 0x022000
    [4.2577]
    [4.2607]
    #elif defined(NIX_POSIX_SOURCE_ACCESSOR_V1)
  • replacement in src/fetcher.cpp at line 449
    [4.8774][2.517:545]()
    #if NIX_VERSION >= 0x022400
    [4.8774]
    [2.545]
    #ifdef NIX_INPUTFROMURL_HAS_SETTINGS_PARAM
  • replacement in src/fetcher.cpp at line 469
    [4.9233][4.9233:9279]()
    assert(hasPrefix(p, actualPath));
    [4.9233]
    [4.9279]
    assert(p.starts_with(actualPath));
  • replacement in src/fetcher.cpp at line 478
    [4.9566][4.9566:9632]()
    return i != files.end() && hasPrefix(*i, prefix);
    [4.9566]
    [4.9632]
    return i != files.end() && i->starts_with(prefix);
  • replacement in src/fetcher.cpp at line 484
    [4.9697][2.727:755]()
    #if NIX_VERSION >= 0x022400
    [4.9697]
    [2.755]
    #if defined(NIX_POSIX_SOURCE_ACCESSOR_V4)
  • replacement in src/fetcher.cpp at line 486
    [2.938][2.938:968]()
    #elif NIX_VERSION >= 0x022300
    [2.938]
    [4.1950]
    #elif defined(NIX_POSIX_SOURCE_ACCESSOR_V3)
  • replacement in src/fetcher.cpp at line 488
    [4.2126][4.2126:2156]()
    #elif NIX_VERSION >= 0x022000
    [4.2126]
    [4.2782]
    #elif defined(NIX_POSIX_SOURCE_ACCESSOR_V1)
  • edit in src/fetcher.cpp at line 492
    [4.2987]
    [4.9697]
    #ifdef NIX_IS_LIX
    const auto htSHA256 = HashType::SHA256;
    #endif
  • edit in src/fetcher.cpp at line 542
    [4.12882]
    [4.12882]
    #ifdef NIX_IS_LIX
    registerInputScheme(std::make_shared<PijulInputScheme>());
    #else
  • edit in src/fetcher.cpp at line 546
    [4.12945]
    [4.12945]
    #endif
  • edit in src/compat.cpp at line 3
    [4.1838]
    [4.3967]
    #include "nixfeat.h"
  • replacement in src/compat.cpp at line 6
    [4.3987][4.3987:4015]()
    #if NIX_VERSION >= 0x021900
    [4.3987]
    [4.4015]
    #ifdef NIX_HAS_PROCESSES_H
  • edit in src/compat.cpp at line 32
    [4.4425]
    [4.4425]
    DBG_MSG("%s %s", p, chdir);
  • replacement in src/compat.cpp at line 36
    [4.4508][3.0:36]()
    #if NIX_VERSION >= 0x022200
    [4.4508]
    [3.36]
    #if NIX_HAS_LOOKUPPATH