···11{ config, pkgs, lib, ... }:
2233-with lib;
33+let
44+ inherit (lib)
55+ mkEnableOption
66+ mkIf
77+ mkOption
88+ mkRenamedOptionModule
99+ teams
1010+ types;
1111+in
412513{
614 imports = [
715 (mkRenamedOptionModule [ "services" "flatpak" "extraPortals" ] [ "xdg" "portal" "extraPortals" ])
1616+1717+ ({ config, lib, options, ... }:
1818+ let
1919+ from = [ "xdg" "portal" "gtkUsePortal" ];
2020+ fromOpt = lib.getAttrFromPath from options;
2121+ in
2222+ {
2323+ warnings = lib.mkIf config.xdg.portal.gtkUsePortal [
2424+ "The option `${lib.showOption from}' defined in ${lib.showFiles fromOpt.files} has been deprecated. Setting the variable globally with `environment.sessionVariables' NixOS option can have unforseen side-effects."
2525+ ];
2626+ }
2727+ )
828 ];
9291030 meta = {
···32523353 gtkUsePortal = mkOption {
3454 type = types.bool;
5555+ visible = false;
3556 default = false;
3657 description = ''
3758 Sets environment variable <literal>GTK_USE_PORTAL</literal> to <literal>1</literal>.
3838- This is needed for packages ran outside Flatpak to respect and use XDG Desktop Portals.
3939- For example, you'd need to set this for non-flatpak Firefox to use native filechoosers.
5959+ This will force GTK-based programs ran outside Flatpak to respect and use XDG Desktop Portals
6060+ for features like file chooser but it is an unsupported hack that can easily break things.
4061 Defaults to <literal>false</literal> to respect its opt-in nature.
4162 '';
4263 };
···81818282 # Using install check so we do not have to manually set
8383 # LD_LIBRARY_PATH and GI_TYPELIB_PATH variables
8484- doInstallCheck = true;
8484+ # Musl does not support TZDIR.
8585+ doInstallCheck = !stdenv.hostPlatform.isMusl;
8586 enableParallelChecking = false;
8687 preInstallCheck = if stdenv.isDarwin then ''
8788 for testexe in $(find ./src/test -maxdepth 1 -type f -executable); do