Skip to content

Consider pkg-config for finding system dependencies at build time #49

@RaitoBezarius

Description

@RaitoBezarius

Is your feature request related to a problem? Please describe.

When packaging applications that relies on libappindicator-rs, it's required to wrap the final binary with a LD_LIBRARY_PATH or a LD_PRELOAD or to patch this dependency to find the actual dependency.

Most packagers are not used to these techniques and therefore spends some time discovering what is the right method.

Describe the solution you'd like

If we could rely on pre-existing mechanisms such as pkg-config (that are often used in -sys variants in Rust ecosystem), this problem would entirely go away by itself. Record the proper path at build-time where pkg-config would point where the dynamic library would be.

Describe alternatives you've considered

Do one of the above hack.

Additional context

This came up while packaging https://github.com/tchapgouv/tchap-desktop for NixOS which relies on libappindicator-rs indirectly.

In NixOS, dependencies are usually injected at build-time, so it's unexpected that a program would rely on the ambient environment and expect that the library would appear "magically" without declaring a dependency upon it in the build process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions