Build system support for Lix

dblsaiko
Dec 8, 2024, 3:53 AM
EXXP5DBS7AFZU4SH4D5F23BWJNWO7BTNKPREF24CQSFR5KR6EVBAC

Dependencies

Change contents

  • edit in src/meson.build at line 21
    [2.475]
    [2.475]
    nix_fetchers_dep,
  • edit in src/meson.build at line 28
    [2.775]
    [2.775]
    '-DNIX_IS_@0@'.format(nix_impl.to_upper()),
  • file addition: meson.options (----------)
    [4.1]
    option('nix_impl', type: 'combo', choices: ['', 'cppnix', 'lix'])
  • edit in meson.build at line 9
    [2.1338][2.1338:1362]()
    'werror': true,
  • edit in meson.build at line 11
    [2.1370]
    [2.1370]
    nix_impl = get_option('nix_impl')
  • replacement in meson.build at line 14
    [2.1371][2.1371:1481]()
    nix_main_dep = dependency('nix-main', required: true)
    nix_store_dep = dependency('nix-store', required: true)
    [2.1371]
    [2.1481]
    nix_main_dep_names = {
    'cppnix': 'nix-main',
    'lix': 'lix-main',
    }
    if nix_impl != ''
    nix_main_dep = dependency(nix_main_dep_names.get(nix_impl))
    else
    nix_main_dep = dependency('', required: false)
    foreach impl, dep_name : nix_main_dep_names
    d = dependency(dep_name, required: false)
    if d.found() and nix_main_dep.found()
    error('Both cppnix and lix are installed, choose one with -Dnix_impl=')
    endif
    nix_main_dep = d
    nix_impl = impl
    endforeach
    if not d.found()
    error('No Nix implementation found')
    endif
    endif
    nix_store_dep_names = {
    'cppnix': 'nix-store',
    'lix': 'lix-store',
    }
    nix_store_dep = dependency(nix_store_dep_names.get(nix_impl))
  • edit in meson.build at line 46
    [2.1482]
    [2.1482]
    nix_fetchers_dep_names = {
    'cppnix': 'nix-fetchers',
    'lix': 'lix-fetchers',
    }
    nix_fetchers_dep = dependency(nix_fetchers_dep_names.get(nix_impl))