Possible to generate roughness from normal map?

Is there a way to generate a roughness map from a normal map in a Blender material similar to this Substance plugin?