I don't know if there's a specific reason you have your own definition for composer or if nixpkgs just didn't have one until more recently, but if that's the only reason why it seems like a good idea to de-duplicate code.
Nixpkgs' composer is also at 1.6.5. I don't know if a version mismatch could occur but I could add override on it to keep it there for composer2nix.
I was thinking it would be nice to have composer2nix in nixpkgs. Is it too unstable at this point to make efforts at merging a nix expression for it now?
I don't know if there's a specific reason you have your own definition for composer or if nixpkgs just didn't have one until more recently, but if that's the only reason why it seems like a good idea to de-duplicate code. Nixpkgs' composer is also at 1.6.5. I don't know if a version mismatch could occur but I could add override on it to keep it there for composer2nix.