-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
36 lines (29 loc) · 903 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "sog";
meta = {
description = "Structured logging library.";
homepage = https://github.com/kevincox/sog;
};
outputs = [ "dev" "lib" "out" ];
src = builtins.filterSource (name: type:
(lib.hasPrefix (toString ./BUILD) name) ||
(lib.hasPrefix (toString ./Makefile) name) ||
(lib.hasPrefix (toString ./sog) name) ||
(lib.hasPrefix (toString ./test) name) ||
(lib.hasPrefix (toString ./tools) name) ||
(lib.hasPrefix (toString ./WORKSPACE) name)) ./.;
buildInputs = with pkgs; [ bazel ];
CPLUS_INCLUDE_PATH = lib.concatStringsSep ":" [
"${pkgs.boost.dev}/include/"
"${pkgs.gtest}/include/"
];
doCheck = true;
preConfigure = ''
export HOME=$TMPDIR # Trick bazel to use a better cache.
makeFlagsArray=(
BAZEL_FLAGS="--output_base=$TMPDIR/bazel-out"
BAZEL_BUILD_FLAGS="--copt=-Wno-error"
)
'';
}