feat(3p/nix): Wrangle Meson/Nix/CMake into (temporary) submission

Meson is unable to use CMake in Nix to determine the internal
structure of the Abseil libraries.

This commit adds an explicit list of most of the Abseil targets that
are relevant (so far) and bundles them into a list that is linked
together.
This commit is contained in:
Vincent Ambo 2020-05-21 04:50:49 +01:00
parent 416c74009d
commit 00017ace04
2 changed files with 45 additions and 11 deletions

View file

@ -36,6 +36,8 @@ in stdenv.mkDerivation {
# TODO(tazjin): Some of these might only be required for native inputs # TODO(tazjin): Some of these might only be required for native inputs
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# TODO(tazjin): Figure out why meson can't make the Abseil headers visible
abseil_cpp
aws-s3-cpp aws-s3-cpp
boost boost
brotli brotli

View file

@ -345,13 +345,50 @@ config_h.set('CAN_LINK_SYMLINK', can_link_symlink,
description : 'Whether link() works on symlinks') description : 'Whether link() works on symlinks')
# Import the Abseil cmake project from the (symlinked) depot sources. # Import the Abseil cmake project from the (symlinked) depot sources.
# This will need to change if //third_party/nix is every split out as
# a subtree.
absl = cmake.subproject('abseil_cpp') absl = cmake.subproject('abseil_cpp')
absl_base = absl.dependency('base')
absl_raw_logging = absl.dependency('raw_logging_internal') # Bundle all relevant Abseil libraries. Meson is not able to resolve
absl_int128 = absl.dependency('int128') # the internal dependencies of Abseil, and reconstructing them is more
absl_strings = absl.dependency('strings') # work than I am willing to invest at the moment.
absl_deps = [
absl.dependency('algorithm_container'),
absl.dependency('base'),
absl.dependency('bits'),
absl.dependency('city'),
absl.dependency('config'),
absl.dependency('container_common'),
absl.dependency('container_memory'),
absl.dependency('core_headers'),
absl.dependency('debugging_internal'),
absl.dependency('demangle_internal'),
absl.dependency('dynamic_annotations'),
absl.dependency('endian'),
absl.dependency('fixed_array'),
absl.dependency('graphcycles_internal'),
absl.dependency('hash'),
absl.dependency('hash_function_defaults'),
absl.dependency('hashtablez_sampler'),
absl.dependency('int128'),
absl.dependency('malloc_internal'),
absl.dependency('memory'),
absl.dependency('meta'),
absl.dependency('node_hash_policy'),
absl.dependency('node_hash_set'),
absl.dependency('optional'),
absl.dependency('raw_hash_set'),
absl.dependency('raw_logging_internal'),
absl.dependency('spinlock_wait'),
absl.dependency('stacktrace'),
absl.dependency('strings'),
absl.dependency('symbolize'),
absl.dependency('synchronization'),
absl.dependency('throw_delegate'),
absl.dependency('time'),
absl.dependency('time_zone'),
absl.dependency('type_traits'),
absl.dependency('utility'),
absl.dependency('variant'),
]
# Look for boost, a required dependency. # Look for boost, a required dependency.
#-------------------------------------------------- #--------------------------------------------------
@ -450,11 +487,6 @@ if not (
'it is too old? >= 1.14 is required.') 'it is too old? >= 1.14 is required.')
endif endif
# Optional dependancies
#============================================================================
# Look for libsodium, an optional dependency. # Look for libsodium, an optional dependency.
#-------------------------------------------------- #--------------------------------------------------
libsodium_lib = cpp.find_library('sodium', required: get_option('with_libsodium')) libsodium_lib = cpp.find_library('sodium', required: get_option('with_libsodium'))