anchor.diff:      '';
     };
   
  -  mkScalaCheckForAllScala = scalacheck:
  -    mapAttrsToList (scalaVer: scala:
  -      mkScalaCheck scalaVer scala scalacheck
  -    ) scala;
  -
  -  test-interface = {
  -    "1.0" = mkTestInterface {
  -      version = "1.0";
  -      sha256 = "17klrl4ylpsy9d16fk6npb7lxfqr1w1m9slsxhph1wwmpcw0pxqm";
  +  scalaVersions = {
  +    "2.9.1-1" = {
  +      version = "2.9.1-1";
  +      sha256 = "0b5lhfy33ng6q4rjz11j89k694h5x12ms9qdnv0ym3jav10r6qab";
  +    };
  +    "2.9.2" = {
  +      version = "2.9.2";
  +      sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
  +    };
  +    "2.9.3" = {
  +      version = "2.9.3";
  +      sha256 = "1fg7qizxhgw6957plv99jh8p6z3rpi2w0cgxx1im154cywlv5aps";
  +    };
  +    "2.10.1" = {
  +      version = "2.10.1";
  +      sha256 = "0krzm6ln4ldy6wvk7mw93vnjsjf8pkylccnwz08hzj7wnvspgijk";
  +    };
  +    "2.10.2" = {
  +      version = "2.10.2";
  +      sha256 = "18v6jr42rif84q5cb82kynigqls2q5q3qnb61040m92496ygv4zn";
  +    };
  +    "2.10.3" = {
  +      version = "2.10.3";
  +      sha256 = "16ac935wydrxrvijv4ldnz4vl2xk8yb3yzb9bsi3nb9sic7fxl95";
  +    };
  +    "2.10" = scalaVersions."2.10.3";
  +    "2.11.0-M5" = {
  +      version = "2.11.0-M5";
  +      sha256 = "1zj89i0n3p4rrcj70hfi821qpc1qrzqjlivrb0iargvagrqq2ih2";
       };
     };
   
  -  scala = {
  -    "2.9.1-1" = mkScala {
  -      version = "2.9.1-1";
  -      sha256 = "0b5lhfy33ng6q4rjz11j89k694h5x12ms9qdnv0ym3jav10r6qab";
  +  scalacheckVersions = {
  +    "1.10.1" = {
  +      rev = "ecb39d126f919795738e3b0bb66dc088e31ccef3";
  +      sha256 = "1yjvh1r2fp46wdmsajmljryp03qw92albjh07vvgd15qw3v6vz3k";
  +      inherit scalaVersions;
       };
  -    "2.9.2" = mkScala {
  -      version = "2.9.2";
  -      sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
  +    "1.10.0" = {
  +      rev = "2338afc425a905fdc55b4fd67bd8bfc3358e3390";
  +      sha256 = "0a3kgdqpr421k624qhpan3krjdhii9fm4zna7fbbz3sk30gbcsnj";
  +      inherit scalaVersions;
       };
  -    "2.9.3" = mkScala {
  -      version = "2.9.3";
  -      sha256 = "1fg7qizxhgw6957plv99jh8p6z3rpi2w0cgxx1im154cywlv5aps";
  +    "1.9" = {
  +      rev = "ddfd03e49b05fba702539a4aff03e60ea35a57e0";
  +      sha256 = "1dbxp9w7pjw1zf50x3hz6kwzm8xp3hvdbswnxsrcswagvqmc5kkm";
  +      runTests = false;
  +      inherit scalaVersions;
       };
  -    "2.10.1" = mkScala {
  -      version = "2.10.1";
  -      sha256 = "0krzm6ln4ldy6wvk7mw93vnjsjf8pkylccnwz08hzj7wnvspgijk";
  -    };
  -    "2.10.2" = mkScala {
  -      version = "2.10.2";
  -      sha256 = "18v6jr42rif84q5cb82kynigqls2q5q3qnb61040m92496ygv4zn";
  -    };
  -    "2.10.3" = mkScala {
  -      version = "2.10.3";
  -      sha256 = "16ac935wydrxrvijv4ldnz4vl2xk8yb3yzb9bsi3nb9sic7fxl95";
  -    };
  -    "2.10" = scala."2.10.3";
  -    "2.11.0-M4" = mkScala {
  -      version = "2.11.0-M4";
  -      sha256 = "15wv35nizyi50dv7ig2dscv7yapa65mp32liqvmwwhyvzx1h9pnh";
  +    "1.8" = {
  +      rev = "f2175ed5ac20f37c1a7ec320b1c58de7a8e3c27f";
  +      sha256 = "0gkwnqw9wcv0p0dbc6w0i54zw9lb32qnl8qdsp3mn6ylkwj5zx0h";
  +      inherit scalaVersions;
       };
     };
   
  -  scalacheckVersions = [
  -    { version = "1.10.1";
  -      rev = "ecb39d126f919795738e3b0bb66dc088e31ccef3";
  -      sha256 = "1yjvh1r2fp46wdmsajmljryp03qw92albjh07vvgd15qw3v6vz3k";
  -    }
  -    { version = "1.10.0";
  -      rev = "2338afc425a905fdc55b4fd67bd8bfc3358e3390";
  -      sha256 = "0a3kgdqpr421k624qhpan3krjdhii9fm4zna7fbbz3sk30gbcsnj";
  -    }
  -    { version = "1.9";
  -      rev = "ddfd03e49b05fba702539a4aff03e60ea35a57e0";
  -      sha256 = "1dbxp9w7pjw1zf50x3hz6kwzm8xp3hvdbswnxsrcswagvqmc5kkm";
  -      runTests = false;
  -    }
  -    { version = "1.8";
  -      rev = "f2175ed5ac20f37c1a7ec320b1c58de7a8e3c27f";
  -      sha256 = "0gkwnqw9wcv0p0dbc6w0i54zw9lb32qnl8qdsp3mn6ylkwj5zx0h";
  -    }
  -  ];
  -
  -  scalacheck_all = concatMap mkScalaCheckForAllScala scalacheckVersions;
   }
  
positive.code: 
        mkdir api && scaladoc \
          -doc-title ScalaCheck \
          -doc-version "${scalacheck.version}" \
          -doc-footer "${docFooter scalacheck.version scalacheck.rev}" \
          -doc-source-url "${docSourceUrl scalacheck.version scalacheck.rev}" \
          -classpath "$testinterface" \
          -sourcepath src/main/scala \
          -d api \
  
negative.code:     '';
    };
  
    test-interface = {
      "1.0" = mkTestInterface {
        version = "1.0";
        sha256 = "17klrl4ylpsy9d16fk6npb7lxfqr1w1m9slsxhph1wwmpcw0pxqm";
      };
    };
  
  in rec {
  
    # Builds the given ScalaCheck with all Scala versions it supports
    mkScalaChecks = scVer: sc: mapAttrsToList (scalaVer: scala:
      mkScalaCheck scalaVer scala scVer sc
    ) sc.scalaVersions;
  
    # Builds the given ScalaCheck with the given Scala version
    mkScalaCheck = scalaVer: scala: scVer: sc: stdenv.mkDerivation rec {
      name = "scalacheck_${scalaVer}-${scVer}";
  
      outputs = [ "jar" "srcjar" "doc" "docjar" ];
  
      src = fetchgit {
        url = scalacheckRepoUrl;
        inherit (sc) rev sha256;
      };
  
      buildInputs = [ openjdk (mkScala scala) ];
  
      doCheck = if sc ? runTests then sc.runTests else true;
  
      buildPhase = ''
        export LANG="en_US.UTF-8"
  