Deprecate top-level {build,host,target}Platform
This commit is contained in:
parent
b8119305cd
commit
272a141fc1
|
@ -6,13 +6,13 @@ let
|
||||||
# on whether the host or target system is Genode.
|
# on whether the host or target system is Genode.
|
||||||
|
|
||||||
overrideHost = attrs: drv:
|
overrideHost = attrs: drv:
|
||||||
if hostPlatform.isGenode then drv.override attrs else drv;
|
if stdenv.hostPlatform.isGenode then drv.override attrs else drv;
|
||||||
|
|
||||||
overrideAttrsHost = f: drv:
|
overrideAttrsHost = f: drv:
|
||||||
if hostPlatform.isGenode then drv.overrideAttrs f else drv;
|
if stdenv.hostPlatform.isGenode then drv.overrideAttrs f else drv;
|
||||||
|
|
||||||
overrideAttrsTarget = f: drv:
|
overrideAttrsTarget = f: drv:
|
||||||
if targetPlatform.isGenode then drv.overrideAttrs f else drv;
|
if stdenv.targetPlatform.isGenode then drv.overrideAttrs f else drv;
|
||||||
|
|
||||||
addPatches' = patches: attrs: { patches = attrs.patches or [ ] ++ patches; };
|
addPatches' = patches: attrs: { patches = attrs.patches or [ ] ++ patches; };
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ let
|
||||||
|
|
||||||
nullPkgs =
|
nullPkgs =
|
||||||
# Nullify these packages to find problems early.
|
# Nullify these packages to find problems early.
|
||||||
if hostPlatform.isGenode then
|
if stdenv.hostPlatform.isGenode then
|
||||||
builtins.listToAttrs (map (name: {
|
builtins.listToAttrs (map (name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value = final.hello;
|
value = final.hello;
|
||||||
|
@ -140,7 +140,7 @@ in nullPkgs // {
|
||||||
|
|
||||||
linuxPackages =
|
linuxPackages =
|
||||||
# Dummy package.
|
# Dummy package.
|
||||||
if hostPlatform.isGenode then {
|
if stdenv.hostPlatform.isGenode then {
|
||||||
extend = _: final.linuxPackages;
|
extend = _: final.linuxPackages;
|
||||||
features = { };
|
features = { };
|
||||||
kernel = {
|
kernel = {
|
||||||
|
@ -153,7 +153,7 @@ in nullPkgs // {
|
||||||
} else
|
} else
|
||||||
prev.linuxPackages;
|
prev.linuxPackages;
|
||||||
|
|
||||||
llvmPackages = if targetPlatform.isGenode then
|
llvmPackages = if stdenv.targetPlatform.isGenode then
|
||||||
final.llvmPackages_11
|
final.llvmPackages_11
|
||||||
else
|
else
|
||||||
prev.llvmPackages;
|
prev.llvmPackages;
|
||||||
|
@ -171,7 +171,7 @@ in nullPkgs // {
|
||||||
# Packages from the Nimble flake with adjustments.
|
# Packages from the Nimble flake with adjustments.
|
||||||
prev.nimPackages.overrideScope' (final': prev':
|
prev.nimPackages.overrideScope' (final': prev':
|
||||||
with final'; {
|
with final'; {
|
||||||
buildNimPackage = if hostPlatform.isGenode then
|
buildNimPackage = if stdenv.hostPlatform.isGenode then
|
||||||
({ nimFlags ? [ ], ... }@args:
|
({ nimFlags ? [ ], ... }@args:
|
||||||
prev'.buildNimPackage (args // {
|
prev'.buildNimPackage (args // {
|
||||||
nimBackend = "cpp";
|
nimBackend = "cpp";
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
inherit (final) lib;
|
inherit (final) lib;
|
||||||
inherit (prev.buildPackages) buildPackages;
|
inherit (prev.buildPackages) buildPackages;
|
||||||
|
|
||||||
platform = final.targetPlatform;
|
platform = final.stdenv.targetPlatform;
|
||||||
|
|
||||||
arch = with platform;
|
arch = with platform;
|
||||||
if isx86_64 then
|
if isx86_64 then
|
||||||
|
|
|
@ -28,7 +28,7 @@ in stdenv.mkDerivation {
|
||||||
configurePhase = with stdenv; ''
|
configurePhase = with stdenv; ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
sh configure.sh
|
sh configure.sh
|
||||||
${lib.optionalString (hostPlatform.isAarch64) "rm -fr tests/test_fpu"}
|
${lib.optionalString (stdenv.hostPlatform.isAarch64) "rm -fr tests/test_fpu"}
|
||||||
rm -fr tests/test_tls
|
rm -fr tests/test_tls
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -23,7 +23,7 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
core = builtins.filter (core:
|
core = builtins.filter (core:
|
||||||
builtins.any (x: x == testPkgs.hostPlatform.system) core.platforms) [
|
builtins.any (x: x == testPkgs.stdenv.hostPlatform.system) core.platforms) [
|
||||||
/* # Need to fix the QEMU boot parameters?
|
/* # Need to fix the QEMU boot parameters?
|
||||||
{
|
{
|
||||||
prefix = "hw-pc-";
|
prefix = "hw-pc-";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user