Subject: bug#43821: [PATCH 0/1] Progress improving vlang package

From: Ryan Prior <[email-masked]>
Date: Tue, 06 Oct 2020 05:03:34 +0000

One of the challenges of packaging v is that its install script assumes that you'll install it in a mutable folder, and uses that assumption to lazily build the included tools as they're needed instead of eagerly building everything up-front.

There's an included command for eagerly building these tools, which we should invoke in order to make sure that the repl &c are available at package installation time and the user won't need write access to the v directory.

This patch presents progress in that direction, but it has a ways to go. Like golang, the v build system resolves dependencies on git repos as it goes, so once I run `v build-tools` it wants to go and fetch the vlang/markdown repo. So we'll probably need to package that ahead of time.

That, however, raises the chicken-and-egg problem. Do we create a vlang-bootstrap package that we use to compile the deps (like vlang/markdown) and then in turn use those as inputs to the "real" v package which also builds all the tools? Do we include those deps as explicit source-only native-inputs of the v package? I don't know which strategy I prefer yet, I'd be interested to hear any input from others.

So in the spirit of progress here's my work-in-progress patch!

Cheers,
Ryan

Ryan Prior (1):
  gnu: vlang: Build included tools at package time.

 gnu/packages/vlang.scm | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

-- 
2.17.1