Hi again! I've finally managed to port hactool as a homebrew app!
Original source by mbedtls and SciresM, who really made a great work with this cmd-line tool
Originally grabbed from another libnx project which used some mbedtls/hactool stuff for deriving keys
Modified stuff:
Changed all return/exit for Await function to avoid instant closes
Added consoleInit and gfxInit as libnx needs them
Added credits to usage text
Changed program name to NXhactool
All includes are included from "hactool.hpp" to make embedding easy (I'm embedding them in NSPower too)
The rest is just hactool's main.c's source plus its libs and mbedtls libs, grabbed from hactool v1.2.0
This is just a fast port, enjoy! Also, be free to try embedding/forking this project!

IMPORTANT! NXhactool anyway asks for args, so it should be called from nxlink!
Example nxlink command:
nxlink -a 192.168.1.64 NXhactool.nro --args "-t nca -k sdmc:/mykeys.ini sdmc:/myrom.nca"
GitHub repository: https://github.com/XorTroll/NXhactool
GitHub release: https://github.com/XorTroll/NXhactool/releases/latest

Enjoy! Btw, this hasn't been tested yet as it's a fast port of hactool!