···2020 cronNixosPkg = pkgs.cron.override {
2121 # The mail.nix nixos module, if there is any local mail system enabled,
2222 # should have sendmail in this path.
2323- sendmailPath = "/run/wrappers/sendmail";
2323+ sendmailPath = "/run/wrappers/bin/sendmail";
2424 };
25252626 allFiles =
···131131 cat /etc/resolv.conf | resolvconf -m 1000 -a host
132132fi
133133134134-# Create /run/wrappers as a tmpfs.
135135-rm -rf /run/wrappers
136136-mkdir -m 0755 -p /run/wrappers
137137-mount -t tmpfs -o "mode=0755" tmpfs /run/wrappers
138138-139134# Log the script output to /dev/kmsg or /run/log/stage-2-init.log.
140135# Only at this point are all the necessary prerequisites ready for these commands.
141136exec {logOutFd}>&1 {logErrFd}>&2
···2626+ is_nixos=no
2727+fi
2828+
2929-+if [ -u /run/wrappers/gksign ]; then
2929++if [ -u /run/wrappers/bin/gksign ]; then
3030+ cat <<EOM
3131+
3232+Gale appears to have already been set up via the NixOS module system (check
···9696 /* get the path to the executable */
9797 char szPath[RTPATH_MAX];
9898- RTPathAppPrivateArch(szPath, sizeof(szPath) - 1);
9999-+ RTStrCopy(szPath, sizeof(szPath) - 1, "/run/wrappers");
9999++ RTStrCopy(szPath, sizeof(szPath) - 1, "/run/wrappers/bin");
100100 size_t cchBufLeft = strlen(szPath);
101101 szPath[cchBufLeft++] = RTPATH_DELIMITER;
102102 szPath[cchBufLeft] = 0;
···154154155155+RTDECL(int) RTPathSuidDir(char *pszPath, size_t cchPath)
156156+{
157157-+ return RTStrCopy(pszPath, cchPath, "/run/wrappers");
157157++ return RTStrCopy(pszPath, cchPath, "/run/wrappers/bin");
158158+}
159159+
160160+
···174174+ * will cut off everything after the rightmost / as this function is analogous
175175+ * to RTProcGetExecutablePath().
176176+ */
177177-+#define SUIDDIR "/run/wrappers/"
177177++#define SUIDDIR "/run/wrappers/bin/"
178178+
179179+RTR3DECL(char *) RTProcGetSuidPath(char *pszExecPath, size_t cbExecPath)
180180+{
+1-1
pkgs/build-support/build-fhs-userenv/env.nix
···5151 export PS1='${name}-chrootenv:\u@\h:\w\$ '
5252 export LOCALE_ARCHIVE='/usr/lib/locale/locale-archive'
5353 export LD_LIBRARY_PATH='/run/opengl-driver/lib:/run/opengl-driver-32/lib:/usr/lib:/usr/lib32'
5454- export PATH='/run/wrappers:/usr/bin:/usr/sbin'
5454+ export PATH='/run/wrappers/bin:/usr/bin:/usr/sbin'
5555 export PKG_CONFIG_PATH=/usr/lib/pkgconfig
56565757 # Force compilers to look in default search paths
+3-3
pkgs/desktops/enlightenment/enlightenment.nix
···4242 # this is a hack and without this cpufreq module is not working. does the following:
4343 # 1. moves the "freqset" binary to "e_freqset",
4444 # 2. linkes "e_freqset" to enlightenment/bin so that,
4545- # 3. wrappers.setuid detects it and places wrappers in /run/wrappers/e_freqset,
4646- # 4. and finally, links /run/wrappers/e_freqset to original destination where enlightenment wants it
4545+ # 3. wrappers.setuid detects it and places wrappers in /run/wrappers/bin/e_freqset,
4646+ # 4. and finally, links /run/wrappers/bin/e_freqset to original destination where enlightenment wants it
4747 postInstall = ''
4848 export CPUFREQ_DIRPATH=`readlink -f $out/lib/enlightenment/modules/cpufreq/linux-gnu-*`;
4949 mv $CPUFREQ_DIRPATH/freqset $CPUFREQ_DIRPATH/e_freqset
5050 ln -sv $CPUFREQ_DIRPATH/e_freqset $out/bin/e_freqset
5151- ln -sv /run/wrappers/e_freqset $CPUFREQ_DIRPATH/freqset
5151+ ln -sv /run/wrappers/bin/e_freqset $CPUFREQ_DIRPATH/freqset
5252 '';
53535454 meta = with stdenv.lib; {
···2323 # Ensure that FUSE calls the setuid wrapper, not
2424 # $out/bin/fusermount. It falls back to calling fusermount in
2525 # $PATH, so it should also work on non-NixOS systems.
2626- export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers\""
2626+ export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\""
27272828 sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c
2929 sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh
···18181919 buildInputs = [ makeWrapper ];
20202121- # Do not hardcode PATH to ${ecryptfs} as we need the script to invoke executables from /run/wrappers
2121+ # Do not hardcode PATH to ${ecryptfs} as we need the script to invoke executables from /run/wrappers/bin
2222 installPhase = ''
2323 mkdir -p $out/bin $out/libexec
2424 cp $src $out/libexec/ecryptfs-helper.py
···2323 #define _PATH_SENDMAIL "${sendmailPath}"
24242525 #undef _PATH_DEFPATH
2626- #define _PATH_DEFPATH "/run/wrappers:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/run/current-system/sw/bin:/run/current-system/sw/sbin:/usr/bin:/bin"
2626+ #define _PATH_DEFPATH "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/run/current-system/sw/bin:/run/current-system/sw/sbin:/usr/bin:/bin"
2727 __EOT__
28282929 # Implicit saved uids do not work here due to way NixOS uses setuid wrappers