chore: format code

This commit is contained in:
Jake Hamilton 2025-03-11 22:47:02 -07:00
parent a17ac0ff2b
commit 397419d8ab
Signed by: jakehamilton
GPG key ID: 9762169A1B35EA68
17 changed files with 511 additions and 501 deletions

6
.editorconfig Normal file
View file

@ -0,0 +1,6 @@
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2

View file

@ -30,7 +30,9 @@ lib: {
process currentPath values process currentPath values
); );
in in
process [ ] [ process
[ ]
[
x x
y y
]; ];

View file

@ -75,7 +75,10 @@ in
"entries.between" = "entries.between" =
let let
expected = true; expected = true;
graph = lib.dag.entries.between "example" [ ] [ ] [ graph =
lib.dag.entries.between "example" [ ]
[ ]
[
null null
null null
]; ];
@ -97,7 +100,10 @@ in
"entries.before" = "entries.before" =
let let
expected = true; expected = true;
graph = lib.dag.entries.before "example" [ ] [ graph =
lib.dag.entries.before "example"
[ ]
[
null null
null null
]; ];
@ -108,7 +114,10 @@ in
"entries.after" = "entries.after" =
let let
expected = true; expected = true;
graph = lib.dag.entries.after "example" [ ] [ graph =
lib.dag.entries.after "example"
[ ]
[
null null
null null
]; ];

View file

@ -56,7 +56,9 @@ let
if isSingleValue || isComplete then builtins.elemAt values 0 else process currentPath values if isSingleValue || isComplete then builtins.elemAt values 0 else process currentPath values
); );
in in
process [ ] [ process
[ ]
[
x x
y y
]; ];

View file

