fnlfmt-0.3.2.ebuild 638 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright 2022-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. LUA_COMPAT=(lua5-{1..4} luajit)
  5. inherit lua-single
  6. DESCRIPTION="A formatter for Fennel code"
  7. HOMEPAGE="https://git.sr.ht/~technomancy/fnlfmt"
  8. SRC_URI="
  9. https://git.sr.ht/~technomancy/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
  10. "
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="amd64 ~x86"
  14. DEPEND="${LUA_DEPS}"
  15. RDEPEND="${DEPEND}"
  16. BDEPEND="dev-lang/fennel"
  17. src_compile() {
  18. (
  19. set -x
  20. {
  21. printf '%s\n\n' "#!${LUA}" &&
  22. fennel --require-as-include --compile cli.fnl
  23. } >"./${PN}" || die
  24. )
  25. }
  26. src_install() {
  27. dobin "./${PN}"
  28. }