# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module

EGO_SUM=(
	"github.com/Masterminds/semver/v3 v3.2.1"
	"github.com/Masterminds/semver/v3 v3.2.1/go.mod"
	"github.com/antonmedv/clipboard v1.0.1"
	"github.com/antonmedv/clipboard v1.0.1/go.mod"
	"github.com/atotto/clipboard v0.1.4"
	"github.com/atotto/clipboard v0.1.4/go.mod"
	"github.com/aymanbagabas/go-osc52/v2 v2.0.1"
	"github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod"
	"github.com/aymanbagabas/go-udiff v0.2.0"
	"github.com/aymanbagabas/go-udiff v0.2.0/go.mod"
	"github.com/charmbracelet/bubbles v0.21.0"
	"github.com/charmbracelet/bubbles v0.21.0/go.mod"
	"github.com/charmbracelet/bubbletea v1.3.5"
	"github.com/charmbracelet/bubbletea v1.3.5/go.mod"
	"github.com/charmbracelet/colorprofile v0.3.1"
	"github.com/charmbracelet/colorprofile v0.3.1/go.mod"
	"github.com/charmbracelet/lipgloss v1.1.0"
	"github.com/charmbracelet/lipgloss v1.1.0/go.mod"
	"github.com/charmbracelet/x/ansi v0.9.2"
	"github.com/charmbracelet/x/ansi v0.9.2/go.mod"
	"github.com/charmbracelet/x/cellbuf v0.0.13"
	"github.com/charmbracelet/x/cellbuf v0.0.13/go.mod"
	"github.com/charmbracelet/x/exp/teatest v0.0.0-20231025135604-4a717d4fb812"
	"github.com/charmbracelet/x/exp/teatest v0.0.0-20231025135604-4a717d4fb812/go.mod"
	"github.com/charmbracelet/x/term v0.2.1"
	"github.com/charmbracelet/x/term v0.2.1/go.mod"
	"github.com/davecgh/go-spew v1.1.1"
	"github.com/davecgh/go-spew v1.1.1/go.mod"
	"github.com/dlclark/regexp2 v1.11.5"
	"github.com/dlclark/regexp2 v1.11.5/go.mod"
	"github.com/dop251/goja v0.0.0-20250309171923-bcd7cc6bf64c"
	"github.com/dop251/goja v0.0.0-20250309171923-bcd7cc6bf64c/go.mod"
	"github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f"
	"github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod"
	"github.com/go-sourcemap/sourcemap v2.1.4+incompatible"
	"github.com/go-sourcemap/sourcemap v2.1.4+incompatible/go.mod"
	"github.com/goccy/go-yaml v1.17.1"
	"github.com/goccy/go-yaml v1.17.1/go.mod"
	"github.com/google/pprof v0.0.0-20250423184734-337e5dd93bb4"
	"github.com/google/pprof v0.0.0-20250423184734-337e5dd93bb4/go.mod"
	"github.com/kylelemons/godebug v1.1.0"
	"github.com/kylelemons/godebug v1.1.0/go.mod"
	"github.com/lucasb-eyer/go-colorful v1.2.0"
	"github.com/lucasb-eyer/go-colorful v1.2.0/go.mod"
	"github.com/mattn/go-isatty v0.0.20"
	"github.com/mattn/go-isatty v0.0.20/go.mod"
	"github.com/mattn/go-localereader v0.0.1"
	"github.com/mattn/go-localereader v0.0.1/go.mod"
	"github.com/mattn/go-runewidth v0.0.16"
	"github.com/mattn/go-runewidth v0.0.16/go.mod"
	"github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6"
	"github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod"
	"github.com/muesli/cancelreader v0.2.2"
	"github.com/muesli/cancelreader v0.2.2/go.mod"
	"github.com/muesli/termenv v0.16.0"
	"github.com/muesli/termenv v0.16.0/go.mod"
	"github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646"
	"github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod"
	"github.com/pmezard/go-difflib v1.0.0"
	"github.com/pmezard/go-difflib v1.0.0/go.mod"
	"github.com/rivo/uniseg v0.2.0/go.mod"
	"github.com/rivo/uniseg v0.4.7"
	"github.com/rivo/uniseg v0.4.7/go.mod"
	"github.com/sahilm/fuzzy v0.1.1"
	"github.com/sahilm/fuzzy v0.1.1/go.mod"
	"github.com/stretchr/testify v1.8.4"
	"github.com/stretchr/testify v1.8.4/go.mod"
	"github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e"
	"github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod"
	"golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561"
	"golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod"
	"golang.org/x/sync v0.13.0"
	"golang.org/x/sync v0.13.0/go.mod"
	"golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod"
	"golang.org/x/sys v0.6.0/go.mod"
	"golang.org/x/sys v0.32.0"
	"golang.org/x/sys v0.32.0/go.mod"
	"golang.org/x/text v0.24.0"
	"golang.org/x/text v0.24.0/go.mod"
	"gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405"
	"gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod"
	"gopkg.in/yaml.v2 v2.4.0"
	"gopkg.in/yaml.v2 v2.4.0/go.mod"
	"gopkg.in/yaml.v3 v3.0.1"
	"gopkg.in/yaml.v3 v3.0.1/go.mod"
)
go-module_set_globals
MY_PV=$(ver_rs 3 -)
DESCRIPTION="Terminal JSON viewer."
HOMEPAGE="https://fx.wtf"
SRC_URI="https://github.com/antonmedv/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${EGO_SUM_SRC_URI}"

LICENSE="Apache-2.0 BSD-2 BSD MIT MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"

S="${WORKDIR}/${PN}-${MY_PV}"

src_compile() {
	go build . || die
}

src_install() {
	dobin "${PN}"
	einstalldocs
}