jabranham / system-packages

Moved to gitlab
https://gitlab.com/jabranham/system-packages
GNU General Public License v3.0
39 stars 12 forks source link

How to support different package names on different distros? #24

Open jave opened 6 years ago

jave commented 6 years ago

Hello,

I'm using system-packages via use-package.

Is it possible to support different package names for the same binary on different distros?

For instance, the "go" binary would be supplied by the pkg "golang-binary" on Fedora, and "golang-go" on Ubuntu.

jabranham commented 6 years ago

This is something I've thought a little about and haven't come up with a good way yet. For now, probably the easiest way is just to specify it multiple times:

(use-package foo :ensure-system-package (; Ubuntu (go . golang-go)) ; Fedora (go . golang-binary))

Hope that helps!

On Sat 31 Mar 2018 at 05:25, joakim verona notifications@github.com wrote:

Hello,

I'm using system-packages via use-package.

Is it possible to support different package names for the same binary on different distros?

For instance, the "go" binary would be supplied by the pkg "golang-binary" on Fedora, and "golang-go" on Ubuntu.

jave commented 6 years ago

cool, but how does it work?

jabranham commented 6 years ago

From the use-package README, it sounds like you can supply a list of (binary . package-name) to :ensure-system-package where it will try to install package-name if binary isn't found.

https://github.com/jwiegley/use-package#use-package-ensure-system-package