It can be derived from dy
It can be derived from dynamical consideration by using the fact that the diffusion constant is equal  3  to the mobility times the gas constant times the temperature, in which case it also bears Planck's name.  It can be more easily derived from thermodynamic considerations by setting the Gibbs free energy to num-  ber density times the Faraday constant times the electromotive force. When a system governed by it is in  equilibrium, it must satisfy the Donnan relation, and its logarithmic term involves the ratio of the activities of the reduced species to the oxidized species. Relating the actual reversible potential of an electrode to  the standard reversible potential of the electrode couple, FTP, identify this electrochemical equation, whose namesake received the Nobel Prize in chemistry for his formulation of the Third Law of Thermodynamics.
It can be derived from dynamical consideration by using the fact that the diffusion constant is equal  3  to the mobility times the gas constant times the temperature, in which case it also bears Planck's name.  
Nernst equation