RFC: desktop: block — source-built GUI apps, first-class on the desktop (alternative to Cask) #1271
tannevaled
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
pkgx + pantry currently package CLIs and libraries beautifully (~1500 source-built recipes covering compilers, daemons, build tools, libraries, etc.). But for graphical applications, we have a gap:
mpv.ioorinkscape.orgbuilds the binary, but does not register it with the OS's app-launcher (/Applicationson darwin,~/.local/share/applicationson linux freedesktop). Users can runpkgx mpv …from a terminal but the app doesn't appear in Spotlight / GNOME Activities / KDE Krunner / Cinnamon's menu..dmg/.pkgfrom upstream and copies it to/Applications. That is the opposite of pkgx's source-first philosophy and explicitly what pantry tries to avoid (warnings: - vendoredis the carve-out, not the norm).This is an RFC for a new optional recipe block:
desktop:.Proposal —
desktop:block inpackage.ymlA new top-level optional key on any pantry recipe whose binary is a GUI app. Purely additive — recipes that don't define
desktop:behave exactly as today.Recipe-side schema
What pkgm / pkgx does with this
When
pkgm install inkscape.orgruns, after the normal bottle-relocation:.desktopfile under${PREFIX}/share/applications/<name>.desktopfrom thedesktop:block, then symlink/install it to the user's~/.local/share/applications/(or system path under--system). Runupdate-desktop-databaseif available.*.appbundle skeleton under${PREFIX}/Applications/<Name>.app/with a generatedInfo.plistfromdesktop:(CFBundleIdentifier frombundle-id, CFBundleIconFile from generated icns, CFBundleExecutable as a small shim that exec's${PREFIX}/bin/<bin>), then symlink to/Applications(or~/Applications).Why this is not Cask
desktop:.dmg/.pkgbuild.script)versions:polls upstream + pantry CIinstaller(8)privilegedThe
desktop:block is just metadata for registration. The binary itself remains a pantry-built bottle.What I'd like guidance on
mime-types:shape and whethercategories:should be freedesktop-string or pkgx-abstract.pkgmintegration vs. a separate verb — shouldpkgm install <pkg-with-desktop>automatically register, or should there be an explicitpkgm app-register <pkg>(and the inverseapp-unregister)? Auto-register matches user expectation, but breaks the "pkgm only installs to/usr/local" model..icnsviaiconutil(already in the Xcode toolchain, pantry can shell out). On linux just install the SVG/PNG to${PREFIX}/share/icons/hicolor/…/apps/. Reasonable?inkscape.org,mpv.io,gimp.org,wireshark.org,audacity-team.org,videolan.org/vlc. Any one of these can prove the design end-to-end.desktop:should be fully optional. CLI-only recipes (the vast majority) need zero changes. Adding a baddesktop:block should warn, not fail CI.Non-goals (deliberately)
desktop:is to make the source-built GUI apps we already produce first-class on the desktop.pkgm install <pkg>.Implementation sketch (rough)
desktop:to the recipe JSON schema. Add a CI lint check that catches typos incategories/mime-types.desktop:block as adesktop.ymlnext to the existing manifest inside the bottle tarball, so consumers (pkgm) can read it back without re-reading pantry.desktop.ymlexists in the bottle, run the per-OS registration step.pkgx <gui-app>and the app hasdesktop.terminal: false, detach from the parent shell.Prior art reviewed
makeDesktopItem— Nix function generating.desktopfiles. Closest to what I'm proposing; thedesktop:block is essentially a declarative version.Status
Posting this as an Ideas discussion (not a PR) to gather feedback on the shape before writing code. Happy to drive the pantry-side schema PR + a reference pkgm-side patch once direction is agreed.
— posted from a contributor currently active on pantry (recent PRs: #13099, #13100, #13102, #13103, #13104, #13106, #13107, #13108, #13111, #13112, brewkit#350)
Beta Was this translation helpful? Give feedback.
All reactions