Here is my awful solution used sure only on my personal system: ~> cat /etc/fish/conf.d/etc-profile.fish # eval (/usr/bin/sh -c 'envfile=$(mktemp -t fish_importenv.XXXXXX) ; export | sort > "$envfile" ; for f in $(ls /etc/profile.d/*.sh) ; do . "$f" ; done ; export | sort | comm -3 "$envfile" - | sed -r "s/export ([^=]+)=(.*)/set -x \1 \2;/g" ; rm -f "$envfile"')
At least this working to set PATH also according to /etc/profile.d/apps-bin-path.sh and IM_CONFIG_CHECK_ENV according to /etc/profile.d/im-config_wayland.sh. Here is a potential list of candidate packages: ~> apt-file search /etc/profile.d bash-completion: /etc/profile.d/bash_completion.sh byobu: /etc/profile.d/Z97-byobu.sh chkboot: /etc/profile.d/chkboot-profilealert.sh cloud-init: /etc/profile.d/Z99-cloud-locale-test.sh debian-mate-default-settings: /etc/profile.d/debian-mate-default-settings_gtk-accessibility.sh environment-modules: /etc/profile.d/modules.sh flatpak: /etc/profile.d/flatpak.sh gawk: /etc/profile.d/gawk.csh gawk: /etc/profile.d/gawk.sh im-config: /etc/profile.d/im-config_wayland.sh junior-config: /etc/profile.d/debian-junior.sh lammps: /etc/profile.d/lammps.csh lammps: /etc/profile.d/lammps.sh libvte-2.91-common: /etc/profile.d/vte-2.91.sh libvte-2.91-common: /etc/profile.d/vte.csh lmod: /etc/profile.d/lmod.sh med-config: /etc/profile.d/debian-med.sh mobile-tweaks-common: /etc/profile.d/mobile-tweaks.sh osc: /etc/profile.d/osc.csh packagekit-command-not-found: /etc/profile.d/PackageKit.sh pan-config: /etc/profile.d/debian-pan.sh safe-rm: /etc/profile.d/safe-rm.sh sbmltoolbox: /etc/profile.d/SBMLToolbox.sh science-config: /etc/profile.d/debian-science.sh sendfile: /etc/profile.d/sendfile snapd: /etc/profile.d/apps-bin-path.sh sumo: /etc/profile.d/sumo.csh sumo: /etc/profile.d/sumo.sh undistract-me: /etc/profile.d/undistract-me.sh vala-panel-appmenu-common: /etc/profile.d/vala-panel-appmenu.sh