As i mentioned last month, I bought one of these Norns audio-computers and a grey grid device to go with it. So now I have this lap-size electronic music apparatus.
Its very fun to develop for – the truth is I’ve never got on well with the “standard” tools of Max/MSP and Pure Data, I suspect flow-based programming just isn’t for me. As within an hour of opening the web-based Lua editor on the Norns device I already had a pretty cool prototype of something I hadn’t even intended to make. More on that when I can devote more time to it.
There is some work to make the open-source Norns software run on the Linux desktop in a container. It seems the status is “working but awkward.” I thought to myself – “How hard could it be to package this as a Flatpak?”
As soon as I saw use of Golang and Node.js I knew the answer – very hard.
In the world of Flatpak apps we are rigorous about doing reproducible builds from controlled inputs. The flatpak-builder tool requires that all the Go and JavaScript dependencies are specified ahead of time, and build tools are prevented from connecting to the internet at build time. This is a good thing, as the results are otherwise unpredictable. The packaging tools in the Go and Node.js ecosystems make this kind of attention to detail difficult to achieve.
There is a solution, which would be to build the components using BuildStream and develop plugins to integrate with the Node.js and Go worlds, so it can fetch deps ahead of time. There’s an open issue for Go plugin. For Node.js I am not sure if anything exists.
This led me to thinking – how come the open-source, community developed world of Flatpaks is so much better and doing reliable, reproducible builds than the corporate environments that I see in my day job?
One last cool thing – thanks to instructions here by @infinitedigits I was able to produce this amazing music video!
You *can* connect to the network doing a flatpak build but flathub doesn’t allow it. Perfectly fine for your own repo or local usage though.
Interesting – it seems broken in flatpka-builder though, for example:
“
go: github.com/BurntSushi/toml@v0.3.1: Get “https://proxy.golang.org/github.com/%21burnt%21sushi/toml/@v/v0.3.1.mod”: dial tcp: lookup proxy.golang.org: Temporary failure in name resolution
“`
Perhaps it needs /etc/resolv.conf mounting into the sandbox, but I also don’t see a way to do that. (And I am happy that there isn’t one 🙂