lit icon indicating copy to clipboard operation
lit copied to clipboard

custom luvi

Open zenlor opened this issue 8 years ago • 4 comments

Hello, I have run in a bit of trouble running in Alpine Linux, and musl.

Since lit will download the supposedly right version of the precompiled binary from github it will not run on my small system (an ARM server from scaleway and my Raspberry).

I already have luvi, lit and luvit installed in /usr/local. Additionally I had to replace the downloaded luvi with my compiled version ~/.litdb.git/cache/24339028e53ad0607172d8c0f0105a5814cd7bc9/luvi.

A quick inspection of the code revealed tha there is currently no way to set a preferred luvi executable. Is this something you would like to support? If you are positive I could give it a try and send a pull request.

Tests are all green in Alpine 3.3.3, kernel 4.3.3-std-1 platform armv7l

zenlor avatar Apr 01 '16 15:04 zenlor

Actually I've been playing with this last week.

  1. There is a way to specify a custom luvi, but for some reason it was never documented.
  2. You don't even need to embed luvi, a single with #!/path/to/luvi --\n will work just fine in place of the luvi binary.

Using both these my solution is to compile custom luvi for alpine (just clone luvi source and build normally inside alpine). I put it at /usr/local/bin/luvi. Then create a file, I call it prefix that contains #!/usr/local/bin/luvi --\n. Then I build my luvi based app, but using /path/to/prefix in place of the custom luvi.

> lit make lit://luvit/luvit /usr/local/bin/luvit /path/to/prefix

And it will build the zip for luvit/luvit, and append it to the file at /path/to/prefix and store it in /usr/local/bin/luvit

The undocumented feature is the 3rd argument to lit make is the custom luvi path.

creationix avatar Apr 01 '16 18:04 creationix

I would like to think of some tweaks to luvi that makes this custom luvi easier, maybe a config option?

creationix avatar Apr 01 '16 18:04 creationix

Thanks for the prompt response!

A config option would be helpful to force a custom version of luvi instead of grabbing a prebuild binary

zenlor avatar Apr 02 '16 01:04 zenlor

Agreed, I'll leave this issue open as a reminder to add such an option when I'm back at my desk next week.

creationix avatar Apr 02 '16 04:04 creationix