@ -299,7 +299,10 @@ in
} }
]; ];
}; };
actual = lib.modules.combine [ ] [ actual =
lib.modules.combine
[ ]
[
(lib.modules.normalize "/aux/example.nix" "example" { (lib.modules.normalize "/aux/example.nix" "example" {
config = { config = {
x = 1; x = 1;
@ -318,7 +321,10 @@ in
value = 2; value = 2;
} }
]; ];
actual = lib.modules.combine [ ] [ actual =
lib.modules.combine
[ ]
[
(lib.modules.normalize "/aux/example1.nix" "example2" { (lib.modules.normalize "/aux/example1.nix" "example2" {
options = { options = {
x = lib.options.create { }; x = lib.options.create { };

View file

@ -49,18 +49,18 @@ lib: {
## ##
## @type Attrs -> Attrs ## @type Attrs -> Attrs
create = create =
settings@{ name settings@{
, description ? name name,
, fallback ? { } description ? name,
, check ? lib.fp.const true fallback ? { },
, merge ? lib.options.merge.default check ? lib.fp.const true,
, functor ? lib.types.functor name merge ? lib.options.merge.default,
, mergeType ? lib.types.merge functor functor ? lib.types.functor name,
, getSubOptions ? lib.fp.const { } mergeType ? lib.types.merge functor,
, getSubModules ? null getSubOptions ? lib.fp.const { },
, withSubModules ? lib.fp.const null getSubModules ? null,
, children ? { } withSubModules ? lib.fp.const null,
, children ? { },
}: }:
{ {
__type__ = "type"; __type__ = "type";
@ -118,16 +118,13 @@ lib: {
else else
builtins.typeOf value; builtins.typeOf value;
commonType = builtins.foldl' commonType = builtins.foldl' (
(
type: definition: type: definition:
if getType definition.value != type then if getType definition.value != type then
builtins.throw "The option `${identifier}` has conflicting definitions in ${serializedFiles}" builtins.throw "The option `${identifier}` has conflicting definitions in ${serializedFiles}"
else else
type type
) ) (getType first.value) definitions;
(getType first.value)
definitions;
mergeStringifiableAttrs = lib.options.merge.one; mergeStringifiableAttrs = lib.options.merge.one;
@ -143,12 +140,10 @@ lib: {
location: definitions: x: location: definitions: x:
let let
resolvedLocation = location ++ [ "<function body>" ]; resolvedLocation = location ++ [ "<function body>" ];
resolvedDefinitions = builtins.map resolvedDefinitions = builtins.map (definition: {
(definition: {
__file__ = definition.__file__; __file__ = definition.__file__;
value = definition.value x; value = definition.value x;
}) }) definitions;
definitions;
in in
lib.types.any.merge resolvedLocation resolvedDefinitions; lib.types.any.merge resolvedLocation resolvedDefinitions;
@ -205,8 +200,7 @@ lib: {
## @type Int -> Int -> Attrs ## @type Int -> Int -> Attrs
between = between =
start: end: start: end:
assert lib.errors.trace assert lib.errors.trace (
(
start <= end start <= end
) "lib.types.ints.between start must be less than or equal to end"; ) "lib.types.ints.between start must be less than or equal to end";
lib.types.withCheck lib.types.int (value: value >= start && value <= end) lib.types.withCheck lib.types.int (value: value >= start && value <= end)
@ -323,8 +317,7 @@ lib: {
## @type Int -> Int -> Attrs ## @type Int -> Int -> Attrs
between = between =
start: end: start: end:
assert lib.errors.trace assert lib.errors.trace (
(
start <= end start <= end
) "lib.types.numbers.between start must be less than or equal to end"; ) "lib.types.numbers.between start must be less than or equal to end";
lib.types.withCheck lib.types.number (value: value >= start && value <= end) lib.types.withCheck lib.types.number (value: value >= start && value <= end)
@ -486,12 +479,10 @@ lib: {
let let
normalize = normalize =
definition: definition:
builtins.mapAttrs builtins.mapAttrs (name: value: {
(name: value: {
__file__ = definition.__file__; __file__ = definition.__file__;
value = value; value = value;
}) }) definition.value;
definition.value;
normalized = builtins.map normalize definitions; normalized = builtins.map normalize definitions;
zipper = zipper =
name: definitions: (lib.options.merge.definitions (location ++ [ name ]) type definitions).optional; name: definitions: (lib.options.merge.definitions (location ++ [ name ]) type definitions).optional;
@ -528,12 +519,10 @@ lib: {
let let
normalize = normalize =
definition: definition:
builtins.mapAttrs builtins.mapAttrs (name: value: {
(name: value: {
__file__ = definition.__file__; __file__ = definition.__file__;
value = value; value = value;
}) }) definition.value;
definition.value;
normalized = builtins.map normalize definitions; normalized = builtins.map normalize definitions;
zipper = zipper =
name: definitions: name: definitions:
@ -616,15 +605,14 @@ lib: {
merge = merge =
location: definitions: location: definitions:
let let
result = lib.lists.mapWithIndex1 result = lib.lists.mapWithIndex1 (
(
i: definition: i: definition:
lib.lists.mapWithIndex1 lib.lists.mapWithIndex1 (
(
j: value: j: value:
let let
resolved = resolved =
lib.options.merge.definitions (location ++ [ "[definition ${builtins.toString i}-entry ${builtins.toString j}]" ]) lib.options.merge.definitions
(location ++ [ "[definition ${builtins.toString i}-entry ${builtins.toString j}]" ])
type type
[ [
{ {
@ -634,10 +622,8 @@ lib: {
]; ];
in in
resolved.optional resolved.optional
) ) definition.value
definition.value ) definitions;
)
definitions;
merged = lib.lists.flatten result; merged = lib.lists.flatten result;
filtered = builtins.filter (definition: definition ? value) merged; filtered = builtins.filter (definition: definition ? value) merged;
@ -792,11 +778,11 @@ lib: {
## ##
## @type { modules :: List Module, args? :: Attrs, description? :: String | Null, shorthand? :: Bool } -> Attrs ## @type { modules :: List Module, args? :: Attrs, description? :: String | Null, shorthand? :: Bool } -> Attrs
of = of =
settings@{ modules settings@{
, args ? { } modules,
, description ? null args ? { },
, shorthand ? true description ? null,
, shorthand ? true,
}: }:
let let
getModules = builtins.map ( getModules = builtins.map (
@ -805,12 +791,9 @@ lib: {
let let
# TODO: Figure out if we can apply additional attributes to the generated module. # TODO: Figure out if we can apply additional attributes to the generated module.
# Currently this causes issues to do with redefined options. # Currently this causes issues to do with redefined options.
rest = builtins.removeAttrs rest = builtins.removeAttrs (lib.attrs.filter (
(lib.attrs.filter
(
name: value: builtins.elem name lib.modules.VALID_KEYS name: value: builtins.elem name lib.modules.VALID_KEYS
) ) definition.value) [ "freeform" ];
definition.value) [ "freeform" ];
in in
if definition.value ? config then if definition.value ? config then
rest rest
@ -921,10 +904,10 @@ lib: {
## ##
## @type { module :: Module, name? :: String, description? :: String } -> Attrs ## @type { module :: Module, name? :: String, description? :: String } -> Attrs
portable = portable =
{ name ? "PortableSubmodule" {
, description ? "portable submodule" name ? "PortableSubmodule",
, module description ? "portable submodule",
, module,
}: }:
let let
normalize = normalize =
@ -948,7 +931,9 @@ lib: {
builtins.concatLists normalized; builtins.concatLists normalized;
}; };
base = { config }: { base =
{ config }:
{
options = { options = {
__modules__ = lib.options.create { __modules__ = lib.options.create {
description = "User specified modules to be evaluated."; description = "User specified modules to be evaluated.";
@ -962,13 +947,16 @@ lib: {
type = lib.types.function lib.types.raw; type = lib.types.function lib.types.raw;
internal = true; internal = true;
writable = false; writable = false;
default.value = module: default.value =
module:
let let
normalized = normalized =
if builtins.isList module then module if builtins.isList module then
module
else if builtins.isFunction module || module ? config then else if builtins.isFunction module || module ? config then
[ module ] [ module ]
else [{ config = module; }]; else
[ { config = module; } ];
modules = config.__modules__ ++ normalized; modules = config.__modules__ ++ normalized;
@ -985,7 +973,8 @@ lib: {
}; };
}; };
transform = location: value: transform =
location: value:
let let
modules = lib.lists.from.any (normalize value); modules = lib.lists.from.any (normalize value);
@ -1001,11 +990,10 @@ lib: {
result.config; result.config;
final = lib.types.raw // { final = lib.types.raw // {
merge = location: definitions: merge =
location: definitions:
let let
modules = lib.lists.flatten ( modules = lib.lists.flatten (builtins.map (definition: normalize definition.value) definitions);
builtins.map (definition: normalize definition.value) definitions
);
result = lib.modules.run { result = lib.modules.run {
prefix = location; prefix = location;
@ -1021,7 +1009,8 @@ lib: {
type = lib.types.coerceWithLocation initial transform final; type = lib.types.coerceWithLocation initial transform final;
in in
type // { type
// {
inherit name description; inherit name description;
children = type.children // { children = type.children // {
inherit module base; inherit module base;
@ -1051,12 +1040,10 @@ lib: {
merge = location: definitions: { merge = location: definitions: {
includes = includes =
modules modules
++ builtins.map ++ builtins.map (definition: {
(definition: {
__file__ = "${definition.__file__}; via ${lib.options.getIdentifier location}"; __file__ = "${definition.__file__}; via ${lib.options.getIdentifier location}";
includes = [ definition.value ]; includes = [ definition.value ];
}) }) definitions;
definitions;
}; };
getSubOptions = submodule.getSubOptions; getSubOptions = submodule.getSubOptions;
getSubModules = submodule.getSubModules; getSubModules = submodule.getSubModules;
@ -1092,12 +1079,10 @@ lib: {
location: definitions: location: definitions:
let let
first = builtins.elemAt definitions 0; first = builtins.elemAt definitions 0;
modules = builtins.map modules = builtins.map (definition: {
(definition: {
__file__ = definition.__file__; __file__ = definition.__file__;
options = lib.options.create { type = definition.value; }; options = lib.options.create { type = definition.value; };
}) }) definitions;
definitions;
merged = lib.modules.fixup location (lib.options.merge.declarations location modules); merged = lib.modules.fixup location (lib.options.merge.declarations location modules);
in in
if builtins.length definitions == 1 then first.value else merged.type; if builtins.length definitions == 1 then first.value else merged.type;
@ -1330,12 +1315,10 @@ lib: {
merge = merge =
location: definitions: location: definitions:
submodule.merge location ( submodule.merge location (
builtins.map builtins.map (definition: {
(definition: {
__file__ = definition.__file__; __file__ = definition.__file__;
value = normalize definition; value = normalize definition;
}) }) definitions
definitions
); );
}; };
}; };

View file

@ -5,7 +5,9 @@ in
"PortableSubmodule" = { "PortableSubmodule" = {
"is portable" = "is portable" =
let let
submodule = { config }: { submodule =
{ config }:
{
options = { options = {
primitive = lib.options.create { primitive = lib.options.create {
type = lib.types.string; type = lib.types.string;
@ -29,7 +31,9 @@ in
moduleA = { moduleA = {
options.a = option; options.a = option;
}; };
moduleB = { config }: { moduleB =
{ config }:
{
options.b = option; options.b = option;
config.b = config.a; config.b = config.a;

View file

@ -24,8 +24,10 @@ in
cross-foundation-glibc-x86_64-linux = config.packages.cross.x86_64-linux.foundation.glibc; cross-foundation-glibc-x86_64-linux = config.packages.cross.x86_64-linux.foundation.glibc;
cross-foundation-binutils-x86_64-linux = config.packages.cross.x86_64-linux.foundation.binutils; cross-foundation-binutils-x86_64-linux = config.packages.cross.x86_64-linux.foundation.binutils;
cross-tool-foundation-gcc-newlib-x86_64-linux = config.packages.cross-tools.x86_64-linux.foundation.gcc-newlib; cross-tool-foundation-gcc-newlib-x86_64-linux =
cross-tool-foundation-gcc-x86_64-linux = config.packages.cross-tools.x86_64-linux.foundation.gcc-cross; config.packages.cross-tools.x86_64-linux.foundation.gcc-newlib;
cross-tool-foundation-gcc-x86_64-linux =
config.packages.cross-tools.x86_64-linux.foundation.gcc-cross;
cross-foundation-gcc-x86_64-linux = config.packages.cross.x86_64-linux.foundation.gcc-bootstrap; cross-foundation-gcc-x86_64-linux = config.packages.cross.x86_64-linux.foundation.gcc-bootstrap;
example-a = config.packages.foundation.gcc.versions.latest.extend { example-a = config.packages.foundation.gcc.versions.latest.extend {

View file

@ -211,15 +211,13 @@ in
path: path:
let let
dependencies = lib.attrs.selectOrThrow path collected; dependencies = lib.attrs.selectOrThrow path collected;
hooks = builtins.map hooks = builtins.map (
(
dependency: dependency:
let let
getHooks = dependency.hooks or (lib.fp.const { }); getHooks = dependency.hooks or (lib.fp.const { });
in in
getHooks ctx getHooks ctx
) ) dependencies;
dependencies;
in in
hooks; hooks;
in in

View file

@ -263,7 +263,8 @@ in
type = lib.types.function lib.types.raw; type = lib.types.function lib.types.raw;
internal = true; internal = true;
writable = false; writable = false;
default.value = module: default.value =
module:
let let
normalized = normalized =
if builtins.isList module then if builtins.isList module then
@ -271,9 +272,11 @@ in
else if builtins.isFunction module || module ? config then else if builtins.isFunction module || module ? config then
[ module ] [ module ]
else else
[{ [
{
config = module; config = module;
}]; }
];
modules = config.__modules__ ++ normalized; modules = config.__modules__ ++ normalized;

View file

@ -4,7 +4,10 @@ let
doubles = lib.systems.doubles.all; doubles = lib.systems.doubles.all;
packages = builtins.removeAttrs config.packages [ "cross" "cross-tools" ]; packages = builtins.removeAttrs config.packages [
"cross"
"cross-tools"
];
in in
{ {
includes = [ includes = [
@ -64,8 +67,7 @@ in
config = { config = {
packages.cross-tools = lib.attrs.generate doubles ( packages.cross-tools = lib.attrs.generate doubles (
system: system:
builtins.mapAttrs builtins.mapAttrs (
(
namespace: namespace:
builtins.mapAttrs ( builtins.mapAttrs (
name: alias: name: alias:
@ -89,13 +91,11 @@ in
in in
updated updated
) )
) ) packages
packages
); );
packages.cross = lib.attrs.generate doubles ( packages.cross = lib.attrs.generate doubles (
system: system:
builtins.mapAttrs builtins.mapAttrs (
(
namespace: namespace:
builtins.mapAttrs ( builtins.mapAttrs (
name: alias: name: alias:
@ -120,8 +120,7 @@ in
in in
updated updated
) )
) ) packages
packages
); );
}; };
} }

View file

@ -1,8 +1,8 @@
{ lib {
, lib' lib,
, config lib',
, options config,
, options,
}: }:
let let
inherit (config) inherit (config)
@ -56,8 +56,7 @@ in
only = { only = {
gcc = lib.modules.when (!isBootstrapped) ( gcc = lib.modules.when (!isBootstrapped) (
if isCross then if isCross then
packages.foundation.gcc-cross.versions.latest.extend packages.foundation.gcc-cross.versions.latest.extend {
{
platform = lib.modules.override 0 { platform = lib.modules.override 0 {
inherit (config.platform) build target; inherit (config.platform) build target;
host = config.platform.build; host = config.platform.build;
@ -85,7 +84,8 @@ in
}; };
}; };
env = { env =
{
PATH = lib.paths.bin ( PATH = lib.paths.bin (
lib.lists.when (isBootstrapped) [ foundation.stage2-gcc ] lib.lists.when (isBootstrapped) [ foundation.stage2-gcc ]
++ [ ++ [
@ -102,7 +102,8 @@ in
foundation.stage1-xz foundation.stage1-xz
] ]
); );
} // (lib.attrs.when (isCross) { }
// (lib.attrs.when (isCross) {
LDFLAGS_FOR_TARGET = "-B${config.deps.build.only.glibc.package}/lib -L${config.deps.build.only.glibc.package}/lib -I${config.deps.build.only.glibc.package}/include"; LDFLAGS_FOR_TARGET = "-B${config.deps.build.only.glibc.package}/lib -L${config.deps.build.only.glibc.package}/lib -I${config.deps.build.only.glibc.package}/include";
}); });

View file

@ -8,8 +8,7 @@ in
{ {
config.packages.foundation.gcc-bootstrap = { config.packages.foundation.gcc-bootstrap = {
versions = { versions = {
"latest" = config.packages.foundation.gcc.versions.latest.extend "latest" = config.packages.foundation.gcc.versions.latest.extend (
(
{ config }: { config }:
{ {
config = { config = {
@ -55,9 +54,7 @@ in
env = { env = {
LIBRARY_PATH = lib.modules.override 0 "${config.deps.build.build.glibc.package}/lib"; LIBRARY_PATH = lib.modules.override 0 "${config.deps.build.build.glibc.package}/lib";
LDFLAGS_FOR_TARGET = LDFLAGS_FOR_TARGET = lib.modules.override 0 "-L$(pwd)/${config.platform.target.triple}/libgcc -L${config.deps.build.build.glibc.package}/lib";
lib.modules.override 0
"-L$(pwd)/${config.platform.target.triple}/libgcc -L${config.deps.build.build.glibc.package}/lib";
}; };
configureFlags = lib.modules.override 0 [ configureFlags = lib.modules.override 0 [

View file

@ -9,14 +9,12 @@ in
{ {
config.packages.foundation.gcc-cross = { config.packages.foundation.gcc-cross = {
versions = { versions = {
"latest" = config.packages.foundation.gcc.versions.latest.extend "latest" = config.packages.foundation.gcc.versions.latest.extend (
(
{ config }: { config }:
{ {
config = config =
let let
programPrefix = lib.strings.when programPrefix = lib.strings.when (
(
config.platform.build.triple != config.platform.target.triple config.platform.build.triple != config.platform.target.triple
) "${config.platform.target.triple}-"; ) "${config.platform.target.triple}-";
in in
@ -56,12 +54,8 @@ in
# LIBRARY_PATH = lib.modules.override 0 "${foundation.stage1-musl}/lib"; # LIBRARY_PATH = lib.modules.override 0 "${foundation.stage1-musl}/lib";
CC = lib.modules.override 0 "gcc -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so -idirafter ${foundation.stage1-musl}/include"; CC = lib.modules.override 0 "gcc -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so -idirafter ${foundation.stage1-musl}/include";
CXX = lib.modules.override 0 "g++ -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so -idirafter ${foundation.stage1-musl}/include"; CXX = lib.modules.override 0 "g++ -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so -idirafter ${foundation.stage1-musl}/include";
CFLAGS_FOR_TARGET = CFLAGS_FOR_TARGET = lib.modules.override 0 "-Wl,-dynamic-linker -Wl,${config.deps.build.build.glibc.package}/lib/ld-linux-x86-64.so.2 -B${config.deps.build.build.glibc.package}/lib";
lib.modules.override 0 LDFLAGS_FOR_TARGET = lib.modules.override 0 "-L$(pwd)/${config.platform.target.triple}/libgcc -L${config.deps.build.build.glibc.package}/lib";
"-Wl,-dynamic-linker -Wl,${config.deps.build.build.glibc.package}/lib/ld-linux-x86-64.so.2 -B${config.deps.build.build.glibc.package}/lib";
LDFLAGS_FOR_TARGET =
lib.modules.override 0
"-L$(pwd)/${config.platform.target.triple}/libgcc -L${config.deps.build.build.glibc.package}/lib";
}; };
configureFlags = lib.modules.override 0 [ configureFlags = lib.modules.override 0 [

View file

@ -107,8 +107,7 @@ in
(config.platform.target.triple != config.platform.host.triple) (config.platform.target.triple != config.platform.host.triple)
&& (config.platform.host.triple == config.platform.target.triple); && (config.platform.host.triple == config.platform.target.triple);
programPrefix = lib.strings.when programPrefix = lib.strings.when (
(
config.platform.build.triple != config.platform.target.triple config.platform.build.triple != config.platform.target.triple
) "${config.platform.target.triple}-"; ) "${config.platform.target.triple}-";
@ -148,7 +147,8 @@ in
env = env =
{ {
PATH = lib.modules.when (isBuildBootstrapped) ( PATH = lib.modules.when (isBuildBootstrapped) (
lib.paths.bin ([ lib.paths.bin (
[
foundation.stage2-gnumake foundation.stage2-gnumake
foundation.stage2-gnused foundation.stage2-gnused
foundation.stage2-gnugrep foundation.stage2-gnugrep
@ -160,10 +160,12 @@ in
foundation.stage2-gzip foundation.stage2-gzip
foundation.stage2-bzip2 foundation.stage2-bzip2
foundation.stage1-xz foundation.stage1-xz
] ++ (lib.lists.when (isBootstrapped) [ ]
++ (lib.lists.when (isBootstrapped) [
foundation.stage2-gcc foundation.stage2-gcc
foundation.stage2-binutils foundation.stage2-binutils
])) ])
)
); );
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${libcLd}"; CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${libcLd}";
} }
@ -186,7 +188,9 @@ in
else else
[ [
"-Wl,-dynamic-linker" "-Wl,-dynamic-linker"
"-Wl,${config.deps.build.build.glibc.package}/lib/ld-linux${lib.strings.when (target.isx86 && target.is64bit) "-x86-64"}.so.2" "-Wl,${config.deps.build.build.glibc.package}/lib/ld-linux${
lib.strings.when (target.isx86 && target.is64bit) "-x86-64"
}.so.2"
"-B${config.deps.build.build.glibc.package}/lib" "-B${config.deps.build.build.glibc.package}/lib"
# "-idirafter ${config.deps.build.build.glibc.package}/include" # "-idirafter ${config.deps.build.build.glibc.package}/include"
]; ];
@ -267,12 +271,10 @@ in
install = '' install = ''
# Install # Install
${ ${lib.strings.when (host.is64bit) ''
lib.strings.when (host.is64bit) ''
mkdir -p $out/lib mkdir -p $out/lib
ln -s lib $out/lib64 ln -s lib $out/lib64
'' ''}
}
make -j $NIX_BUILD_CORES install make -j $NIX_BUILD_CORES install
''; '';
}; };

View file

@ -13,8 +13,7 @@ in
{ {
config = config =
let let
programPrefix = lib.strings.when programPrefix = lib.strings.when (
(
config.platform.build.triple != config.platform.target.triple config.platform.build.triple != config.platform.target.triple
) "${config.platform.target.triple}-"; ) "${config.platform.target.triple}-";
in in

View file

@ -1,8 +1,8 @@
{ lib {
, lib' lib,
, config lib',
, options config,
, options,
}: }:
let let
inherit (config) inherit (config)
@ -28,7 +28,10 @@ in
config = { config = {
meta = { meta = {
platforms = [ "x86_64-linux" "i686-linux" ]; platforms = [
"x86_64-linux"
"i686-linux"
];
}; };
pname = "linux-headers"; pname = "linux-headers";