Tidy up legacyPackages instantiation

This commit is contained in:
Ehmry - 2022-10-06 14:03:52 -05:00
parent 1c7d71a00f
commit 256fac99ad
2 changed files with 14 additions and 17 deletions

View File

@ -180,22 +180,19 @@
});
legacyPackages =
# The nixpkgs.legacyPackages set after overlaying.
let f = import nixpkgs;
in forAllSystems ({ system, localSystem, crossSystem }:
if localSystem == crossSystem then
nixpkgs.legacyPackages.${system}.appendOverlays overlays
else
f {
inherit localSystem;
crossSystem = {
system = crossSystem;
useLLVM = true;
};
config.allowUnsupportedSystem = true;
inherit overlays;
});
legacyPackages = forAllSystems ({ system, localSystem, crossSystem }:
if builtins.hasAttr system nixpkgs.legacyPackages then
nixpkgs.legacyPackages.${system}.appendOverlays overlays
else
import nixpkgs {
inherit localSystem;
crossSystem = {
system = crossSystem;
useLLVM = true;
};
config.allowUnsupportedSystem = true;
inherit overlays;
});
packages =
# Genode native packages, not packages in the traditional

View File

@ -13,7 +13,7 @@
./qemu-vm.nix
./services
];
nixpkgs = {
nixpkgs = rec {
localSystem.system = "x86_64-linux";
crossSystem.system = "x86_64-genode";
system = localSystem.system + "-" + crossSystem.system;