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.
|
||||
|
||||
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:
|
||||
if hostPlatform.isGenode then drv.overrideAttrs f else drv;
|
||||
if stdenv.hostPlatform.isGenode then drv.overrideAttrs f else 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; };
|
||||
|
||||
|
@ -25,7 +25,7 @@ let
|
|||
|
||||
nullPkgs =
|
||||
# Nullify these packages to find problems early.
|
||||
if hostPlatform.isGenode then
|
||||
if stdenv.hostPlatform.isGenode then
|
||||
builtins.listToAttrs (map (name: {
|
||||
inherit name;
|
||||
value = final.hello;
|
||||
|
@ -140,7 +140,7 @@ in nullPkgs // {
|
|||
|
||||
linuxPackages =
|
||||
# Dummy package.
|
||||
if hostPlatform.isGenode then {
|
||||
if stdenv.hostPlatform.isGenode then {
|
||||
extend = _: final.linuxPackages;
|
||||
features = { };
|
||||
kernel = {
|
||||
|
@ -153,7 +153,7 @@ in nullPkgs // {
|
|||
} else
|
||||
prev.linuxPackages;
|
||||
|
||||
llvmPackages = if targetPlatform.isGenode then
|
||||
llvmPackages = if stdenv.targetPlatform.isGenode then
|
||||
final.llvmPackages_11
|
||||
else
|
||||
prev.llvmPackages;
|
||||
|
@ -171,7 +171,7 @@ in nullPkgs // {
|
|||
# Packages from the Nimble flake with adjustments.
|
||||
prev.nimPackages.overrideScope' (final': prev':
|
||||
with final'; {
|
||||
buildNimPackage = if hostPlatform.isGenode then
|
||||
buildNimPackage = if stdenv.hostPlatform.isGenode then
|
||||
({ nimFlags ? [ ], ... }@args:
|
||||
prev'.buildNimPackage (args // {
|
||||
nimBackend = "cpp";
|
||||
|
|
|
@ -4,7 +4,7 @@ let
|
|||
inherit (final) lib;
|
||||
inherit (prev.buildPackages) buildPackages;
|
||||
|
||||
platform = final.targetPlatform;
|
||||
platform = final.stdenv.targetPlatform;
|
||||
|
||||
arch = with platform;
|
||||
if isx86_64 then
|
||||
|
|
|
@ -28,7 +28,7 @@ in stdenv.mkDerivation {
|
|||
configurePhase = with stdenv; ''
|
||||
runHook preConfigure
|
||||
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
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
|
|
@ -23,7 +23,7 @@ let
|
|||
];
|
||||
|
||||
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?
|
||||
{
|
||||
prefix = "hw-pc-";
|
||||
|
|
Loading…
Reference in New Issue