Repository navigation
feat(linux): configure package dependencies - #213
Merged
Merged
Conversation
houko
force-pushed
the
fix/linux-package-dependencies
branch
from
November 16, 2026 10:16
ad249c6 to
57f9e93
Compare
houko
force-pushed
the
fix/linux-package-dependencies
branch
from
November 16, 2026 10:22
57f9e93 to
a6382c6
Compare
Collaborator
Author
|
Reviewed. Rebased onto current main (67249d2) as a6382c6; the diff is unchanged and touches neither CHANGELOG.md nor anything outside the Linux package metadata, its config loading, tests and docs.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #139
Linux package metadata now accepts
linux.dependsandlinux.recommends, each with separatedebandarchlists, passed through verbatim so Debian alternatives and version constraints (a | b,foo (>= 1.2)) and Arch'sname: reasonoptional dependencies work. The.debappends the entries, in order, afterlibgtk-4-1inDepends:and afterlibwebkitgtk-6.0-4inRecommends:; the Arch.PKGINFOwrites onedepend =line per entry aftergtk4and oneoptdepend =line per entry afterwebkitgtk-6.0: web views. Without the keys both packages are what they were before.Loading
nsgo.yamlrejects a blank (empty or whitespace-only) entry and an entry holding a line break, with a message naming the key and the entry, such asnsgo.yaml: linux.depends.deb entry 2 is empty, so an entry cannot leave an empty item in a Debian list or inject other control fields. A YAML null entry ([~]) is dropped by the YAML decoder and never reaches the package.docs/public/en/building.mdanddocs/public/zh/building.mddocument the keys next tolinux.maintainer, anddocs/architecture/tool.mdnow says the packages recommend WebKitGTK 6 rather than "suggest" it.Verification
go build ./...;GOOS=windowsandGOOS=linuxvets andGOOS=android GOARCH=arm64/GOOS=js GOARCH=wasmbuilds of./cmd/nsgogo tool nsgo check -target allgo tool nsgo test ./cmd/nsgoandgo tool nsgo test -run 'Layer|Skills|Doc' .TestLinuxPackagescovers both formats with and without extra entries, including their order relative to NSGo's own;TestLinuxPackageDependenciesloads the keys throughnsgo.yamland checks every rejection messageexamples/hellobuilt withnsgo build -target linux_x64and extra entries.dpkg-deb -fshowsDepends: libgtk-4-1, gstreamer1.0-plugins-good, libsoup-3.0-0 | libsoup3andRecommends: libwebkitgtk-6.0-4, gstreamer1.0-libav, ffmpeg (>= 7);apt-get install -s ./hello….debon Ubuntu 24.04 resolves the package and pulls ingstreamer1.0-libavandffmpegas recommended;pacman -Qipin an Arch Linux container listsDepends On: gtk4 gst-plugins-goodandOptional Deps: webkitgtk-6.0: web views, gst-libav: H.264 and AAC videoScreenshots
None