Expand Genode packages within overlay

Move the expansion of the Genode specific packages to the overlay as
nixpkgs.genodePackages and expose this as outputs.packages. This allows
access to offsets like buildPackages.genodePackages or
targetPackages.genodePackages.
This commit is contained in:
Emery Hemingway 2020-04-02 12:36:18 +05:30
parent 585836fdfa
commit be75518e61
3 changed files with 14 additions and 9 deletions

View File

@ -70,7 +70,7 @@
# pass thru Nixpkgs
packages = forAllCrossSystems ({ system, localSystem, crossSystem }:
import ./packages { nixpkgs = nixpkgsFor.${system}; });
nixpkgsFor.${system}.genodePackages);
devShell = forAllLocalSystems (system:
let

View File

@ -24,7 +24,11 @@ with prev; {
});
inherit (final.genodeSources) genodeBase;
genodeLibcCross = callPackage ./libc { stdenv = crossLibcStdenv; };
genodePackages = import ../packages { nixpkgs = final; };
genodeSources = buildPackages.callPackage ./genode { };
libcCrossChooser = name:

View File

@ -3,13 +3,14 @@
{ nixpkgs }:
let
inherit (nixpkgs) callPackage genodeSources;
inherit (nixpkgs)
buildPackages callPackage fetchFromGitHub fetchgit genodeSources stdenv;
inherit (genodeSources) buildUpstream;
dhallPackages = nixpkgs.buildPackages.callPackage ./dhall { };
dhallPackages = buildPackages.callPackage ./dhall { };
buildWorld = let
genodeWorld = nixpkgs.fetchFromGitHub {
genodeWorld = fetchFromGitHub {
owner = "genodelabs";
repo = "genode-world";
rev = "0ed545e55a90c39df23a86eb733961de71d56241";
@ -24,7 +25,7 @@ let
genodeTupRules = ./Tuprules.tup;
in rec {
inherit (nixpkgs) stdenv genodeSources;
inherit stdenv genodeSources;
base-hw-pc = buildUpstream {
name = "base-hw-pc";
@ -49,7 +50,7 @@ in rec {
mv $out/ld-linux.lib.so $out/lib/ld.lib.so
mv $out/linux_timer_drv $out/timer_drv
'';
HOST_INC_DIR = nixpkgs.buildPackages.glibc.dev + "/include";
HOST_INC_DIR = buildPackages.glibc.dev + "/include";
};
base-nova = buildUpstream {
@ -64,7 +65,7 @@ in rec {
'';
};
init = nixpkgs.genodeSources.make "init";
init = genodeSources.make "init";
ssh_client = buildWorld {
name = "ssh_client";
@ -72,10 +73,10 @@ in rec {
portInputs = with genodeSources.ports; [ libc libssh openssl zlib ];
};
bender = nixpkgs.buildPackages.callPackage ./bender { };
bender = buildPackages.callPackage ./bender { };
block_router = let
src = nixpkgs.fetchgit {
src = fetchgit {
url = "https://git.sr.ht/~ehmry/block_router";
rev = "dd78a4824bbc28c5760fda55e9d5dd23cbee8ecf";
sha256 = "1444nfgbgqggmyhjh81aac3mwixh7h6m1qmk8ikinf8gnl9mbngx";