forked from lix-project/lix
Merge branch 'macOS' of https://github.com/davidak/nix
This commit is contained in:
commit
a2778988f2
|
@ -262,7 +262,7 @@ false</literal>.</para>
|
||||||
system (except that fixed-output derivations do not run in private
|
system (except that fixed-output derivations do not run in private
|
||||||
network namespace to ensure they can access the network).</para>
|
network namespace to ensure they can access the network).</para>
|
||||||
|
|
||||||
<para>Currently, sandboxing only work on Linux and Mac OS X. The use
|
<para>Currently, sandboxing only work on Linux and macOS. The use
|
||||||
of a sandbox requires that Nix is run as root (so you should use
|
of a sandbox requires that Nix is run as root (so you should use
|
||||||
the <link linkend='conf-build-users-group'>“build users”
|
the <link linkend='conf-build-users-group'>“build users”
|
||||||
feature</link> to perform the actual builds under different users
|
feature</link> to perform the actual builds under different users
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<title>Installing a Binary Distribution</title>
|
<title>Installing a Binary Distribution</title>
|
||||||
|
|
||||||
<para>If you are using Linux or Mac OS X, the easiest way to install
|
<para>If you are using Linux or macOS, the easiest way to install
|
||||||
Nix is to run the following command:
|
Nix is to run the following command:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
|
@ -39,7 +39,7 @@ behaviour.
|
||||||
<!--
|
<!--
|
||||||
<para>You can also manually download and install a binary package.
|
<para>You can also manually download and install a binary package.
|
||||||
Binary packages of the latest stable release are available for Fedora,
|
Binary packages of the latest stable release are available for Fedora,
|
||||||
Debian, Ubuntu, Mac OS X and various other systems from the <link
|
Debian, Ubuntu, macOS and various other systems from the <link
|
||||||
xlink:href="http://nixos.org/nix/download.html">Nix homepage</link>.
|
xlink:href="http://nixos.org/nix/download.html">Nix homepage</link>.
|
||||||
You can also get builds of the latest development release from our
|
You can also get builds of the latest development release from our
|
||||||
<link
|
<link
|
||||||
|
|
|
@ -52,7 +52,7 @@ This creates 10 build users. There can never be more concurrent builds
|
||||||
than the number of build users, so you may want to increase this if
|
than the number of build users, so you may want to increase this if
|
||||||
you expect to do many builds at the same time.</para>
|
you expect to do many builds at the same time.</para>
|
||||||
|
|
||||||
<para>On Mac OS X, you can create the required group and users by
|
<para>On macOS, you can create the required group and users by
|
||||||
running the following script:
|
running the following script:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<listitem><para>Linux (i686, x86_64).</para></listitem>
|
<listitem><para>Linux (i686, x86_64).</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Mac OS X (x86_64).</para></listitem>
|
<listitem><para>macOS (x86_64).</para></listitem>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<listitem><para>FreeBSD (only tested on Intel).</para></listitem>
|
<listitem><para>FreeBSD (only tested on Intel).</para></listitem>
|
||||||
|
|
|
@ -236,7 +236,7 @@ href="[%root%]hydra">a continuous build system</a>.</para>
|
||||||
|
|
||||||
<simplesect><title>Portability</title>
|
<simplesect><title>Portability</title>
|
||||||
|
|
||||||
<para>Nix runs on Linux and Mac OS X.</para>
|
<para>Nix runs on Linux and macOS.</para>
|
||||||
|
|
||||||
</simplesect>
|
</simplesect>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ int main (int argc, char * * argv)
|
||||||
settings.builders = argv[5];
|
settings.builders = argv[5];
|
||||||
|
|
||||||
/* It would be more appropriate to use $XDG_RUNTIME_DIR, since
|
/* It would be more appropriate to use $XDG_RUNTIME_DIR, since
|
||||||
that gets cleared on reboot, but it wouldn't work on OS X. */
|
that gets cleared on reboot, but it wouldn't work on macOS. */
|
||||||
currentLoad = settings.nixStateDir + "/current-load";
|
currentLoad = settings.nixStateDir + "/current-load";
|
||||||
|
|
||||||
std::shared_ptr<Store> sshStore;
|
std::shared_ptr<Store> sshStore;
|
||||||
|
|
|
@ -98,14 +98,14 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa
|
||||||
throw SysError(format("getting attributes of path '%1%'") % path);
|
throw SysError(format("getting attributes of path '%1%'") % path);
|
||||||
|
|
||||||
#if __APPLE__
|
#if __APPLE__
|
||||||
/* HFS/OS X has some undocumented security feature disabling hardlinking for
|
/* HFS/macOS has some undocumented security feature disabling hardlinking for
|
||||||
special files within .app dirs. *.app/Contents/PkgInfo and
|
special files within .app dirs. *.app/Contents/PkgInfo and
|
||||||
*.app/Contents/Resources/\*.lproj seem to be the only paths affected. See
|
*.app/Contents/Resources/\*.lproj seem to be the only paths affected. See
|
||||||
https://github.com/NixOS/nix/issues/1443 for more discussion. */
|
https://github.com/NixOS/nix/issues/1443 for more discussion. */
|
||||||
|
|
||||||
if (std::regex_search(path, std::regex("\\.app/Contents/PkgInfo$")) ||
|
if (std::regex_search(path, std::regex("\\.app/Contents/PkgInfo$")) ||
|
||||||
std::regex_search(path, std::regex("\\.app/Contents/Resources/.+\\.lproj$"))) {
|
std::regex_search(path, std::regex("\\.app/Contents/Resources/.+\\.lproj$"))) {
|
||||||
debug(format("'%1%' is not allowed to be linked in OS X") % path);
|
debug(format("'%1%' is not allowed to be linked in macOS") % path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -72,7 +72,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter)
|
||||||
else if (S_ISDIR(st.st_mode)) {
|
else if (S_ISDIR(st.st_mode)) {
|
||||||
sink << "type" << "directory";
|
sink << "type" << "directory";
|
||||||
|
|
||||||
/* If we're on a case-insensitive system like Mac OS X, undo
|
/* If we're on a case-insensitive system like macOS, undo
|
||||||
the case hack applied by restorePath(). */
|
the case hack applied by restorePath(). */
|
||||||
std::map<string, string> unhacked;
|
std::map<string, string> unhacked;
|
||||||
for (auto & i : readDirectory(path))
|
for (auto & i : readDirectory(path))
|
||||||
|
|
Loading…
Reference in a new issue