[Nix-dev] Re: difference build input and installable package ?

Ludovic Courtès ludo at gnu.org
Thu Sep 24 10:19:49 CEST 2009


Hello,

Marc Weber <marco-oweber at gmx.de> writes:

> Solution: attach some information to each package which might be
> installed by the user telling that this derivation should be wrapped by
> exporting ALSA_PLUGIN_DIRS. How could this be done?
>
>
> alsaLib = stdenv.mkDerivation {
>   name = "foo";
>   passthru = if getConfig "useAlsaLib" then
>                  { addEnv = { ALSA_PLUGIN_DIRS = "$alsaPlugins/lib-alsa" }; }
>             else {};
> }

That looks terribly ugly to me, as it mixes different concerns.

I would take the same route as the one taken for glibc’s NSS modules,
which basically means adding “export
ALSA_PLUGIN_DIRS="$HOME/.nix-profile/lib/alsa-lib"” in /etc/profile.

Thanks,
Ludo’.




More information about the nix-dev mailing list