mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-24 17:38:02 +00:00
try out catalina fix
This commit is contained in:
parent
9c08345130
commit
9130accbad
2 changed files with 10 additions and 2 deletions
|
@ -27,6 +27,7 @@ function run() {
|
||||||
const home = os_1.homedir();
|
const home = os_1.homedir();
|
||||||
const { username } = os_1.userInfo();
|
const { username } = os_1.userInfo();
|
||||||
const PATH = process.env.PATH;
|
const PATH = process.env.PATH;
|
||||||
|
const INSTALL_PATH = '/opt/nix';
|
||||||
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
|
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
|
||||||
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
||||||
yield exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
|
yield exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
|
||||||
|
@ -35,7 +36,10 @@ function run() {
|
||||||
yield exec.exec("sudo", ["sh", "-c", "echo max-jobs = auto >> /etc/nix/nix.conf"]);
|
yield exec.exec("sudo", ["sh", "-c", "echo max-jobs = auto >> /etc/nix/nix.conf"]);
|
||||||
// Catalina workaround https://github.com/NixOS/nix/issues/2925
|
// Catalina workaround https://github.com/NixOS/nix/issues/2925
|
||||||
if (os_1.type() == "Darwin") {
|
if (os_1.type() == "Darwin") {
|
||||||
yield exec.exec("sudo", ["mount", "-uw", "/"]);
|
yield exec.exec("sudo", ["sh", "-c", `echo \"nix\t${INSTALL_PATH}\" >> /etc/synthetic.conf`]);
|
||||||
|
yield exec.exec("sudo", ["sh", "-c", `mkdir -m 0755 ${INSTALL_PATH} && chown runner ${INSTALL_PATH}`]);
|
||||||
|
yield exec.exec("/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util", ["-B"]);
|
||||||
|
core.exportVariable('NIX_IGNORE_SYMLINK_STORE', "1");
|
||||||
}
|
}
|
||||||
// TODO: retry due to all the things that go wrong
|
// TODO: retry due to all the things that go wrong
|
||||||
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
|
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
|
||||||
|
|
|
@ -9,6 +9,7 @@ async function run() {
|
||||||
const home = homedir();
|
const home = homedir();
|
||||||
const {username} = userInfo();
|
const {username} = userInfo();
|
||||||
const PATH = process.env.PATH;
|
const PATH = process.env.PATH;
|
||||||
|
const INSTALL_PATH = '/opt/nix';
|
||||||
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
|
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
|
||||||
|
|
||||||
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
|
||||||
|
@ -20,7 +21,10 @@ async function run() {
|
||||||
|
|
||||||
// Catalina workaround https://github.com/NixOS/nix/issues/2925
|
// Catalina workaround https://github.com/NixOS/nix/issues/2925
|
||||||
if (type() == "Darwin") {
|
if (type() == "Darwin") {
|
||||||
await exec.exec("sudo", ["mount", "-uw", "/"]);
|
await exec.exec("sudo", ["sh", "-c", `echo \"nix\t${INSTALL_PATH}\" >> /etc/synthetic.conf`]);
|
||||||
|
await exec.exec("sudo", ["sh", "-c", `mkdir -m 0755 ${INSTALL_PATH} && chown runner ${INSTALL_PATH}`]);
|
||||||
|
await exec.exec("/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util", ["-B"]);
|
||||||
|
core.exportVariable('NIX_IGNORE_SYMLINK_STORE', "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: retry due to all the things that go wrong
|
// TODO: retry due to all the things that go wrong
|
||||||
|
|
Loading…
Reference in a new issue