about summary refs log tree commit diff
path: root/third_party/nix/CMakeLists.txt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-08-14 r/1647 fix(tvix): use correct value of SANDBOX_SHELLKane York1-1/+2
Change-Id: I8e471c0f0a30337681042beeff633821eee67346 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1746 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-08-05 r/1597 refactor(tvix): Use SANDBOX_SHELL from environment in CMakeVincent Ambo1-1/+3
This makes the configuration work out-of-the-box using CMake in a Nix shell, rather than having to pass the additional variable to CMake on the command line. Change-Id: I04d3cc4f2e5ecf47bf2ee459d5e48588b84ae4dd Reviewed-on: https://cl.tvl.fyi/c/depot/+/1643 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi>
2020-08-04 r/1575 fix(3p/nix): Properly configure SANDBOX_SHELLGriffin Smith1-0/+9
point the SANDBOX_SHELL macro at the actual path to busybox on the build machine, or allow it to be configured at build-time with a cmake option. Change-Id: I044a1315ba9baa3bc9ceddf29f36d14f9f9ccd96 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1632 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-25 r/1469 chore(3p/nix): disable clang-tidy in cmakeKane York1-2/+3
Change-Id: I9ff1ae10afe5af066aaff377424522a19977dc3d Reviewed-on: https://cl.tvl.fyi/c/depot/+/1428 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-24 r/1460 chore(3p/nix): log whether or not clang-tidy is enabledKane York1-0/+1
CMake likes to remember that we overrode it with an empty string and not use the new env var. Change-Id: I16587f27750c9ebd4f65349bb59b37e0f8117f18 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1406 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-23 r/1435 feat(3p/nix): run clang-tidy during buildsKane York1-0/+13
We need to -isystem the libcxx header files in order for clang-tidy to ignore them, as the Nix clang toolchain isn't doing that automatically. Change-Id: I05b9e9bd522de4c0e2ad543214f6bf6ab66a306b Reviewed-on: https://cl.tvl.fyi/c/depot/+/1359 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-07-19 r/1395 test(3p/nix): Add property tests for attribute setGriffin Smith1-0/+1
Add a set of property tests for the attribute set (Bindings) class checking that the Merge operation satisfies the monoid laws. This will hopefully become useful to make sure we're not breaking the language semantics as we work towards optimizing or replacing the implementation, but also serves as a test bed for adding rapidcheck-based property tests to the codebase. Change-Id: I1b4b7b6503d08d80c1c5a8f9408fd4b787d00e8e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1283 Reviewed-by: isomer <isomer@tvl.fyi> Tested-by: BuildkiteCI
2020-07-18 r/1369 test(3p/nix): Set up scaffolding & fix up tests for value-to-{json|xml}Vincent Ambo1-0/+8
Configures the CMake build to load & run the GoogleTest tests. I (grfn) also updated this to get the tests running as part of the nix derivation, which required defining our own manual configurePhase and installCheckPhase, rather than depending on the one provided by stdenv. Not doing this would cause cmake to attempt to *run* the tests as part of the buildPhase, which wouldn't work because the dynamic libraries hadn't been put into a place where the test executables knew where to find them. We're not sure *why* this fixes it, and for some reason fixing this also breaks the automatic behavior of nixpkgs of passing -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES to make, but that's eaasy enough to fix manually in a preBuild Paired-With: Griffin Smith <grfn@gws.fyi> Change-Id: I79d61854a3ff47301cdce8a40c76820a97bdf901 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1240 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-05 r/1216 feat(3p/nix): Add protobuf & gRPC dependencies and generate sourcesVincent Ambo1-1/+3
Adds dependencies on the gRPC & protobuf libraries, and implements Nix code to generate the C++ sources from the included proto definitions. This is theoretically supported via CMake, but practically doesn't work and I don't care to debug why. Doing it like this lets us instead add a CMake library target for our proto definitions based on the sources generated by Nix. Pros: * no need to deal with the gRPC CMake mess * it works! Cons: * iteration requires nix-shell restart Change-Id: Ie1fe9807fc96c49cb8f7161ba59d093456062b15 Reviewed-on: https://cl.tvl.fyi/c/depot/+/927 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-05 r/1212 fix(3p/nix): Link to glog built by NixVincent Ambo1-7/+2
Same as cl/921, it seems that the trick to making this work is indeed overriding the C++ standard used in the dependency. Change-Id: I3c5984d71014d774c161ecc283844f504fd44719 Reviewed-on: https://cl.tvl.fyi/c/depot/+/922 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-07-05 r/1211 fix(3p/nix): Link to Abseil built by NixVincent Ambo1-18/+1
This didn't work previously ... but now it does. I think setting the standard explicitly is what did the trick, but it's slightly unclear to me why. Either way this means that Abseil is no longer constantly getting recompiled when building Nix, which is nice. Change-Id: I377f7b68bf1ef9045df6a2eee8fdd0c92f243547 Reviewed-on: https://cl.tvl.fyi/c/depot/+/921 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-21 r/1055 fix(3p/nix): propagate dependencies which are needed by people linking in nixLuke Granger-Brown1-0/+8
This includes absl, which we install into the output, and boost and the boehm GC, which are moved to propagated deps. Change-Id: I8f9f9795ff92e26b2320359064241d7fd59c2d33 Reviewed-on: https://cl.tvl.fyi/c/depot/+/549 Reviewed-by: tazjin <mail@tazj.in>
2020-06-21 r/1054 fix(3p/nix): install nix_config.h and config.nixLuke Granger-Brown1-0/+9
This also installs the rest of corepkgs as a side-effect. Change-Id: I67a42d45793d5e8fdad51c1f306eebf63e9c2868 Reviewed-on: https://cl.tvl.fyi/c/depot/+/548 Reviewed-by: tazjin <mail@tazj.in>
2020-06-21 r/1052 feat(3p/nix): install pkgconfig files for libexpr, libmain and libstoreLuke Granger-Brown1-0/+1
Also fixes the pkgconfig files to use the corresponding CMake variables. Change-Id: I8095b8aff39ad91e592f3edc95555c9f1f1f153d Reviewed-on: https://cl.tvl.fyi/c/depot/+/545 Reviewed-by: tazjin <mail@tazj.in>
2020-06-21 r/1051 chore(3p/nix): use GNUInstallDirs to determine output directory namesLuke Granger-Brown1-0/+3
This ensures that we install both glog's .a and all the .so files we generate into a single consistent output lib path (which is, err, lib64, but whatever). Change-Id: Ib6ac6eacf5f56e4b719cfb586db731efc122c31b Reviewed-on: https://cl.tvl.fyi/c/depot/+/544 Reviewed-by: tazjin <mail@tazj.in>
2020-05-29 r/871 feat(3p/nix): Configure CMake to generate compile commandsVincent Ambo1-0/+4
2020-05-29 r/870 fix(3p/nix): Build glog as included CMake projectVincent Ambo1-1/+6
2020-05-28 r/868 refactor(3p/nix): Introduce CMake as the build system for NixVincent Ambo1-0/+31
Completes the switch from Meson to CMake for the core build system in Nix. Meson was added originally because someone else had already done the work for integrating it in Nix and it was an upgrade from the previous setup. However over time it became clear that Meson is not quite mature enough for projects like Nix that have occasionally peculiar configuration constraints. Some issues encountered with Meson (some of these are due to the Meson setup in Nix): * Difficulty with generating correct compile_commands.json for external tools like clangd * Difficulty linking to libc++ when using clang * Ugly shell invocations for certain parts of the build system (I want these to be gone!!!) This CMake setup mimics the Meson configuration, but there are some differences (some temporary): * headers are now included separately for each library (see a previous commit that changes includes appropriately) * autoheaders-style configuration is currently hardcoded. Before blindly copying this I want to evaluate how much of it actually exists for portability concerns that I don't have (such as support for OS X). * Nix is built with libc++ by default. * [libstore] SQL schema is now inlined via a generated header, not an included string literal Abseil is still built as part of this build, rather than an external dependency, because it chokes on differently configured compiler invocations. Note that because of the move to libc++ an unwanted behaviour is introduced: glog log messages no longer have a body. I have yet to debug what is going on there.