Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ea2148f47cbe
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 512753f8247b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 12, 2020

  1. never use /var/folders for TMPDIR on darwin

    This doesn't just cause problems for nix-store --serve but also results
    in certain build failures. Builds that use unix domain sockets in their
    tests often fail because the /var/folders prefix already consumes more
    than half of the maximum length of socket paths.
    
        struct sockaddr_un {
           sa_family_t sun_family;               /* AF_UNIX */
           char        sun_path[108];            /* Pathname */
        };
    LnL7 committed Apr 12, 2020
    Copy the full SHA
    4d9db42 View commit details
  2. Merge pull request #3488 from LnL7/darwin-tmpdir

    never use /var/folders for TMPDIR on darwin
    edolstra authored Apr 12, 2020
    Copy the full SHA
    512753f View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/libmain/shared.cc
2 changes: 1 addition & 1 deletion src/libmain/shared.cc
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ void initNix()
sshd). This breaks build users because they don't have access
to the TMPDIR, in particular in ‘nix-store --serve’. */
#if __APPLE__
if (getuid() == 0 && hasPrefix(getEnv("TMPDIR").value_or("/tmp"), "/var/folders/"))
if (hasPrefix(getEnv("TMPDIR").value_or("/tmp"), "/var/folders/"))
unsetenv("TMPDIR");
#endif
}