10 rustPlatform.buildRustPackage rec {
11 pname = "formatjson5";
14 src = fetchFromGitHub {
17 # Not tagged, see Cargo.toml.
18 rev = "056829990bab4ddc78c65a0b45215708c91b8628";
19 hash = "sha256-Lredw/Fez+2U2++ShZcKTFCv8Qpai9YUvqvpGjG5W0o=";
22 cargoHash = "sha256-zPgaZPDyNVPmBXz6QwOYnmh/sbJ8aPST8znLMfIWejk=";
24 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
26 cargoBuildFlags = [ "--example formatjson5" ];
30 cargoTarget = rustPlatform.cargoInstallHook.targetSubdirectory;
33 install -D target/${cargoTarget}/release/examples/formatjson5 $out/bin/formatjson5
36 passthru.updateScript = nix-update-script { };
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 ];