about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gbenchmark
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gbenchmark')
-rw-r--r--nixpkgs/pkgs/development/libraries/gbenchmark/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
new file mode 100644
index 000000000000..c1f485e18d9b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "gbenchmark";
+  version = "1.5.2";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "benchmark";
+    rev = "v${version}";
+    sha256 = "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    cp -r ${gtest.src} googletest
+    chmod -R u+w googletest
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A microbenchmark support library";
+    homepage = "https://github.com/google/benchmark";
+    license = licenses.asl20;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}