Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
68 lines
1.6 KiB
Nix
68 lines
1.6 KiB
Nix
{ lib, pkgs, ... }:
|
|
let
|
|
nixpkgsFun = import ../../top-level;
|
|
in
|
|
lib.recurseIntoAttrs {
|
|
platformEquality =
|
|
let
|
|
configsLocal = [
|
|
# crossSystem is implicitly set to localSystem.
|
|
{
|
|
localSystem = {
|
|
system = "x86_64-linux";
|
|
};
|
|
}
|
|
{
|
|
localSystem = {
|
|
system = "aarch64-linux";
|
|
};
|
|
crossSystem = null;
|
|
}
|
|
# Both systems explicitly set to the same string.
|
|
{
|
|
localSystem = {
|
|
system = "x86_64-linux";
|
|
};
|
|
crossSystem = {
|
|
system = "x86_64-linux";
|
|
};
|
|
}
|
|
# Vendor and ABI inferred from system double.
|
|
{
|
|
localSystem = {
|
|
system = "aarch64-linux";
|
|
};
|
|
crossSystem = {
|
|
config = "aarch64-unknown-linux-gnu";
|
|
};
|
|
}
|
|
];
|
|
configsCross = [
|
|
# GNU is inferred from double, but config explicitly requests musl.
|
|
{
|
|
localSystem = {
|
|
system = "aarch64-linux";
|
|
};
|
|
crossSystem = {
|
|
config = "aarch64-unknown-linux-musl";
|
|
};
|
|
}
|
|
# Cross-compile from AArch64 to x86-64.
|
|
{
|
|
localSystem = {
|
|
system = "aarch64-linux";
|
|
};
|
|
crossSystem = {
|
|
system = "x86_64-unknown-linux-gnu";
|
|
};
|
|
}
|
|
];
|
|
|
|
pkgsLocal = map nixpkgsFun configsLocal;
|
|
pkgsCross = map nixpkgsFun configsCross;
|
|
in
|
|
assert lib.all (p: p.buildPlatform == p.hostPlatform) pkgsLocal;
|
|
assert lib.all (p: p.buildPlatform != p.hostPlatform) pkgsCross;
|
|
pkgs.emptyFile;
|
|
}
|