Federico Beffa <[email protected]> skribis: > Having never used nixpkgs, I'm not sure how they handle the database > in profiles. Would you have a pointer to a "standard" mechanism (like > how they handle 'dir' files, icon caches, ...).
AFAIK there’s no general mechanism for that. For GHC, this is handled by adding a wrapper for the ‘ghc’ binary: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/ghc/wrapper.nix https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/ghcjs/wrapper.nix Handling it during profile creation, as you suggest, and avoiding the use of a wrapper sounds preferable to me. If you look under <https://github.com/NixOS/nixpkgs/tree/master/pkgs/desktops/gnome-3/3.12/core>, many packages have an additional phase that does: rm $out/share/icons/hicolor/icon-theme.cache Some also explicitly wrap executables to set XDG_DATA_DIRS etc. like our ‘glib-or-gtk-build-system’ does: wrapProgram $f \ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" Thanks, Ludo’.
