Prepare for Nix 2.3.5

This commit is contained in:
Domen Kožar 2020-05-26 14:34:45 +02:00
parent d3c3fef7d5
commit 642cfa0200
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
4 changed files with 10 additions and 73 deletions

View file

@ -1,20 +1,3 @@
import { execFileSync } from 'child_process';
import { exit } from 'process';
import { createConnection } from 'net';
async function awaitSocket() {
const daemonSocket = createConnection({ path: '/nix/var/nix/daemon-socket/socket' });
daemonSocket.on('error', async () => {
console.log('Waiting for daemon socket to be available, reconnecting...');
await new Promise(resolve => setTimeout(resolve, 500));
await awaitSocket();
});
daemonSocket.on('connect', () => {
exit(0);
});
}
execFileSync(`${__dirname}/install-nix.sh`, { stdio: 'inherit' });
// nc doesn't work correctly on macOS :(
awaitSocket();