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 = legacyPackages = forAllSystems ({ system, localSystem, crossSystem }:
# The nixpkgs.legacyPackages set after overlaying. if builtins.hasAttr system nixpkgs.legacyPackages then
let f = import nixpkgs; nixpkgs.legacyPackages.${system}.appendOverlays overlays
in forAllSystems ({ system, localSystem, crossSystem }: else
if localSystem == crossSystem then import nixpkgs {
nixpkgs.legacyPackages.${system}.appendOverlays overlays inherit localSystem;
else crossSystem = {
f { system = crossSystem;
inherit localSystem; useLLVM = true;
crossSystem = { };
system = crossSystem; config.allowUnsupportedSystem = true;
useLLVM = true; inherit overlays;
}; });
config.allowUnsupportedSystem = true;
inherit overlays;
});
packages = packages =
# Genode native packages, not packages in the traditional # Genode native packages, not packages in the traditional

View File

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