I’m trying to contribute a snap package to the buffalo project [1]. This is a bit more complicated that just a plain go app, so I’m hoping someone can assist me a bit.
There are two issues that came up immediately after creating the initial snap.
-
Buffalo needs golang to be available on the path and because the snap is confined it raises this error:
exec: "go": executable file not found in $PATH
Should I just add go as a part, or is there another way (other than--classic
) that I can tell the snap to use the system golang -
Buffalo also runs NodeJS in a similar way so the point above regarding golang is also needed for nodejs.
Here is a list of requirements for go buffalo: https://gobuffalo.io/en/docs/installation/#requirements
My current snapcraft.yml:
name: buffalo # you probably want to 'snapcraft register <name>'
version: 'v0.14.0'
summary: Rapid Web Development w/ Go
description: |
Buffalo helps you to generate a web project that already has everything from
front-end to the back-end already hooked up and ready to run. From there it
provides easy APIs to build your web application quickly in Go.
grade: devel
confinement: devmode
# TODO:
# Buffalo needs access to go and for it to be on the path
# Also needs nodejs to be available.
parts:
buffalo:
source: .
plugin: go
go-importpath: github.com/gobuffalo/buffalo
# TODO: We probably need this as well
# buffalo-pop:
# source:
# plugin: go
# go-importpath: github.com/
apps:
buffalo:
command: buffalo
PS: I know some of these issues can be resolved with --classic
confinement, but I’d prefer to avoid that if possible.