about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-19T02·47-0400
committerglittershark <grfn@gws.fyi>2020-07-19T16·26+0000
commit6ff0d7992f675ef4ff7afce7c8c82b4f0de35b00 (patch)
tree417c2d13b6dd987088dc6ce2541f2703c26faef0
parentf1080c022a5f93cc8dda25fd31f23665739687bb (diff)
feat(3p): Add rapidcheck r/1394
Pulled from the commit at current master, overridden to build with clang
and enable gtest and gmock integration.

Change-Id: I10008e8c591bd0c7cc26566b2a050ef2a55bb346
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1282
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
-rw-r--r--ci-builds.nix1
-rw-r--r--third_party/rapidcheck/default.nix21
2 files changed, 22 insertions, 0 deletions
diff --git a/ci-builds.nix b/ci-builds.nix
index d47913181860..2e4e40392014 100644
--- a/ci-builds.nix
+++ b/ci-builds.nix
@@ -64,6 +64,7 @@ in lib.fix (self: {
     grpc
     nix
     openldap
+    rapidcheck
   ];
 
   various = with depot; [
diff --git a/third_party/rapidcheck/default.nix b/third_party/rapidcheck/default.nix
new file mode 100644
index 000000000000..eba1d9ca4536
--- /dev/null
+++ b/third_party/rapidcheck/default.nix
@@ -0,0 +1,21 @@
+{ pkgs, ... }:
+
+(pkgs.callPackage "${pkgs.nixpkgsSrc}/pkgs/development/libraries/rapidcheck" {
+  stdenv = pkgs.llvmPackages.libcxxStdenv;
+}).overrideAttrs (attrs: rec {
+  # follows the versioning scheme of nixpkgs, since rapidcheck does not
+  # provide versioned releases
+  version = "unstable-2020-05-04";
+
+  src = pkgs.fetchFromGitHub {
+    owner = "emil-e";
+    repo = "rapidcheck";
+    rev = "7bc7d302191a4f3d0bf005692677126136e02f60";
+    sha256 = "0khawy2n007yk97ls2qqpna4ly09v6rb6hw72nm16kzk3zbyzh17";
+  };
+
+  cmakeFlags = [
+    "-DRC_ENABLE_GTEST=ON"
+    "-DRC_ENABLE_GMOCK=ON"
+  ];
+})