|Summary:||devel/hs-ShellCheck: Provide statically linked binary|
|Product:||Ports & Packages||Reporter:||Tobias Kortkamp <tobik>|
|Component:||Individual Port(s)||Assignee:||Luca Pizzamiglio <pizzamig>|
|Severity:||Affects Only Me||CC:||arrowd, haskell, pizzamig|
Description Tobias Kortkamp 2018-11-21 12:28:38 UTC
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.
Comment 1 Gleb Popov 2018-11-21 12:47:31 UTC
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.
Comment 2 Luca Pizzamiglio 2018-11-21 14:53:02 UTC
Testing.. the build will take a while
Comment 3 Luca Pizzamiglio 2018-11-21 20:41:14 UTC
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?
Comment 4 commit-hook 2018-11-22 04:37:56 UTC
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