mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
pkgsx86_64Darwin: move behind allowVariants
This is already not used in-tree, so should be a variant.
This commit is contained in:
@@ -280,28 +280,6 @@ 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
|
||||
pkgsx86_64Darwin =
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
nixpkgsFun {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
pkgsx86_64Darwin = super';
|
||||
})
|
||||
]
|
||||
++ overlays;
|
||||
localSystem = {
|
||||
config = lib.systems.parse.tripleFromSystem (
|
||||
stdenv.hostPlatform.parsed
|
||||
// {
|
||||
cpu = lib.systems.parse.cpuTypes.x86_64;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
else
|
||||
throw "x86_64 Darwin package set can only be used on Darwin systems.";
|
||||
|
||||
# If already linux: the same package set unaltered
|
||||
# Otherwise, return a natively built linux package set for the current cpu architecture string.
|
||||
# (ABI and other details will be set to the default for the cpu/os pair)
|
||||
|
||||
@@ -90,6 +90,28 @@ self: super: {
|
||||
else
|
||||
throw "Musl libc only supports 64-bit Linux systems.";
|
||||
|
||||
# x86_64-darwin packages for aarch64-darwin users to use with Rosetta for incompatible packages
|
||||
pkgsx86_64Darwin =
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
nixpkgsFun {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
pkgsx86_64Darwin = super';
|
||||
})
|
||||
]
|
||||
++ overlays;
|
||||
localSystem = {
|
||||
config = lib.systems.parse.tripleFromSystem (
|
||||
stdenv.hostPlatform.parsed
|
||||
// {
|
||||
cpu = lib.systems.parse.cpuTypes.x86_64;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
else
|
||||
throw "x86_64 Darwin package set can only be used on Darwin systems.";
|
||||
|
||||
# Full package set with rocm on cuda off
|
||||
# Mostly useful for asserting pkgs.pkgsRocm.torchWithRocm == pkgs.torchWithRocm and similar
|
||||
pkgsRocm = nixpkgsFun ({
|
||||
|
||||
Reference in New Issue
Block a user