Packaging a FOSS Application with runtime dependencies

Hello everyone,

the FOSS audio converter & CD ripper program fre:ac was added to nixpkgs in PR link in a (as far as I can tell) broken state (how did this PR even get merged?).
The program tries to load various encoder libraries at runtime, which are not provided to the program by the current packaging.
@DavidPesticcio and I are trying to fix this in PR link, but are not having any success.
The way the program tries to load its libraries is very convoluted (look at the PR I go into MUCH more detail over there), which seems to break the mechanisms we have in nixpkgs to provide such applications with the libraries they need.

What is the proper process here? This application is entirely FOSS, but hard-coding the library paths would require extensive patching of the source code. As discussed in the PR, providing the libs via LD_LIBRARY_PATH works, but is about as elegant of a solution as what the PR author came up with (works perfectly well, just is not very desirable).

It would be great if someone could provide their input on this matter, as I am at my wits’ end and they seem to be as well.

2 Likes