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.nix31
1 files changed, 31 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..e2734c6b1998
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, cmake, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "gbenchmark";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "benchmark";
+    rev = "v${version}";
+    sha256 = "16xlk8h4mfszl4rig22fgpj9kw312az22981ph6pmkf35xsvvv66";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    cp -r ${gtest.src} googletest
+    chmod -R u+w googletest
+  '';
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "A microbenchmark support library";
+    homepage = "https://github.com/google/benchmark";
+    license = licenses.asl20;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}