2
0
Fork 0

Prepare ports using x86_64-linux nixpkgs

This commit is contained in:
Ehmry - 2020-10-22 19:58:10 +02:00
parent 1168611109
commit 839f66e2de
5 changed files with 29 additions and 17 deletions

View File

@ -58,7 +58,7 @@
overlay = overlay =
# Overlay of fixes applied to Nixpkgs # Overlay of fixes applied to Nixpkgs
import ./overlay genode; import ./overlay { flake = self; };
lib = lib =
# Local utilities merged with the Nixpkgs lib # Local utilities merged with the Nixpkgs lib

View File

@ -1,5 +1,7 @@
upstreamSources: final: prev: { flake }:
final: prev:
with prev; with prev;
let let
overrideHost = drv: attrs: overrideHost = drv: attrs:
if hostPlatform.isGenode then drv.override attrs else drv; if hostPlatform.isGenode then drv.override attrs else drv;
@ -62,12 +64,14 @@ in {
genodeLibcCross = callPackage ./libc { }; genodeLibcCross = callPackage ./libc { };
genodePackages = import ../packages { nixpkgs = final; }; genodePackages = import ../packages {
inherit flake;
genodeSources = buildPackages.callPackage ../packages/genodelabs { nixpkgs = final;
inherit upstreamSources;
}; };
genodeSources =
buildPackages.callPackage ../packages/genodelabs { inherit flake; };
libcCrossChooser = name: libcCrossChooser = name:
if stdenv.targetPlatform.isGenode then if stdenv.targetPlatform.isGenode then
targetPackages.genodeLibcCross targetPackages.genodeLibcCross

View File

@ -1,11 +1,12 @@
{ nixpkgs }: { flake, nixpkgs }:
let let
inherit (nixpkgs) inherit (nixpkgs)
buildPackages callPackage fetchFromGitHub fetchgit genodeSources stdenv; buildPackages callPackage fetchFromGitHub fetchgit genodeSources stdenv;
inherit (genodeSources) buildUpstream; inherit (genodeSources) buildUpstream;
dhallPackages = buildPackages.callPackage ./dhall { }; dhallPackages =
flake.inputs.nixpkgs.legacyPackages.x86_64-linux.callPackage ./dhall { };
buildDepotWorld = let buildDepotWorld = let
genodeWorld = fetchFromGitHub { genodeWorld = fetchFromGitHub {

View File

@ -1,4 +1,4 @@
{ upstreamSources, buildPackages, targetPackages }: { flake, buildPackages, targetPackages }:
let let
platform = targetPackages.targetPlatform; platform = targetPackages.targetPlatform;
@ -13,6 +13,8 @@ let
inherit (buildPackages) callPackage fetchurl lib; inherit (buildPackages) callPackage fetchurl lib;
upstreamSources = flake.inputs.genode;
genodeSources = genodeSources =
# The Genode source repository # The Genode source repository
let let
@ -113,8 +115,11 @@ let
dontFixup = true; dontFixup = true;
}); });
ports = ports = lib.mapAttrs preparePort (import ./ports.nix {
lib.mapAttrs preparePort (import ./ports.nix { inherit buildPackages; }); pkgs = flake.inputs.nixpkgs.legacyPackages.x86_64-linux;
});
# The "ports" mechanism is hardly deterministic, so prepare with
# a pinned nixpkgs revision for a pinned platform.
toolchain = callPackage ./toolchain.nix { }; toolchain = callPackage ./toolchain.nix { };

View File

@ -1,15 +1,17 @@
# This file specifies the output hashes of "Ports". # This file specifies the output hashes of "Ports".
# Ports not listed here can still be prepared, but will result in a hash mismatch. # Ports not listed here can still be prepared, but will result in a hash mismatch.
{ buildPackages }: { pkgs }:
with buildPackages; { with pkgs;
{
binutils = { binutils = {
hash = "sha256-5JpEsIAe3GOZVb8kTMlfhmzku+aGs4/BttMu4xLsnsI="; hash = "sha256-ERzYT3TjbK3fzRVN1UE7RM6XiPPeMKzkeulKx5IQa2o=";
nativeBuildInputs = [ autoconf ]; nativeBuildInputs = [ autoconf ];
}; };
dde_bsd.hash = "sha256-Z2piyoOrNmXyEEp+kX5w/q4JTylYdSOocUrFeqjz13A="; dde_bsd.hash = "sha256-Z2piyoOrNmXyEEp+kX5w/q4JTylYdSOocUrFeqjz13A=";
dde_ipxe.hash = "sha256-NJ129+DkxFg1fFHJBABBFRRjqEVNSz6v2hEB80AuEM4="; dde_ipxe.hash = "sha256-NJ129+DkxFg1fFHJBABBFRRjqEVNSz6v2hEB80AuEM4=";
dde_linux.hash = "sha256-aUp90z8dtn48QNUqGe1b08RzbESFmCJl7ECZf+lr0rg="; dde_linux.hash = "sha256-xHAgeKfArgMGKCGHi0762qkUcY97vbiAQYjM/ZRXCes=";
dde_rump = { dde_rump = {
hash = "sha256-Wr5otGkWEa+5xImsFHQzwap5LckNEbyWA/7xbNcOreI="; hash = "sha256-Wr5otGkWEa+5xImsFHQzwap5LckNEbyWA/7xbNcOreI=";
nativeBuildInputs = [ subversion ]; nativeBuildInputs = [ subversion ];
@ -17,7 +19,7 @@ with buildPackages; {
}; };
expat.hash = "sha256-KpeM2ySmf+Ojx1mAj9n8lfX7iHaa7w5MPPKZcn4GpTc="; expat.hash = "sha256-KpeM2ySmf+Ojx1mAj9n8lfX7iHaa7w5MPPKZcn4GpTc=";
gcc = { gcc = {
hash = "sha256-ZF9P6xOHvSDN6oq4SN5jOEBBMGgGh6fXyDOgYdXHG1g="; hash = "sha256-1AKjUbh8X5ips8pg0twpBTtc2qCVXGrbifJ/cf3yRcE=";
nativeBuildInputs = [ autoconf264 autogen ]; nativeBuildInputs = [ autoconf264 autogen ];
patches = [ ./gcc-port.patch ]; patches = [ ./gcc-port.patch ];
}; };
@ -27,7 +29,7 @@ with buildPackages; {
jpeg.hash = "sha256-RLVnlrnYGrhqr3Feikoi/BNditCaKN0u3t9/UDpl2wQ="; jpeg.hash = "sha256-RLVnlrnYGrhqr3Feikoi/BNditCaKN0u3t9/UDpl2wQ=";
libc = { libc = {
hash = "sha256-BSZcO25jbH8+OkJWGyJxxVYuQ4Y3yDt0DNsYcITwqxA="; hash = "sha256-BSZcO25jbH8+OkJWGyJxxVYuQ4Y3yDt0DNsYcITwqxA=";
nativeBuildInputs = [ buildPackages.gcc ]; nativeBuildInputs = [ gcc ];
}; };
libiconv.hash = "sha256-25YcW5zo1fE33ZolGQroR+KZO8wHEdN1QXa7+MhwS78="; libiconv.hash = "sha256-25YcW5zo1fE33ZolGQroR+KZO8wHEdN1QXa7+MhwS78=";
libpng.hash = "sha256-hNmSWN4gEk4UIjzkGD4j5qFooMCVXLwcBeOeFumvh+4="; libpng.hash = "sha256-hNmSWN4gEk4UIjzkGD4j5qFooMCVXLwcBeOeFumvh+4=";