diff --git a/modules/wrapper-manager/base.nix b/modules/wrapper-manager/base.nix index a1ba179..a292c51 100644 --- a/modules/wrapper-manager/base.nix +++ b/modules/wrapper-manager/base.nix @@ -118,12 +118,13 @@ let }; config = { + env.PATH = lib.concatStringsSep ":" config.pathAdd; + makeWrapperArgs = [ "--argv0" config.arg0 ] - ++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env) ++ (builtins.map (v: "--unset ${v}") config.unset) - ++ (builtins.map (v: "--prefix 'PATH' ':' ${v}") config.pathAdd) + ++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env) ++ (builtins.map (v: "--add-flags ${v}") config.prependArgs) ++ (builtins.map (v: "--append-flags ${v}") config.appendArgs) ++ (lib.optionals (!envConfig.build.isBinary && config.preScript != "") ( diff --git a/modules/wrapper-manager/xdg-dirs.nix b/modules/wrapper-manager/xdg-dirs.nix index 08e8d38..5602716 100644 --- a/modules/wrapper-manager/xdg-dirs.nix +++ b/modules/wrapper-manager/xdg-dirs.nix @@ -48,9 +48,10 @@ in config.xdg.configDirs = cfg.configDirs; config.xdg.dataDirs = cfg.dataDirs; - config.makeWrapperArgs = - builtins.map (v: "--prefix 'XDG_CONFIG_DIRS' ':' ${v}") config.xdg.configDirs - ++ (builtins.map (v: "--prefix 'XDG_DATA_DIRS' ':' ${v}") config.xdg.dataDirs); + config.env = { + XDG_CONFIG_DIRS = lib.concatStringsSep ":" config.xdg.configDirs; + XDG_DATA_DIRS = lib.concatStringsSep ":" config.xdg.dataDirs; + }; }; in with lib.types; attrsOf (submodule xdgDirsType);