nixpkgs/pkgs/development/tools/json2hcl/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

26 lines
614 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "json2hcl";
version = "0.1.1";
src = fetchFromGitHub {
owner = "kvz";
repo = pname;
rev = "v${version}";
sha256 = "sha256-0ku8sON4fzWAirqY+dhYAks2LSyC7OH/LKI0kb+QhpM=";
};
vendorHash = "sha256-GxYuFak+5CJyHgC1/RsS0ub84bgmgL+bI4YKFTb+vIY=";
ldflags = [ "-s" "-w" ];
meta = with lib; {
description = "Convert JSON to HCL, and vice versa";
mainProgram = "json2hcl";
homepage = "https://github.com/kvz/json2hcl";
license = licenses.mit;
maintainers = with maintainers; [ matthewbauer ];
};
}