about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gbenchmark/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/gbenchmark/default.nix21
1 files changed, 18 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
index fc356d6f0034..f53868a0926f 100644
--- a/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
+++ b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
@@ -1,14 +1,20 @@
-{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, prometheus-cpp
+}:
 
 stdenv.mkDerivation rec {
   pname = "gbenchmark";
-  version = "1.6.1";
+  version = "1.8.0";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "benchmark";
     rev = "v${version}";
-    sha256 = "sha256-yUiFxi80FWBmTZgqmqTMf9oqcBeg3o4I4vKd4djyRWY=";
+    sha256 = "sha256-pUW9YVaujs/y00/SiPqDgK4wvVsaM7QUp/65k0t7Yr0=";
   };
 
   nativeBuildInputs = [ cmake ];
@@ -16,10 +22,19 @@ stdenv.mkDerivation rec {
   postPatch = ''
     cp -r ${gtest.src} googletest
     chmod -R u+w googletest
+
+    # https://github.com/google/benchmark/issues/1396
+    substituteInPlace cmake/benchmark.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
   '';
 
   doCheck = true;
 
+  passthru.tests = {
+    inherit prometheus-cpp;
+  };
+
   meta = with lib; {
     description = "A microbenchmark support library";
     homepage = "https://github.com/google/benchmark";