diff --git a/flake.nix b/flake.nix index 39c5624..4932771 100644 --- a/flake.nix +++ b/flake.nix @@ -35,23 +35,6 @@ crossSystem = system; })); - nixpkgsFor = forAllSystems ({ system, localSystem, crossSystem }: - if localSystem == crossSystem then - import nixpkgs { - inherit system; - overlays = [ self.overlay nimble.overlay ]; - } - else - import nixpkgs { - inherit localSystem; - crossSystem = { - system = crossSystem; - useLLVM = true; - }; - config.allowUnsupportedSystem = true; - overlays = [ self.overlay nimble.overlay ]; - }); - in rec { overlay = @@ -164,19 +147,33 @@ }); - legacyPackages = - # The nixpkgs.legacyPackages after overlaying - # and with some additional Genode packages - forAllSystems - ({ system, localSystem, crossSystem }: nixpkgsFor.${system}); - # pass thru Nixpkgs + /* The nixpkgs.legacyPackages after overlaying + and with some additional Genode packages. + */ + legacyPackages = let f = import nixpkgs; + in forAllSystems ({ system, localSystem, crossSystem }: + if localSystem == crossSystem then + f { + inherit system; + overlays = [ self.overlay nimble.overlay ]; + } + else + f { + inherit localSystem; + crossSystem = { + system = crossSystem; + useLLVM = true; + }; + config.allowUnsupportedSystem = true; + overlays = [ self.overlay nimble.overlay ]; + }); packages = # Genode native packages, not packages in the traditional # sense in that these cannot be installed within a profile forAllCrossSystems ({ system, localSystem, crossSystem }: nixpkgs.lib.filterAttrs (n: v: v != null) - nixpkgsFor.${system}.genodePackages); + self.legacyPackages.${system}.genodePackages); devShell = # Development shell for working with the @@ -232,7 +229,7 @@ inherit system localSystem crossSystem; pkgs = self.legacyPackages.${system}; } // { - ports = nixpkgsFor.${localSystem}.symlinkJoin { + ports = self.legacyPackages.${localSystem}.symlinkJoin { name = "ports"; paths = (builtins.attrValues self.packages.${system}.genodeSources.ports);