refactor: default host and target platforms based on build
This commit is contained in:
parent
1f7ae040bc
commit
5d5596139d
70 changed files with 15 additions and 138 deletions
|
|
@ -324,11 +324,13 @@ in
|
|||
host = lib.options.create {
|
||||
description = "The host platform for the package.";
|
||||
type = lib.types.string;
|
||||
default.value = "@build";
|
||||
};
|
||||
|
||||
target = lib.options.create {
|
||||
description = "The target platform for the package.";
|
||||
type = lib.types.string;
|
||||
default.value = "@host";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -705,7 +707,19 @@ in
|
|||
|
||||
platform =
|
||||
let
|
||||
initial = builtins.head config.platforms;
|
||||
initial =
|
||||
if
|
||||
builtins.any (
|
||||
x: x.build == "x86_64-linux" && x.host == "x86_64-linux" && x.target == "x86_64-linux"
|
||||
) config.platforms
|
||||
then
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
else
|
||||
builtins.head config.platforms;
|
||||
in
|
||||
{
|
||||
build = lib.options.create {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -29,12 +29,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -67,13 +67,11 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@linux";
|
||||
}
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "x86_64-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ in
|
|||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -31,12 +31,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -35,12 +35,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
|
|
@ -86,12 +86,10 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -81,12 +81,10 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -83,12 +83,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -76,8 +76,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
|
|
@ -36,12 +36,9 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
dynamicLinker = package.dynamicLinker;
|
||||
|
|
|
|||
|
|
@ -36,12 +36,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "x86_64-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ in
|
|||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -33,12 +33,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,12 +28,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -28,17 +28,13 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
{
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@linux";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -30,12 +30,10 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
target = "@host";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
host = "@build";
|
||||
target = "@build";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue