diff options
author | Atemu <atemu.main@gmail.com> | 2022-02-24 12:17:46 +0100 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2022-10-18 16:41:05 +0200 |
commit | 69d7939a6221bf86498488d1f641560b7d5d0a8a (patch) | |
tree | 879187a9a39236df4169afb9419cc6b82be02e37 /pkgs/top-level/stage.nix | |
parent | 48d63e924a2666baf37f4f14a18f19347fbd54a2 (diff) |
pkgsx86Darwin: init
Many packages don't work on aarch64-darwin yet or are x86-only binary packages.
This gives aarch64-darwin users easy access to x86_64-darwin packages to run via
Rosetta 2.
"x86" was used as a short-hand instead of x86_64 because x86_64-darwin is the
only x86 Darwin package set.
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r-- | pkgs/top-level/stage.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 9d34ddb3685f..96ee8cd1265c 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -213,6 +213,18 @@ let }; } else throw "i686 Linux package set can only be used with the x86 family."; + # x86_64-darwin packages for aarch64-darwin users to use with Rosetta for incompatible packages + pkgsx86Darwin = if stdenv.hostPlatform.isDarwin then nixpkgsFun { + overlays = [ (self': super': { + pkgsx86Darwin = super'; + })] ++ overlays; + localSystem = { + parsed = stdenv.hostPlatform.parsed // { + cpu = lib.systems.parse.cpuTypes.x86_64; + }; + }; + } else throw "x86 Darwin package set can only be used on Darwin systems."; + # Extend the package set with zero or more overlays. This preserves # preexisting overlays. Prefer to initialize with the right overlays # in one go when calling Nixpkgs, for performance and simplicity. |