about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-21T03·50+0100
committerVincent Ambo <tazjin@google.com>2020-05-21T03·50+0100
commit00017ace042d183400be78269e99e2952746cce1 (patch)
tree8f1c582edc2b3466fb998fc65c1a7e2736bf920b /third_party/nix
parent416c74009db176dfe2bdde2cb0b7bba3dde235a5 (diff)
feat(3p/nix): Wrangle Meson/Nix/CMake into (temporary) submission r/793
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.
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/default.nix2
-rw-r--r--third_party/nix/meson.build54
2 files changed, 45 insertions, 11 deletions
diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix
index 6a05135f63c1..d7a85bb6125a 100644
--- a/third_party/nix/default.nix
+++ b/third_party/nix/default.nix
@@ -36,6 +36,8 @@ in stdenv.mkDerivation {
 
  # TODO(tazjin): Some of these might only be required for native inputs
   buildInputs = with pkgs; [
+    # TODO(tazjin): Figure out why meson can't make the Abseil headers visible
+    abseil_cpp
     aws-s3-cpp
     boost
     brotli
diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build
index 9020f4f87e60..1b5e030bde82 100644
--- a/third_party/nix/meson.build
+++ b/third_party/nix/meson.build
@@ -345,13 +345,50 @@ config_h.set('CAN_LINK_SYMLINK', can_link_symlink,
 description : 'Whether link() works on symlinks')
 
 # 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_base = absl.dependency('base')
-absl_raw_logging = absl.dependency('raw_logging_internal')
-absl_int128 = absl.dependency('int128')
-absl_strings = absl.dependency('strings')
+
+# Bundle all relevant Abseil libraries. Meson is not able to resolve
+# the internal dependencies of Abseil, and reconstructing them is more
+# 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.
 #--------------------------------------------------
@@ -450,11 +487,6 @@ if not (
     'it is too old? >= 1.14 is required.')
 endif
 
-
-# Optional dependancies
-#============================================================================
-
-
 # Look for libsodium, an optional dependency.
 #--------------------------------------------------
 libsodium_lib = cpp.find_library('sodium', required: get_option('with_libsodium'))