Skip to content

Conversation

catfromplan9
Copy link
Contributor

No description provided.

@evan-goode
Copy link
Member

I think we could do the Go dependency vendoring if Portage really needs that, but it seems strange to me to distribute a "halfway-built" tarball where the JavaScript front end and OpenAPI doc is already built. This way, you couldn't create a patch for the TypeScript files, correct? Could we also vendor node_modules and have the ebuild do the make prebuild?

Also, if we do add a workflow like this, I'd like to implement as much as possible (the building of the tarball) in the Nix flake, like how the Docker image builds are done. I'd rather not have to bump the Go and Node versions in more than one place, and it's good to be able to run the script outside of GHA. If you'd like I can help with the flake changes.

@catfromplan9
Copy link
Contributor Author

catfromplan9 commented Aug 30, 2025

I think we could do the Go dependency vendoring if Portage really needs that, but it seems strange to me to distribute a "halfway-built" tarball where the JavaScript front end and OpenAPI doc is already built. This way, you couldn't create a patch for the TypeScript files, correct? Could we also vendor node_modules and have the ebuild do the make prebuild?

I am not aware of a way to vendor node modules. I did it this way because AFAIK nodeJS refuses to build without internet. I checked on the gentoo forums and saw a post where someone wanted to package a nodeJS program, and all the comments were telling them to give up. If you can find a way to get nodejs dependencies included in a vendored form, where it will be able to be built offline, then please do so, that would be a much better solution. I have read online that some nodejs packages build into native binaries too, so you will need to find a way to get all their source code downloaded locally to where it will be used when portage tries to do the node esbuild

Also, if we do add a workflow like this, I'd like to implement as much as possible (the building of the tarball) in the Nix flake, like how the Docker image builds are done. I'd rather not have to bump the Go and Node versions in more than one place, and it's good to be able to run the script outside of GHA. If you'd like I can help with the flake changes.

I am not familiar with dockerfiles or nix flakes, sorry.

@catfromplan9
Copy link
Contributor Author

catfromplan9 commented Aug 30, 2025

And yes, portage does need vendored tarballs for building. It is, in their view, the proper way for golang software to be packaged. I can do something else for the live ebuild, but it would be wrong to use that on a particular version. I am sure that packaging on other distributions would benefit from this sort of tarball as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants