We present a measurement of the CP-violating weak mixing phase phi(s) using the decay (B) over bar (0)(s) -> Ds+Ds- in a data sample corresponding to 3.0 fb(-1) of integrated luminosity collected with the LHCb detector in pp collisions at center-of-mass energies of 7 and 8 TeV. An analysis of the time evolution of the system, which does not use the constraint vertical bar lambda vertical bar = 1 to allow for the presence of CP violation in decay, yields phi(s) = 0.02 +/- 0.17(stat) +/- 0.02(syst) rad, vertical bar lambda vertical bar = 0.91(-0.15)(+0.18)(stat) +/- 0.02(syst). This result is consistent with the standard model expectation.