I'm currently writing a file encryption program, and I designed this scheme to derive a key from user input password:
layer1 = sha256(sha256(...sha256(password ,salt1), salt1), salt1)
I'm repeating the layer1 process about 10000 times or more and after that, I pass the layer1 to scrypt with a random salt:
layer2 = scrypt(base64(layer1), salt2)
and then I pass the layer2 to shake256 with another random salt:
key = shake256(base64(layer2), salt3)
I'm not a crypto designer or cryptoanalist, so I don't know whether this will cause weaknesses or not.