fix(3p/nix): Build glog as included CMake project
This commit is contained in:
parent
6302a89c6d
commit
e494a347b5
3 changed files with 9 additions and 5 deletions
7
third_party/nix/CMakeLists.txt
vendored
7
third_party/nix/CMakeLists.txt
vendored
|
@ -11,7 +11,6 @@ find_package(Boost COMPONENTS context) # probably coroutine + ::headers, lets fi
|
||||||
find_package(CURL)
|
find_package(CURL)
|
||||||
find_package(SQLite3)
|
find_package(SQLite3)
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
find_package(glog)
|
|
||||||
find_package(LibLZMA)
|
find_package(LibLZMA)
|
||||||
|
|
||||||
# Abseil really doesn't like being precompiled. It is included here as
|
# Abseil really doesn't like being precompiled. It is included here as
|
||||||
|
@ -24,6 +23,12 @@ find_package(LibLZMA)
|
||||||
# link to the Abseil sources in the Nix store.
|
# link to the Abseil sources in the Nix store.
|
||||||
add_subdirectory(abseil_cpp)
|
add_subdirectory(abseil_cpp)
|
||||||
|
|
||||||
|
# Linking precompiled glog binaries (linked against libstdc++) leads
|
||||||
|
# to working binaries that do not output log messages. It seems that
|
||||||
|
# in order to use glog with LLVM & libc++, one needs to make glog a
|
||||||
|
# part of the local project build.
|
||||||
|
add_subdirectory(glog)
|
||||||
|
|
||||||
# generate a configuration file (autoheader-style) to configure
|
# generate a configuration file (autoheader-style) to configure
|
||||||
# certain symbols that Nix depends on.
|
# certain symbols that Nix depends on.
|
||||||
configure_file(config.h.in nix_config.h @ONLY)
|
configure_file(config.h.in nix_config.h @ONLY)
|
||||||
|
|
6
third_party/nix/default.nix
vendored
6
third_party/nix/default.nix
vendored
|
@ -19,7 +19,8 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
|
||||||
|
|
||||||
# Abseil's sources need to be symlinked into Nix' sources.
|
# Abseil's sources need to be symlinked into Nix' sources.
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
ln -fs ${pkgs.abseil_cpp.src} nix/abseil_cpp
|
ln -fs ${pkgs.abseil_cpp.drvAttrs.src} nix/abseil_cpp
|
||||||
|
ln -fs ${pkgs.glog.drvAttrs.src} nix/glog
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
|
@ -34,8 +35,6 @@ in pkgs.llvmPackages.libcxxStdenv.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
|
||||||
|
@ -43,7 +42,6 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
|
||||||
curl
|
curl
|
||||||
editline
|
editline
|
||||||
flex
|
flex
|
||||||
glog
|
|
||||||
largeBoehm
|
largeBoehm
|
||||||
libseccomp
|
libseccomp
|
||||||
libsodium
|
libsodium
|
||||||
|
|
1
third_party/nix/glog
vendored
Symbolic link
1
third_party/nix/glog
vendored
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../glog/
|
Loading…
Reference in a new issue