8 rustPlatform.buildRustPackage rec {
12 src = fetchFromGitHub {
15 # Not tagged, see Cargo.toml.
16 rev = "056829990bab4ddc78c65a0b45215708c91b8628";
17 hash = "sha256-Lredw/Fez+2U2++ShZcKTFCv8Qpai9YUvqvpGjG5W0o=";
20 cargoHash = "sha256-zPgaZPDyNVPmBXz6QwOYnmh/sbJ8aPST8znLMfIWejk=";
22 buildInputs = lib.optionals stdenv.isDarwin [
23 darwin.apple_sdk.frameworks.Security
27 "--example formatjson5"
32 cargoTarget = rustPlatform.cargoInstallHook.targetSubdirectory;
35 install -D target/${cargoTarget}/release/examples/formatjson5 $out/bin/formatjson5
39 description = "JSON5 formatter";
40 homepage = "https://github.com/google/json5format";
41 license = lib.licenses.bsd3;
42 mainProgram = "formatjson5";
43 maintainers = with lib.maintainers; [ katexochen ];