From f8a7e5cf2b8a21d19b079a100c94771b72b7bdee Mon Sep 17 00:00:00 2001 From: SnO2WMaN Date: Tue, 7 Feb 2023 06:44:21 +0900 Subject: [PATCH] yamlfmt: init at 0.7.1 --- pkgs/development/tools/yamlfmt/default.nix | 24 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/tools/yamlfmt/default.nix diff --git a/pkgs/development/tools/yamlfmt/default.nix b/pkgs/development/tools/yamlfmt/default.nix new file mode 100644 index 000000000000..0d05ef2577d6 --- /dev/null +++ b/pkgs/development/tools/yamlfmt/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "yamlfmt"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "google"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-oTdBFWISOfaz4ZDbJmyxtaKrjo9DVNJ5N7Qxnu7SwZA="; + }; + + vendorSha256 = "sha256-QRY6mYtrMvjUqXJOOvHL0b0OQ28320UwV8HL4fXpcNQ="; + + doCheck = false; + + meta = with lib; { + description = "An extensible command line tool or library to format yaml files."; + homepage = "https://github.com/google/yamlfmt"; + license = licenses.asl20; + maintainers = with maintainers; [ sno2wman ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f873d604445a..b6336b58ed1f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13609,6 +13609,8 @@ with pkgs; yamlfix = with python3Packages; toPythonApplication yamlfix; + yamlfmt = callPackage ../development/tools/yamlfmt {}; + yamllint = with python3Packages; toPythonApplication yamllint; yamlpath = callPackage ../development/tools/yamlpath { };