Json5 --validate

I’m reading Is there a format checker for JSON5 ?.

…and I want to run

json5 --validate my-file.json5

I added json5 to my python packages, but it doesn’t seem to give me that command.

nix-locate returns too many results for me to figure out which one gives me the command. They seem to be mostly hidden.

nix-locate 'bin/json5'|wc -l
178

That issue page talks about npm package having json5 command. We do not appear to have that packaged:

nix-build -A nodePackages.json5
error: attribute 'json5' in selection path 'nodePackages.json5' not found

Well, other than as a part of other packages – nix-locate bin/json5 returns ton of results that are like /nix/store/[…]/node_modules/.bin/json5 but no actual standalone package:

$ nix-locate bin/json5 | grep /bin
[Command exited with status 1]

The Python package contains a different program that lacks --validate flag:

$ nix-build -A python3.pkgs.json5
/nix/store/mbnq8hxgpnh1679h5wnqqsic8ym30wii-python3.10-json5-0.9.9
$ ls result/bin
pyjson5
$ result/bin/pyjson5 --help
usage: json5 [-h] [-V] [-c STR] [--as-json] [--indent INDENT] [--quote-keys] [--no-quote-keys] [--trailing-commas] [--no-trailing-commas] [FILE]
[…]