chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / fo / formatjson5 / package.nix
blob112f94aa8358e46a2e0c088676ac5345c8a8513c
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   stdenv,
6   darwin,
7   nix-update-script,
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "formatjson5";
12   version = "0.2.6";
14   src = fetchFromGitHub {
15     owner = "google";
16     repo = "json5format";
17     # Not tagged, see Cargo.toml.
18     rev = "056829990bab4ddc78c65a0b45215708c91b8628";
19     hash = "sha256-Lredw/Fez+2U2++ShZcKTFCv8Qpai9YUvqvpGjG5W0o=";
20   };
22   cargoHash = "sha256-zPgaZPDyNVPmBXz6QwOYnmh/sbJ8aPST8znLMfIWejk=";
24   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
26   cargoBuildFlags = [ "--example formatjson5" ];
28   postInstall =
29     let
30       cargoTarget = rustPlatform.cargoInstallHook.targetSubdirectory;
31     in
32     ''
33       install -D target/${cargoTarget}/release/examples/formatjson5 $out/bin/formatjson5
34     '';
36   passthru.updateScript = nix-update-script { };
38   meta = {
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 ];
44   };