Merge pull request #41 from puffnfresh/patch-2

This commit is contained in:
zowoq 2023-02-06 19:56:53 +10:00 committed by GitHub
commit 9a64fee2b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,35 @@
*__You should look at the
[darwin.builder](https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder),
which is now part of nixpkgs.__*
linuxkit-nix was started in 2017 when QEMU did not support macOS'
Hypervisor.framework API. This meant that QEMU had to use full
emulation with no hardware acceleration. Not ideal for building large
software.
QEMU also had some issues on macOS with userspace networking.
At the time, LinuxKit was the easiest way to spin up a VM for builds,
because it spun up HyperKit for hardware accelerated virtualisation
and VPNKit for userspace networking - both used in Docker for Mac.
Theoretically the underlying technology was stable but it was bit
tricky to get everything working well together. There were
bootstrapping issues. For example, we had to be careful when
referencing `linux-x86_64` packages because we were on `darwin-x86_64`
and it could only fetch from Hydra - it couldn't even build a custom
shell script for the Linux VM until we got that initial VM running.
This project also had issues with daemons, permissions and race
conditions.
In 2018, QEMU got experimental support for Hypervisor.framework and
that got promoted to stable in 2019. QEMU is now fast and since
nixpkgs has great support for building and running QEMU virtual
machines, there's little need for this project.
---
# LinuxKit Nix - Linux on Mac Nix builder
[hydra jobset](https://hydra.nixos.org/jobset/linux-on-mac-builder/master)