Some improvements discussed [here](https://github.com/NixOS/nixpkgs/pull/208157) after the first merge.