Flow in porous media I: A theoretical derivation of Darcy's law