bear: fix cross compilation, set strictDeps (#359880)

This commit is contained in:
Colin 2024-11-29 14:55:39 +00:00 committed by GitHub
commit db00b7e57f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,10 +31,14 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-pwdjytP+kmTwozRl1Gd0jUqRs3wfvcYPqiQvVwa6s9c=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
ninja
pkg-config
grpc
protobuf
];
buildInputs = [
@ -70,10 +74,10 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
# Build system and generated files concatenate install prefix and
# CMAKE_INSTALL_{BIN,LIB}DIR, which breaks if these are absolute paths.
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
(lib.cmakeBool "ENABLE_UNIT_TESTS" finalAttrs.doCheck)
(lib.cmakeBool "ENABLE_FUNC_TESTS" finalAttrs.doCheck)
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
(lib.cmakeBool "ENABLE_UNIT_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeBool "ENABLE_FUNC_TESTS" finalAttrs.finalPackage.doCheck)
];
checkTarget = lib.concatStringsSep " " [
@ -106,7 +110,7 @@ stdenv.mkDerivation (finalAttrs: {
# Functional tests use loopback networking.
__darwinAllowLocalNetworking = true;
meta = with lib; {
meta = {
description = "Tool that generates a compilation database for clang tooling";
mainProgram = "bear";
longDescription = ''
@ -115,8 +119,8 @@ stdenv.mkDerivation (finalAttrs: {
and run `bear make`. It's not perfect, but it gets a long way.
'';
homepage = "https://github.com/rizsotto/Bear";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ DieracDelta ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ DieracDelta ];
};
})