2024-07-01 15:47:52 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, yamlfmt }:
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "yamlfmt";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.13.0";
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-B1bRYG7ldewdyK8K2Yy5liQcEqv/3/67cQD8JKp8vQI=";
|
2023-02-09 11:40:11 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-UfULQw7wAEJjTFp6+ACF5Ki04eFKeUEgmbt1c8pUolA=";
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
"-X main.commit=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = yamlfmt;
|
|
|
|
};
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Extensible command line tool or library to format yaml files";
|
2023-02-09 11:40:11 +00:00
|
|
|
homepage = "https://github.com/google/yamlfmt";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ sno2wman ];
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "yamlfmt";
|
2023-02-09 11:40:11 +00:00
|
|
|
};
|
|
|
|
}
|