There have been a couple of patches floating around for about the last
18 months. While they originated with FreeBSD, but they've been
adopted by Gentoo and Debian as well---and the most straightforward
way to get access to them was from the Debian repository.
This functionality was initially introduced in
3644f9124aaf35f2ad7b17cd05df19226d4e4d1c to fix
https://github.com/NixOS/nixos/pull/52, but was broken in the update from 0.9.5
to 0.10.3. The original patch does not cleanly apply due to reformatting and
parameter changes upstream, but the adaptations of the patch to the new version
are not too severe.