From 30f287c28aa53f2ac7e17496959f656677cbab84 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 25 Jan 2026 19:36:58 -0800 Subject: [PATCH] protobuf-matchers: init at 0.1.1 Signed-off-by: Anders Kaseorg --- pkgs/by-name/pr/protobuf-matchers/package.nix | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/pr/protobuf-matchers/package.nix diff --git a/pkgs/by-name/pr/protobuf-matchers/package.nix b/pkgs/by-name/pr/protobuf-matchers/package.nix new file mode 100644 index 000000000000..c245607cee26 --- /dev/null +++ b/pkgs/by-name/pr/protobuf-matchers/package.nix @@ -0,0 +1,46 @@ +{ + cmake, + fetchFromGitHub, + gtest, + lib, + protobuf, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "protobuf-matchers"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "inazarenko"; + repo = "protobuf-matchers"; + tag = "v${finalAttrs.version}"; + hash = "sha256-aIEqmA4JwnGHY80Ehr9tgyxzhAk1nAdiVtPbsI0P0Aw="; + }; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail \ + 'target_include_directories(protobuf-matchers PUBLIC ''${CMAKE_CURRENT_SOURCE_DIR})' \ + 'target_include_directories(protobuf-matchers PUBLIC $ $)' + echo 'target_sources(protobuf-matchers PUBLIC FILE_SET HEADERS + FILES protobuf-matchers/protocol-buffer-matchers.h)' >> CMakeLists.txt + echo 'install(TARGETS protobuf-matchers + FILE_SET HEADERS DESTINATION include)' >> CMakeLists.txt + ''; + + nativeBuildInputs = [ + cmake + ]; + buildInputs = [ + gtest + protobuf + ]; + + meta = { + description = "Protocol buffer matchers for gMock/gTest"; + homepage = "https://github.com/inazarenko/protobuf-matchers"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ andersk ]; + }; +})