<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Tech @ languidnights - packaging</title><link href="https://blog.languidnights.com/tech/" rel="alternate"></link><link href="https://blog.languidnights.com/tech/feeds/packaging.atom.xml" rel="self"></link><id>https://blog.languidnights.com/tech/</id><updated>2022-11-03T00:00:00-04:00</updated><entry><title>Neovim and Sundry</title><link href="https://blog.languidnights.com/tech/neovim-and-sundry.html" rel="alternate"></link><published>2022-09-01T00:00:00-04:00</published><updated>2022-11-03T00:00:00-04:00</updated><author><name>Christopher R. Nelson</name></author><id>tag:blog.languidnights.com,2022-09-01:/tech/neovim-and-sundry.html</id><summary type="html">&lt;a class="reference external image-reference" href="https://neovim.io"&gt;
&lt;img alt="Neovim logo" class="align-left" src="images/neovim-logo-flat.png" style="width: 30%;" /&gt;
&lt;/a&gt;
&lt;p&gt;&lt;a class="footnote-reference" href="#jason-long" id="footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/p&gt;
&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Table of Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#what-is-neovim" id="toc-entry-1"&gt;What is Neovim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#luajit-with-arm64-and-debian" id="toc-entry-2"&gt;LuaJit with arm64 and Debian&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="what-is-neovim"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;What is Neovim&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="https://neovim.io/"&gt;Neovim&lt;/a&gt; is the new vim! (Okay, not exactly but sort of?). It's vim, but
specialized for more modern systems and not as dependent on maintaining
compatibility. It's also ehanced with lua scripting, lsp integration,
and …&lt;/p&gt;&lt;/div&gt;</summary><content type="html">&lt;a class="reference external image-reference" href="https://neovim.io"&gt;
&lt;img alt="Neovim logo" class="align-left" src="images/neovim-logo-flat.png" style="width: 30%;" /&gt;
&lt;/a&gt;
&lt;p&gt;&lt;a class="footnote-reference" href="#jason-long" id="footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/p&gt;
&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Table of Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#what-is-neovim" id="toc-entry-1"&gt;What is Neovim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#luajit-with-arm64-and-debian" id="toc-entry-2"&gt;LuaJit with arm64 and Debian&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="what-is-neovim"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;What is Neovim&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="https://neovim.io/"&gt;Neovim&lt;/a&gt; is the new vim! (Okay, not exactly but sort of?). It's vim, but
specialized for more modern systems and not as dependent on maintaining
compatibility. It's also ehanced with lua scripting, lsp integration,
and treesitter integration.&lt;/p&gt;
&lt;p&gt;or, as the website &lt;em&gt;oh so helpfully&lt;/em&gt; calls is: &amp;quot;hyperextensible
Vim-based text editor&amp;quot;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="luajit-with-arm64-and-debian"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;LuaJit with arm64 and Debian&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Debian ships a version of neovim for the arm64 platform. This, you might
say, is great! And it is, so long as you don't need to use any of the
luajit integration points, either of your editor or of your plugins.
Let's fix this. I'll show you the easy (and best!) way first, then the
hard way.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;dpkg&lt;span class="w"&gt; &lt;/span&gt;--add-architecture&lt;span class="w"&gt; &lt;/span&gt;armhf
apt-get&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;neovim:armhf
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Yup. That's all that you really need to do. It's all I should have done.
But, I didn't, and we'll be going into what I've done next. First,
things that didn't work quite so well...&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;flatpak: it doesn't have access to your path and all your lovely lsp
servers&lt;/li&gt;
&lt;li&gt;&lt;dl class="first docutils"&gt;
&lt;dt&gt;appimage: it's built for an x86_64 machine (nvim is trying to support&lt;/dt&gt;
&lt;dd&gt;the future, but I happen to think the future is arm and not amd64)&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;building from source directly: it'll work just fine, but it'll be a
bear to maintain in the long run.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, what should I do? Build myself a deb package with luajit instead of
base lua. We'll start by installing pbuilder and creating an
environment.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;pbuilder
pbuilder&lt;span class="w"&gt; &lt;/span&gt;create
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then, we'll download the source code for the debian package, as well as
its build dependencies.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get&lt;span class="w"&gt; &lt;/span&gt;build-dep&lt;span class="w"&gt; &lt;/span&gt;neovim
apt-get&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;neovim
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and update the build files for arm64's compiler and the use of luajit
(one test ails on ARM architectures, so patch that out too. ideally, I'd
fix it but it also fails on armhf, so I'm not going to spend too much
time digging today)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gd"&gt;--- debian/control.old      2022-09-01 17:06:48.797215829 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ debian/control  2022-09-01 17:05:48.843040845 -0400&lt;/span&gt;
&lt;span class="gu"&gt;@@ -11,7 +11,7 @@&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt; less &amp;lt;!nocheck&amp;gt;,
&lt;span class="w"&gt; &lt;/span&gt; libacl1-dev,
&lt;span class="w"&gt; &lt;/span&gt; libkvm-dev [kfreebsd-any],
&lt;span class="gd"&gt;- libluajit-5.1-dev [amd64 armel armhf hurd-i386 i386] | liblua5.1-dev,&lt;/span&gt;
&lt;span class="gi"&gt;+ libluajit-5.1-dev [amd64 arm64 armel armhf hurd-i386 i386] | liblua5.1-dev,&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt; libmsgpack-dev (&amp;gt;= 1.0.0),
&lt;span class="w"&gt; &lt;/span&gt; libnss-wrapper &amp;lt;!nocheck&amp;gt;,
&lt;span class="w"&gt; &lt;/span&gt; libtermkey-dev,
&lt;span class="gu"&gt;@@ -27,7 +27,7 @@&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt; lua-lpeg,
&lt;span class="w"&gt; &lt;/span&gt; lua-luv-dev (&amp;gt;= 1.43.0),
&lt;span class="w"&gt; &lt;/span&gt; lua-nvim (&amp;gt;= 0.0.1-26-1~) [!hurd-i386] &amp;lt;!nocheck&amp;gt;,
&lt;span class="gd"&gt;- luajit [amd64 armel armhf hurd-i386 i386],&lt;/span&gt;
&lt;span class="gi"&gt;+ luajit [amd64 arm64 armel armhf hurd-i386 i386],&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt; lua5.1,
&lt;span class="w"&gt; &lt;/span&gt; ninja-build,
&lt;span class="w"&gt; &lt;/span&gt; pkg-config,

