Can you use the ```substituteInPlace``` function instead of sed? It's provided by Nix and works the same on all platforms.