An equivalent was originally filed against the perl version: https://github.com/NixOS/nix/pull/933
This was a dumb line-for-line rewrite, because nix build/nix run/etc. will replace it.