Commit ff236364 authored by Paul Meyer's avatar Paul Meyer
Browse files

formatjson5: add passthru.update-script

parent cb092b6e
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, darwin
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  stdenv,
  darwin,
  nix-update-script,
}:

rustPlatform.buildRustPackage rec {
@@ -19,13 +21,9 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-zPgaZPDyNVPmBXz6QwOYnmh/sbJ8aPST8znLMfIWejk=";

  buildInputs = lib.optionals stdenv.isDarwin [
    darwin.apple_sdk.frameworks.Security
  ];
  buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];

  cargoBuildFlags = [
    "--example formatjson5"
  ];
  cargoBuildFlags = [ "--example formatjson5" ];

  postInstall =
    let
@@ -35,6 +33,8 @@ rustPlatform.buildRustPackage rec {
      install -D target/${cargoTarget}/release/examples/formatjson5 $out/bin/formatjson5
    '';

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "JSON5 formatter";
    homepage = "https://github.com/google/json5format";