diff --git a/subprojects/wrapper-manager-fds/modules/wrapper-manager/base.nix b/subprojects/wrapper-manager-fds/modules/wrapper-manager/base.nix index 7b01afaa..ea0c5eac 100644 --- a/subprojects/wrapper-manager-fds/modules/wrapper-manager/base.nix +++ b/subprojects/wrapper-manager-fds/modules/wrapper-manager/base.nix @@ -64,6 +64,15 @@ in }; }; + unset = lib.mkOption { + type = with lib.types; listOf nonEmptyStr; + description = '' + A list of environment variables to be unset into the wrapper script. + ''; + default = [ ]; + example = [ "NO_COLOR" ]; + }; + executableName = lib.mkOption { type = lib.types.nonEmptyStr; description = '' diff --git a/subprojects/wrapper-manager-fds/modules/wrapper-manager/build.nix b/subprojects/wrapper-manager-fds/modules/wrapper-manager/build.nix index b44582bc..7924d753 100644 --- a/subprojects/wrapper-manager-fds/modules/wrapper-manager/build.nix +++ b/subprojects/wrapper-manager-fds/modules/wrapper-manager/build.nix @@ -63,6 +63,7 @@ "--argv0" (config.executableName or config.arg0) ] ++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env) + ++ (builtins.map (v: "--unset ${v}") config.unset) ++ (builtins.map (v: "--prefix 'PATH' ':' ${lib.escapeShellArg v}") config.pathAdd) ++ (builtins.map (v: "--add-flags ${v}") config.prependArgs) ++ (builtins.map (v: "--append-flags ${v}") config.appendArgs)