Which one is derived from other one?
The meter is defined in terms of the speed of light. So in that sense the meter is derived from the speed of light. I would use the word “defined” rather than “derived” since it is not a logical proof but rather an authoritative statement of the meaning of the meter.
However, the order of definition is not particularly important. Currently the s, m, kg, A, K, cd, and mol are defined in terms of $c$, $h$, $N_A$, $e$, $k_B$, $K_{cd}$, and $\Delta \nu_{Cs}$. But it could easily have been done the other way around. Either way would lead to the same set of equations and the same size of all the units.
The meter is the length of the path travelled by light in vacuum during a time interval of 1/299792458 of a second.
Note, this is no longer the definition of the meter. The meter is now defined as “The metre, symbol m, is the SI unit of length. It is defined by taking the fixed numerical value of the speed of light in vacuum $c$ to be 299792458 when expressed in the unit m⋅s−1, where the second is defined in terms of the caesium frequency ΔνCs.”