&lt;span class="gd"&gt;--- a/debian/rules&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/debian/rules&lt;/span&gt;
&lt;span class="gu"&gt;@@ -37,6 +37,9 @@ FUNCTEST_FILTER_OUT=&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;ifneq (,$(filter armhf,$(DEB_HOST_ARCH)))
&lt;span class="w"&gt; &lt;/span&gt;  FUNCTEST_FILTER_OUT=&amp;#39;memory usage releases memory when closing windows when folds exist&amp;#39;
&lt;span class="w"&gt; &lt;/span&gt;endif
&lt;span class="gi"&gt;+ifneq (,$(filter arm64,$(DEB_HOST_ARCH)))&lt;/span&gt;
&lt;span class="gi"&gt;+  FUNCTEST_FILTER_OUT=&amp;#39;memory usage releases memory when closing windows when folds exist&amp;#39;&lt;/span&gt;
&lt;span class="gi"&gt;+endif&lt;/span&gt;

&lt;span class="w"&gt; &lt;/span&gt;export USERNAME = team+vim
&lt;span class="w"&gt; &lt;/span&gt;export HOSTNAME = tracker.debian.org

&lt;span class="gd"&gt;--- a/test/unit/helpers.lua&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/test/unit/helpers.lua&lt;/span&gt;
&lt;span class="gu"&gt;@@ -135,6 +135,8 @@ local function filter_complex_blocks(body)&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    if not (string.find(line, &amp;quot;(^)&amp;quot;, 1, true) ~= nil
&lt;span class="w"&gt; &lt;/span&gt;            or string.find(line, &amp;quot;_ISwupper&amp;quot;, 1, true)
&lt;span class="w"&gt; &lt;/span&gt;            or string.find(line, &amp;quot;_Float&amp;quot;)
&lt;span class="gi"&gt;+            or string.find(line, &amp;quot;_Float128&amp;quot;)&lt;/span&gt;
&lt;span class="gi"&gt;+            or string.find(line, &amp;quot;__uint128&amp;quot;)&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;            or string.find(line, &amp;quot;msgpack_zone_push_finalizer&amp;quot;)
&lt;span class="w"&gt; &lt;/span&gt;            or string.find(line, &amp;quot;msgpack_unpacker_reserve_buffer&amp;quot;)
&lt;span class="w"&gt; &lt;/span&gt;            or string.find(line, &amp;quot;UUID_NULL&amp;quot;)  -- static const uuid_t UUID_NULL = {...}
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and finally, build&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pdebuild
dpkg&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;/var/cache/pbuilder/result/neovim_0.7.2-3_arm64.deb
dpkg&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;/var/cache/pbuilder/result/neovim-runtime_0.7.2-3_all.deb
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a class="reference external" href="#table-of-contents"&gt;top&lt;/a&gt;&lt;/p&gt;
&lt;table class="docutils footnote" frame="void" id="jason-long" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;logo released under CC-BY-3.0 by &lt;a class="reference external" href="https://twitter.com/jasonlong"&gt;Jason Long&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
</content><category term="packaging"></category></entry></feed>