Skip to content

Commit db00b7e

Browse files
authored
bear: fix cross compilation, set strictDeps (#359880)
2 parents cc9e038 + 9941229 commit db00b7e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

pkgs/by-name/be/bear/package.nix

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ stdenv.mkDerivation (finalAttrs: {
3131
hash = "sha256-pwdjytP+kmTwozRl1Gd0jUqRs3wfvcYPqiQvVwa6s9c=";
3232
};
3333

34+
strictDeps = true;
35+
3436
nativeBuildInputs = [
3537
cmake
3638
ninja
3739
pkg-config
40+
grpc
41+
protobuf
3842
];
3943

4044
buildInputs = [
@@ -70,10 +74,10 @@ stdenv.mkDerivation (finalAttrs: {
7074
cmakeFlags = [
7175
# Build system and generated files concatenate install prefix and
7276
# CMAKE_INSTALL_{BIN,LIB}DIR, which breaks if these are absolute paths.
73-
"-DCMAKE_INSTALL_BINDIR=bin"
74-
"-DCMAKE_INSTALL_LIBDIR=lib"
75-
(lib.cmakeBool "ENABLE_UNIT_TESTS" finalAttrs.doCheck)
76-
(lib.cmakeBool "ENABLE_FUNC_TESTS" finalAttrs.doCheck)
77+
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
78+
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
79+
(lib.cmakeBool "ENABLE_UNIT_TESTS" finalAttrs.finalPackage.doCheck)
80+
(lib.cmakeBool "ENABLE_FUNC_TESTS" finalAttrs.finalPackage.doCheck)
7781
];
7882

7983
checkTarget = lib.concatStringsSep " " [
@@ -106,7 +110,7 @@ stdenv.mkDerivation (finalAttrs: {
106110
# Functional tests use loopback networking.
107111
__darwinAllowLocalNetworking = true;
108112

109-
meta = with lib; {
113+
meta = {
110114
description = "Tool that generates a compilation database for clang tooling";
111115
mainProgram = "bear";
112116
longDescription = ''
@@ -115,8 +119,8 @@ stdenv.mkDerivation (finalAttrs: {
115119
and run `bear make`. It's not perfect, but it gets a long way.
116120
'';
117121
homepage = "https://github.com/rizsotto/Bear";
118-
license = licenses.gpl3Plus;
119-
platforms = platforms.unix;
120-
maintainers = with maintainers; [ DieracDelta ];
122+
license = lib.licenses.gpl3Plus;
123+
platforms = lib.platforms.unix;
124+
maintainers = with lib.maintainers; [ DieracDelta ];
121125
};
122126
})

0 commit comments

Comments
 (0)