libutil_sources = files( 'archive.cc', 'args.cc', 'canon-path.cc', 'cgroup.cc', 'compression.cc', 'compute-levels.cc', 'config.cc', 'english.cc', 'error.cc', 'escape-char.cc', 'escape-string.cc', 'exit.cc', 'experimental-features.cc', 'filesystem.cc', 'git.cc', 'hash.cc', 'hilite.cc', 'json-utils.cc', 'logging.cc', 'namespaces.cc', 'position.cc', 'print-elided.cc', 'references.cc', 'regex.cc', 'serialise.cc', 'shlex.cc', 'signals.cc', 'source-path.cc', 'suggestions.cc', 'tarfile.cc', 'thread-pool.cc', 'url.cc', 'util.cc', 'xml-writer.cc', ) libutil_headers = files( 'abstract-setting-to-json.hh', 'ansicolor.hh', 'archive.hh', 'args/root.hh', 'args.hh', 'box_ptr.hh', 'callback.hh', 'canon-path.hh', 'cgroup.hh', 'chunked-vector.hh', 'closure.hh', 'comparator.hh', 'compression.hh', 'compute-levels.hh', 'config-impl.hh', 'config.hh', 'english.hh', 'error.hh', 'escape-char.hh', 'escape-string.hh', 'exit.hh', 'experimental-features.hh', 'experimental-features-json.hh', 'finally.hh', 'fmt.hh', 'git.hh', 'hash.hh', 'hilite.hh', 'input-accessor.hh', 'json-impls.hh', 'json-utils.hh', 'logging.hh', 'logging-json.hh', 'lru-cache.hh', 'monitor-fd.hh', 'namespaces.hh', 'pool.hh', 'position.hh', 'print-elided.hh', 'ref.hh', 'references.hh', 'regex-combinators.hh', 'regex.hh', 'repair-flag.hh', 'serialise.hh', 'shlex.hh', 'signals.hh', 'source-path.hh', 'split.hh', 'suggestions.hh', 'sync.hh', 'tarfile.hh', 'thread-pool.hh', 'topo-sort.hh', 'types.hh', 'url-parts.hh', 'url.hh', 'util.hh', 'variant-wrapper.hh', 'xml-writer.hh', ) libutil = library( 'nixutil', libutil_sources, dependencies : [ aws_sdk, aws_s3, boehm, boost, cpuid, seccomp, libarchive, brotli, openssl, nlohmann_json, ], implicit_include_directories : true, install : true, ) install_headers(libutil_headers, subdir : 'nix', preserve_path : true) # Used by libstore and libfetchers. liblixutil = declare_dependency( include_directories : include_directories('.'), link_with : libutil )