Browse Source

Expose prev-overlay nixpkgs to genodePackages

master
Emery Hemingway 3 months ago
parent
commit
ae591f0faf
  1. 5
      overlay/default.nix
  2. 13
      packages/default.nix
  3. 25
      packages/genodelabs/default.nix
  4. 4
      packages/genodelabs/ports.nix

5
overlay/default.nix

@ -100,10 +100,7 @@ in nullPkgs // {
genodePackages =
# The Genode-only packages.
import ../packages {
inherit flake;
pkgs = final;
};
import ../packages { inherit final prev; };
grub2 =
# No need for a Genode build of GRUB.

13
packages/default.nix

@ -1,16 +1,17 @@
{ flake, pkgs }:
{ final, prev }:
let
upstream = import ./genodelabs { inherit flake pkgs; };
upstream = import ./genodelabs { inherit final prev; };
inherit (upstream) genodeSources;
inherit (pkgs) buildPackages callPackage fetchFromGitHub;
inherit (final) callPackage;
inherit (prev) buildPackages;
dhallPackages =
flake.inputs.nixpkgs.legacyPackages.x86_64-linux.callPackage ./dhall { };
buildPackages.callPackage ./dhall { };
buildDepotWorld = let
genodeWorld = fetchFromGitHub {
genodeWorld = prev.fetchFromGitHub {
owner = "genodelabs";
repo = "genode-world";
rev = "0ed545e55a90c39df23a86eb733961de71d56241";
@ -51,7 +52,7 @@ in upstream // {
portInputs = with genodeSources.ports; [ libc libssh openssl zlib ];
};
worldSources = buildPackages.fetchFromGitHub {
worldSources = prev.fetchFromGitHub {
owner = "genodelabs";
repo = "genode-world";
rev = "521f9fb5a66b18441f53a96e3993a84b772f27e5";

25
packages/genodelabs/default.nix

@ -1,9 +1,10 @@
{ flake, pkgs }:
{ final, prev }:
let
inherit (pkgs) lib buildPackages;
inherit (final) lib;
inherit (prev.buildPackages) buildPackages;
platform = pkgs.targetPlatform;
platform = final.targetPlatform;
arch = with platform;
if isx86_64 then
@ -16,7 +17,7 @@ let
upstreamSources =
# This is where the Genode source tree is defined.
# Must be updated with ./patches/sources.patch.
pkgs.fetchFromGitHub {
buildPackages.fetchFromGitHub {
owner = "genodelabs";
repo = "genode";
rev = "sculpt-21.03";
@ -137,9 +138,8 @@ let
# The "ports" mechanism is hardly deterministic, so prepare with
# a pinned nixpkgs revision for a pinned platform for consistency.
lib.mapAttrs preparePort (import ./ports.nix {
pkgs = flake.inputs.nixpkgs.legacyPackages.x86_64-linux // {
inherit (pkgs) genodePackages;
};
pkgs = buildPackages;
inherit (final.genodePackages) worldSources;
});
toolchain =
@ -149,7 +149,7 @@ let
stdenv' =
# Special stdenv for use within the upstream sources.
# TODO: build with Clang.
pkgs.stdenvAdapters.overrideCC pkgs.stdenv toolchain;
final.stdenvAdapters.overrideCC final.stdenv toolchain;
buildUpstream =
# Build from the Genode sources using the least recursive make.
@ -297,8 +297,8 @@ let
# Build everything in ./make-targets.nix.
let
overrides = import ./make-targets.nix {
inherit (pkgs) buildPackages genodePackages;
inherit ports;
inherit (final) genodePackages;
inherit buildPackages ports;
};
in lib.attrsets.mapAttrs
(name: value: (buildUpstream ({ inherit name; } // value))) overrides;
@ -307,9 +307,8 @@ let
# Build everything in ./depot-targets.nix.
(name: value: (buildDepot ({ inherit name; } // value)))
(import ./depot-targets.nix {
inherit (pkgs) genodePackages;
inherit ports;
buildPackages = buildPackages.buildPackages;
inherit (final) genodePackages;
inherit buildPackages ports;
});
specs = with platform;

4
packages/genodelabs/ports.nix

@ -1,7 +1,7 @@
# This file specifies the output hashes of "Ports".
# Ports not listed here can still be prepared, but will result in a hash mismatch.
{ pkgs }:
{ pkgs, worldSources }:
with pkgs;
{
@ -66,7 +66,7 @@ with pkgs;
};
x86emu.hash = "sha256-QY6OL+cDVjQ67JItP1rS4ufPRGZf43AZtWxwza/0q0w=";
xkcp = {
extraRepos = [ genodePackages.worldSources ];
extraRepos = [ worldSources ];
hash = "sha256-oB7oFikCFnEtB/ZlV7Gayw3wNa0BU/vi7O5gfzeFGLg=";
nativeBuildInputs = [ libxslt ];
version = "cafc03";

Loading…
Cancel
Save