Created attachment 199412 [details] shellcheck.diff Installing hs-ShellCheck on FreBSD currently installs about 2 GiB worth of dependencies (including GHC!). This is embarrassing and hard to explain and justify to users coming from other systems where shellcheck is generally statically linked to its Haskell dependencies and takes up about 20-30 MiB of space. ShellCheck is a simple tool that shouldn't require having the entire Haskell toolchain installed. Can we statically link it to the hs-* dependencies on FreeBSD too? Alternatively, maybe we could create a 'static' flavor or similar. Poudriere testport on 12.0-RC1/i386 ok.
Converting Haskell applications to statically-linked ones is on my TODO list for a long time. The plan is to build them using Stack/Stackage and get rid of all ports for Haskell libraries. However, this is still a TODO item. For the time being, as @haskell hat, I'd say OK for this patch. Let's hear the maintainer, though.
Testing.. the build will take a while
Looks good to me. The final binary is ~17MB, that's 100x smaller than the amount of packages that has to be previously installed I put in my TODO list to add the OPTION to build it dynamically, but for now, static is the way to go. Can you commit it?
A commit references this bug: Author: tobik Date: Thu Nov 22 04:36:54 UTC 2018 New revision: 485580 URL: https://svnweb.freebsd.org/changeset/ports/485580 Log: devel/hs-ShellCheck: Link Haskell dependencies statically ShellCheck is an essential tool that should not require having the entire Haskell toolchain installed which most users do not need. The installed size (including all run dependencies) goes down from ~2 GiB to ~35 MiB. This brings the hs-ShellCheck package more in line with what is provided by various Linux distributions and OpenBSD. PR: 233376 Submitted by: tobik Approved by: pizzamig (maintainer), haskell (arrowd) Changes: head/devel/hs-ShellCheck/Makefile
(In reply to Luca Pizzamiglio from comment #3) Done. Thank you both for the quick responses! Let's hope there are no strong objections to it. ;-)