feat(3p/nix): Add glog dependency
This commit is contained in:
parent
ffdeb3bbf1
commit
0335b91b93
6 changed files with 87 additions and 73 deletions
1
third_party/default.nix
vendored
1
third_party/default.nix
vendored
|
@ -54,6 +54,7 @@ let
|
||||||
freetype
|
freetype
|
||||||
gettext
|
gettext
|
||||||
glibc
|
glibc
|
||||||
|
glog
|
||||||
gnutar
|
gnutar
|
||||||
go
|
go
|
||||||
google-cloud-sdk
|
google-cloud-sdk
|
||||||
|
|
1
third_party/nix/default.nix
vendored
1
third_party/nix/default.nix
vendored
|
@ -36,6 +36,7 @@ in stdenv.mkDerivation {
|
||||||
curl
|
curl
|
||||||
editline
|
editline
|
||||||
flex
|
flex
|
||||||
|
glog
|
||||||
largeBoehm
|
largeBoehm
|
||||||
libseccomp
|
libseccomp
|
||||||
libsodium
|
libsodium
|
||||||
|
|
11
third_party/nix/meson.build
vendored
11
third_party/nix/meson.build
vendored
|
@ -419,6 +419,11 @@ libbz2_dep = declare_dependency(
|
||||||
dependencies : cpp.find_library('bz2'),
|
dependencies : cpp.find_library('bz2'),
|
||||||
link_args : get_option('bz2_link_args'))
|
link_args : get_option('bz2_link_args'))
|
||||||
|
|
||||||
|
# Look for glog, a required dependency.
|
||||||
|
#--------------------------------------
|
||||||
|
glog_dep = declare_dependency(
|
||||||
|
dependencies : cpp.find_library('glog'),
|
||||||
|
link_args : get_option('glog_link_args'))
|
||||||
|
|
||||||
# Look for editline, a required dependency.
|
# Look for editline, a required dependency.
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
|
@ -441,8 +446,6 @@ if not (
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Optional dependancies
|
# Optional dependancies
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
|
@ -485,8 +488,6 @@ if (get_option('with_s3'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# OS Specific checks
|
# OS Specific checks
|
||||||
#============================================================================
|
#============================================================================
|
||||||
# Look for libsecppomp, required for Linux sandboxing.
|
# Look for libsecppomp, required for Linux sandboxing.
|
||||||
|
@ -512,8 +513,6 @@ if (sys_name.contains('sunos'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# build
|
# build
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
|
|
7
third_party/nix/meson_options.txt
vendored
7
third_party/nix/meson_options.txt
vendored
|
@ -140,6 +140,13 @@ option(
|
||||||
'-lgc'],
|
'-lgc'],
|
||||||
description : 'link args for boehm garbage collector')
|
description : 'link args for boehm garbage collector')
|
||||||
|
|
||||||
|
option(
|
||||||
|
'glog_link_args',
|
||||||
|
type : 'array',
|
||||||
|
value : [
|
||||||
|
'-L/usr/local/lib',
|
||||||
|
'-lglog'],
|
||||||
|
description : 'link args for glog')
|
||||||
|
|
||||||
|
|
||||||
# optional dependancies
|
# optional dependancies
|
||||||
|
|
6
third_party/nix/src/nix/main.cc
vendored
6
third_party/nix/src/nix/main.cc
vendored
|
@ -10,6 +10,7 @@
|
||||||
#include "eval.hh"
|
#include "eval.hh"
|
||||||
#include "finally.hh"
|
#include "finally.hh"
|
||||||
#include "globals.hh"
|
#include "globals.hh"
|
||||||
|
#include "glog/logging.h"
|
||||||
#include "legacy.hh"
|
#include "legacy.hh"
|
||||||
#include "progress-bar.hh"
|
#include "progress-bar.hh"
|
||||||
#include "shared.hh"
|
#include "shared.hh"
|
||||||
|
@ -166,7 +167,10 @@ void mainWrapped(int argc, char** argv) {
|
||||||
|
|
||||||
} // namespace nix
|
} // namespace nix
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
|
FLAGS_logtostderr = 1;
|
||||||
|
google::InitGoogleLogging(argv[0]);
|
||||||
|
|
||||||
return nix::handleExceptions(argv[0],
|
return nix::handleExceptions(argv[0],
|
||||||
[&]() { nix::mainWrapped(argc, argv); });
|
[&]() { nix::mainWrapped(argc, argv); });
|
||||||
}
|
}
|
||||||
|
|
12
third_party/nix/src/nix/meson.build
vendored
12
third_party/nix/src/nix/meson.build
vendored
|
@ -53,18 +53,20 @@ nix_headers = files (
|
||||||
join_paths(meson.source_root(), 'src/nix-store/graphml.hh'))
|
join_paths(meson.source_root(), 'src/nix-store/graphml.hh'))
|
||||||
|
|
||||||
nix_dep_list = [
|
nix_dep_list = [
|
||||||
gc_dep,
|
|
||||||
pthread_dep,
|
|
||||||
libdl_dep,
|
|
||||||
boost_dep,
|
boost_dep,
|
||||||
editline_dep,
|
editline_dep,
|
||||||
libsodium_dep]
|
gc_dep,
|
||||||
|
glog_dep,
|
||||||
|
libdl_dep,
|
||||||
|
libsodium_dep,
|
||||||
|
pthread_dep,
|
||||||
|
]
|
||||||
|
|
||||||
nix_link_list = [
|
nix_link_list = [
|
||||||
libutil_lib,
|
libutil_lib,
|
||||||
libstore_lib,
|
libstore_lib,
|
||||||
libmain_lib,
|
libmain_lib,
|
||||||
libexpr_lib
|
libexpr_lib,
|
||||||
]
|
]
|
||||||
|
|
||||||
nix_bin = executable(
|
nix_bin = executable(
|
||||||
|
|
Loading…
Reference in a new issue