CTAN has a new package: flagderiv