anchor.diff:      description = "Randomized property-based testing plugin for Coq; a clone of Haskell QuickCheck";
       maintainers = with maintainers; [ jwiegley ];
     };
  -}
  +}).overrideAttrs (o:
  +  let after_1_6 = lib.versions.isGe "1.6" o.version || o.version == "dev";
  +  in {
  +    nativeBuildInputs = o.nativeBuildInputs
  +    ++ lib.optional after_1_6 coq.ocamlPackages.cppo;
  +    propagatedBuildInputs = o.propagatedBuildInputs
  +    ++ lib.optionals after_1_6 (with coq.ocamlPackages; [ findlib zarith ]);
  +})
  
positive.code: { lib, mkCoqDerivation, coq, ssreflect, coq-ext-lib, simple-io, version ? null }:
  
  let recent = lib.versions.isGe "8.7" coq.coq-version; in
  mkCoqDerivation {
    pname = "QuickChick";
    owner = "QuickChick";
    inherit version;
    defaultVersion = with lib; with versions; lib.switch [ coq.coq-version ssreflect.version ] [
        { cases = [ "8.13" pred.true  ]; out = "1.5.0"; }
        { cases = [ "8.12" pred.true  ]; out = "1.4.0"; }
        { cases = [ "8.11" pred.true  ]; out = "1.3.2"; }
  
negative.code:       { cases = [ "8.6"  pred.true  ];  out = "20171102"; }
        { cases = [ "8.5"  pred.true  ];  out = "20170512"; }
      ] null;
    release."1.6.2".sha256    = "0g5q9zw3xd4zndihq96nxkq4w3dh05418wzlwdk1nnn3b6vbx6z0";
    release."1.5.0".sha256    = "1lq8x86vd3vqqh2yq6hvyagpnhfq5wmk5pg2z0xq7b7dcw7hyfkw";
    release."1.4.0".sha256    = "068p48pm5yxjc3yv8qwzp25bp9kddvxj81l31mjkyx3sdrsw3kyc";
    release."1.3.2".sha256    = "0lciwaqv288dh2f13xk2x0lrn6zyrkqy6g4yy927wwzag2gklfrs";
  