source: https://github.com/NixOS/nix/issues/2259