diff --git a/foundation/default.nix b/foundation/default.nix index 3b7fd95..fe442ff 100644 --- a/foundation/default.nix +++ b/foundation/default.nix @@ -4,11 +4,7 @@ modules = import ./src; result = lib.modules.run { - modules = - (builtins.attrValues modules) - ++ [ - {config.aux.system = system;} - ]; + modules = (builtins.attrValues modules) ++ [{config.aux.system = system;}]; }; in result.config.exports.resolved.packages diff --git a/foundation/flake.lock b/foundation/flake.lock index 4e69788..bd83548 100644 --- a/foundation/flake.lock +++ b/foundation/flake.lock @@ -3,10 +3,10 @@ "lib": { "locked": { "dir": "lib", - "dirtyRev": "9c29945531c58ad81f05cd1f4958c8894a733216-dirty", - "dirtyShortRev": "9c29945-dirty", - "lastModified": 1718255029, - "narHash": "sha256-iPMsyNszFA+EzjtIpjmu9EAG7zdjLbuugLtfa64dJos=", + "dirtyRev": "856b88321e5f19019332f8b60b729095c2260340-dirty", + "dirtyShortRev": "856b883-dirty", + "lastModified": 1718299377, + "narHash": "sha256-qsSV+ty3XdEOlxJr5/1ZGheyjDAIu3xWtFxVs1+rDKA=", "type": "git", "url": "file:../?dir=lib" }, diff --git a/foundation/flake.nix b/foundation/flake.nix index d2bcde4..2f9f518 100644 --- a/foundation/flake.nix +++ b/foundation/flake.nix @@ -14,24 +14,18 @@ forEachSystem = lib.attrs.generate [ "i686-linux" + "x86_64-linux" ]; in { extras = let - result = lib.modules.run { - modules = - builtins.attrValues modules; - }; + result = lib.modules.run {modules = builtins.attrValues modules;}; in result.config.exports.resolved.extras; packages = forEachSystem ( system: let result = lib.modules.run { - modules = - (builtins.attrValues modules) - ++ [ - {config.aux.system = system;} - ]; + modules = (builtins.attrValues modules) ++ [{config.aux.system = system;}]; }; in result.config.exports.resolved.packages diff --git a/foundation/src/stages/stage0/architecture/default.nix b/foundation/src/stages/stage0/architecture/default.nix index ecb975c..b4c2f30 100644 --- a/foundation/src/stages/stage0/architecture/default.nix +++ b/foundation/src/stages/stage0/architecture/default.nix @@ -2,7 +2,7 @@ lib, config, }: let - system = config.aux.system; + inherit (config.aux) system; architecture = if system == "x86_64-linux" diff --git a/foundation/src/stages/stage0/kaem/default.nix b/foundation/src/stages/stage0/kaem/default.nix index 3328fff..68db2c2 100644 --- a/foundation/src/stages/stage0/kaem/default.nix +++ b/foundation/src/stages/stage0/kaem/default.nix @@ -35,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -47,24 +50,26 @@ in { config = { aux.foundation.stages.stage0.kaem = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "kaem"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "kaem"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = kaem-unwrapped.package; + executable = kaem-unwrapped.package; - args = [ - "--verbose" - "--strict" - "--file" - ./build.kaem - ]; + args = [ + "--verbose" + "--strict" + "--file" + ./build.kaem + ]; - kaemUnwrapped = kaem-unwrapped.package; - PATH = lib.paths.bin [mescc-tools-extra.package]; - }); + kaemUnwrapped = kaem-unwrapped.package; + PATH = lib.paths.bin [mescc-tools-extra.package]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/mescc-tools-extra/default.nix b/foundation/src/stages/stage0/mescc-tools-extra/default.nix index 0785636..8b12cca 100644 --- a/foundation/src/stages/stage0/mescc-tools-extra/default.nix +++ b/foundation/src/stages/stage0/mescc-tools-extra/default.nix @@ -43,7 +43,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -55,27 +58,29 @@ in { config = { aux.foundation.stages.stage0.mescc-tools-extra = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "mescc-tools-tools"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "mescc-tools-tools"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = kaem-unwrapped.package; + executable = kaem-unwrapped.package; - args = [ - "--verbose" - "--strict" - "--file" - ./build.kaem - ]; + args = [ + "--verbose" + "--strict" + "--file" + ./build.kaem + ]; - src = sources.mescc-tools-extra; + src = sources.mescc-tools-extra; - m2libcOS = "linux"; - m2libcArch = architecture.m2libc; - mesccTools = mescc-tools.package; - }); + m2libcOS = "linux"; + m2libcArch = architecture.m2libc; + mesccTools = mescc-tools.package; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/mescc-tools/default.nix b/foundation/src/stages/stage0/mescc-tools/default.nix index 1855b95..a610bda 100644 --- a/foundation/src/stages/stage0/mescc-tools/default.nix +++ b/foundation/src/stages/stage0/mescc-tools/default.nix @@ -129,7 +129,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -141,42 +144,44 @@ in { config = { aux.foundation.stages.stage0.mescc-tools = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "mescc-tools"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "mescc-tools"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = kaem-unwrapped.package; + executable = kaem-unwrapped.package; - args = [ - "--verbose" - "--strict" - "--file" - ./build.kaem - ]; + args = [ + "--verbose" + "--strict" + "--file" + ./build.kaem + ]; - M1 = M1.package; - M2 = M2.package; - blood-elf-0 = blood-elf.package; - hex2 = hex2.package; + M1 = M1.package; + M2 = M2.package; + blood-elf-0 = blood-elf.package; + hex2 = hex2.package; - m2libc = sources.m2libc; - m2libcArch = architecture.m2libc; - m2planet = sources.m2planet; - m2mesoplanet = sources.m2mesoplanet; - mesccTools = sources.mescc-tools; - mesccToolsExtra = sources.mescc-tools-extra; + m2libc = sources.m2libc; + m2libcArch = architecture.m2libc; + m2planet = sources.m2planet; + m2mesoplanet = sources.m2mesoplanet; + mesccTools = sources.mescc-tools; + mesccToolsExtra = sources.mescc-tools-extra; - bloodFlag = bloodFlag; - endianFlag = endianFlag; - baseAddress = baseAddress; + bloodFlag = bloodFlag; + endianFlag = endianFlag; + baseAddress = baseAddress; - mkdir = getExtraUtil "mkdir"; - cp = getExtraUtil "cp"; - chmod = getExtraUtil "chmod"; - replace = getExtraUtil "replace"; - }); + mkdir = getExtraUtil "mkdir"; + cp = getExtraUtil "cp"; + chmod = getExtraUtil "chmod"; + replace = getExtraUtil "replace"; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase00.nix b/foundation/src/stages/stage0/phases/phase00.nix index effb534..252945b 100644 --- a/foundation/src/stages/stage0/phases/phase00.nix +++ b/foundation/src/stages/stage0/phases/phase00.nix @@ -41,7 +41,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -66,23 +69,25 @@ in { config = { aux.foundation.stages.stage0.hex0 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "hex0"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "hex0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = cfg.executable; + executable = cfg.executable; - args = [ - "${sources.base}/hex0_${architecture}.hex0" - (builtins.placeholder "out") - ]; + args = [ + "${sources.base}/hex0_${architecture}.hex0" + (builtins.placeholder "out") + ]; - outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - outputHash = cfg.hash; - }); + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + outputHash = cfg.hash; + } + ); hash = lib.modules.overrides.default ( if system == "x86_64-linux" @@ -94,12 +99,14 @@ in { else null ); - executable = lib.modules.overrides.default (import { - name = "hex0-seed"; - url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/${architecture}/hex0-seed"; - executable = true; - hash = cfg.hash; - }); + executable = lib.modules.overrides.default ( + import { + name = "hex0-seed"; + url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/${architecture}/hex0-seed"; + executable = true; + hash = cfg.hash; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase01.nix b/foundation/src/stages/stage0/phases/phase01.nix index e820985..84989a1 100644 --- a/foundation/src/stages/stage0/phases/phase01.nix +++ b/foundation/src/stages/stage0/phases/phase01.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -46,19 +49,21 @@ in { config = { aux.foundation.stages.stage0.hex1 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "hex1"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "hex1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex0.package; + executable = hex0.package; - args = [ - "${sources.base}/hex1_${architecture.base}.hex0" - (builtins.placeholder "out") - ]; - }); + args = [ + "${sources.base}/hex1_${architecture.base}.hex0" + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase02.nix b/foundation/src/stages/stage0/phases/phase02.nix index 3735002..d0bf94e 100644 --- a/foundation/src/stages/stage0/phases/phase02.nix +++ b/foundation/src/stages/stage0/phases/phase02.nix @@ -35,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -47,19 +50,21 @@ in { config = { aux.foundation.stages.stage0.hex2-0 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "hex2-0"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex1.package; + executable = hex1.package; - args = [ - "${sources.base}/hex2_${architecture.base}.hex1" - (builtins.placeholder "out") - ]; - }); + args = [ + "${sources.base}/hex2_${architecture.base}.hex1" + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase03.nix b/foundation/src/stages/stage0/phases/phase03.nix index bc7c345..b9a60af 100644 --- a/foundation/src/stages/stage0/phases/phase03.nix +++ b/foundation/src/stages/stage0/phases/phase03.nix @@ -36,7 +36,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -48,28 +51,30 @@ in { config = { aux.foundation.stages.stage0.catm = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "catm"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "catm"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = - if architecture.base == "AArch64" - then hex1.package - else hex2-0.package; + executable = + if architecture.base == "AArch64" + then hex1.package + else hex2-0.package; - args = - if architecture.base == "AArch64" - then [ - "${sources.base}/catm_${architecture.base}.hex1" - (builtins.placeholder "out") - ] - else [ - "${sources.base}/catm_${architecture.base}.hex2" - (builtins.placeholder "out") - ]; - }); + args = + if architecture.base == "AArch64" + then [ + "${sources.base}/catm_${architecture.base}.hex1" + (builtins.placeholder "out") + ] + else [ + "${sources.base}/catm_${architecture.base}.hex2" + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase04.nix b/foundation/src/stages/stage0/phases/phase04.nix index eea5e29..0d0c4fb 100644 --- a/foundation/src/stages/stage0/phases/phase04.nix +++ b/foundation/src/stages/stage0/phases/phase04.nix @@ -36,7 +36,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -48,34 +51,36 @@ in { config = { aux.foundation.stages.stage0.M0 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "M0"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "M0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-0.package; + executable = hex2-0.package; - args = let - M0_hex2-0 = builders.raw.build { - pname = "M0_hex2-0"; - version = "1.6.0"; + args = let + M0_hex2-0 = builders.raw.build { + pname = "M0_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" - "${sources.base}/M0_${architecture.base}.hex2" - ]; - }; - in [ - M0_hex2-0 - (builtins.placeholder "out") - ]; - }); + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" + "${sources.base}/M0_${architecture.base}.hex2" + ]; + }; + in [ + M0_hex2-0 + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase05.nix b/foundation/src/stages/stage0/phases/phase05.nix index 84c4548..e0bbc80 100644 --- a/foundation/src/stages/stage0/phases/phase05.nix +++ b/foundation/src/stages/stage0/phases/phase05.nix @@ -37,7 +37,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -49,47 +52,49 @@ in { config = { aux.foundation.stages.stage0.cc_arch = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "cc_arch"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "cc_arch"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-0.package; + executable = hex2-0.package; - args = let - cc_arch0_hex2-0 = builders.raw.build { - pname = "cc_arch0_hex2-0"; - version = "1.6.0"; + args = let + cc_arch0_hex2-0 = builders.raw.build { + pname = "cc_arch0_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M0.package; + executable = M0.package; - args = [ - "${sources.base}/cc_${architecture.m2libc}.M1" - (builtins.placeholder "out") - ]; - }; - cc_arch1_hex2-0 = builders.raw.build { - pname = "cc_arch1_hex2-0"; - version = "1.6.0"; + args = [ + "${sources.base}/cc_${architecture.m2libc}.M1" + (builtins.placeholder "out") + ]; + }; + cc_arch1_hex2-0 = builders.raw.build { + pname = "cc_arch1_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" - cc_arch0_hex2-0 - ]; - }; - in [ - cc_arch1_hex2-0 - (builtins.placeholder "out") - ]; - }); + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" + cc_arch0_hex2-0 + ]; + }; + in [ + cc_arch1_hex2-0 + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase06.nix b/foundation/src/stages/stage0/phases/phase06.nix index 2ff8954..398cca8 100644 --- a/foundation/src/stages/stage0/phases/phase06.nix +++ b/foundation/src/stages/stage0/phases/phase06.nix @@ -38,7 +38,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -50,97 +53,99 @@ in { config = { aux.foundation.stages.stage0.M2 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "M2"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "M2"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-0.package; + executable = hex2-0.package; - args = let - M2_c = builders.raw.build { - pname = "M2_c"; - version = "1.6.0"; + args = let + M2_c = builders.raw.build { + pname = "M2_c"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/linux/bootstrap.c" - "${sources.m2planet}/cc.h" - "${sources.m2libc}/bootstrappable.c" - "${sources.m2planet}/cc_globals.c" - "${sources.m2planet}/cc_reader.c" - "${sources.m2planet}/cc_strings.c" - "${sources.m2planet}/cc_types.c" - "${sources.m2planet}/cc_core.c" - "${sources.m2planet}/cc_macro.c" - "${sources.m2planet}/cc.c" - ]; - }; - M2_M1 = builders.raw.build { - pname = "M2_M1"; - version = "1.6.0"; + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/linux/bootstrap.c" + "${sources.m2planet}/cc.h" + "${sources.m2libc}/bootstrappable.c" + "${sources.m2planet}/cc_globals.c" + "${sources.m2planet}/cc_reader.c" + "${sources.m2planet}/cc_strings.c" + "${sources.m2planet}/cc_types.c" + "${sources.m2planet}/cc_core.c" + "${sources.m2planet}/cc_macro.c" + "${sources.m2planet}/cc.c" + ]; + }; + M2_M1 = builders.raw.build { + pname = "M2_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = cc_arch.package; + executable = cc_arch.package; - args = [ - M2_c - (builtins.placeholder "out") - ]; - }; - M2_M1' = builders.raw.build { - pname = "M2_M1"; - version = "1.6.0"; + args = [ + M2_c + (builtins.placeholder "out") + ]; + }; + M2_M1' = builders.raw.build { + pname = "M2_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "${sources.m2libc}/${architecture.m2libc}/libc-core.M1" - M2_M1 - ]; - }; - M2_hex2-0 = builders.raw.build { - pname = "M2_hex2-0"; - version = "1.6.0"; + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "${sources.m2libc}/${architecture.m2libc}/libc-core.M1" + M2_M1 + ]; + }; + M2_hex2-0 = builders.raw.build { + pname = "M2_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M0.package; + executable = M0.package; - args = [ - M2_M1' - (builtins.placeholder "out") - ]; - }; - M2_hex2-0' = builders.raw.build { - pname = "M2_hex2-0"; - version = "1.6.0"; + args = [ + M2_M1' + (builtins.placeholder "out") + ]; + }; + M2_hex2-0' = builders.raw.build { + pname = "M2_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" - M2_hex2-0 - ]; - }; - in [ - M2_hex2-0' - (builtins.placeholder "out") - ]; - }); + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" + M2_hex2-0 + ]; + }; + in [ + M2_hex2-0' + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase07.nix b/foundation/src/stages/stage0/phases/phase07.nix index dafba6a..da99b02 100644 --- a/foundation/src/stages/stage0/phases/phase07.nix +++ b/foundation/src/stages/stage0/phases/phase07.nix @@ -39,7 +39,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -51,86 +54,88 @@ in { config = { aux.foundation.stages.stage0.blood-elf = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "blood-elf"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "blood-elf"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-0.package; + executable = hex2-0.package; - args = let - blood-elf_M1 = builders.raw.build { - pname = "blood-elf_M1"; - version = "1.6.0"; + args = let + blood-elf_M1 = builders.raw.build { + pname = "blood-elf_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M2.package; + executable = M2.package; - args = [ - "--architecture" - architecture.m2libc - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/bootstrap.c" - "-f" - "${sources.m2libc}/bootstrappable.c" - "-f" - "${sources.mescc-tools}/stringify.c" - "-f" - "${sources.mescc-tools}/blood-elf.c" - "--bootstrap-mode" - "-o" - (builtins.placeholder "out") - ]; - }; - blood-elf_M1' = builders.raw.build { - pname = "blood-elf_M1-1"; - version = "1.6.0"; + args = [ + "--architecture" + architecture.m2libc + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/bootstrap.c" + "-f" + "${sources.m2libc}/bootstrappable.c" + "-f" + "${sources.mescc-tools}/stringify.c" + "-f" + "${sources.mescc-tools}/blood-elf.c" + "--bootstrap-mode" + "-o" + (builtins.placeholder "out") + ]; + }; + blood-elf_M1' = builders.raw.build { + pname = "blood-elf_M1-1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "${sources.m2libc}/${architecture.m2libc}/libc-core.M1" - blood-elf_M1 - ]; - }; - blood-elf_hex2-0 = builders.raw.build { - pname = "blood-elf_hex2-0"; - version = "1.6.0"; + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "${sources.m2libc}/${architecture.m2libc}/libc-core.M1" + blood-elf_M1 + ]; + }; + blood-elf_hex2-0 = builders.raw.build { + pname = "blood-elf_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M0.package; + executable = M0.package; - args = [ - blood-elf_M1' - (builtins.placeholder "out") - ]; - }; - blood-elf_hex2-0' = builders.raw.build { - pname = "blood-elf_hex2-0-1"; - version = "1.6.0"; + args = [ + blood-elf_M1' + (builtins.placeholder "out") + ]; + }; + blood-elf_hex2-0' = builders.raw.build { + pname = "blood-elf_hex2-0-1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = catm.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" - blood-elf_hex2-0 - ]; - }; - in [ - blood-elf_hex2-0' - (builtins.placeholder "out") - ]; - }); + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}.hex2" + blood-elf_hex2-0 + ]; + }; + in [ + blood-elf_hex2-0' + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase08.nix b/foundation/src/stages/stage0/phases/phase08.nix index ac1d888..fbf7863 100644 --- a/foundation/src/stages/stage0/phases/phase08.nix +++ b/foundation/src/stages/stage0/phases/phase08.nix @@ -40,7 +40,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -52,110 +55,112 @@ in { config = { aux.foundation.stages.stage0.M1-0 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "M1-0"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "M1-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-0.package; + executable = hex2-0.package; - args = let - M1-macro-0_M1 = builders.raw.build { - pname = "M1-macro-0_M1"; - version = "1.6.0"; + args = let + M1-macro-0_M1 = builders.raw.build { + pname = "M1-macro-0_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M2.package; + executable = M2.package; - args = [ - "--architecture" - architecture.m2libc - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/bootstrap.c" - "-f" - "${sources.m2libc}/bootstrappable.c" - "-f" - "${sources.mescc-tools}/stringify.c" - "-f" - "${sources.mescc-tools}/M1-macro.c" - "--bootstrap-mode" - "--debug" - "-o" - (builtins.placeholder "out") - ]; - }; - M1-macro-0-footer_M1 = builders.raw.build { - pname = "M1-macro-0-footer_M1"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = blood-elf.package; - - args = - (lib.lists.when (config.aux.platform.bits == 64) "--64") - ++ [ + args = [ + "--architecture" + architecture.m2libc "-f" - M1-macro-0_M1 - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) + "${sources.m2libc}/${architecture.m2libc}/linux/bootstrap.c" + "-f" + "${sources.m2libc}/bootstrappable.c" + "-f" + "${sources.mescc-tools}/stringify.c" + "-f" + "${sources.mescc-tools}/M1-macro.c" + "--bootstrap-mode" + "--debug" "-o" (builtins.placeholder "out") ]; - }; - M1-macro-0_M1' = builders.raw.build { - pname = "M1-macro-0_M1-1"; - version = "1.6.0"; + }; + M1-macro-0-footer_M1 = builders.raw.build { + pname = "M1-macro-0-footer_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = blood-elf.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "${sources.m2libc}/${architecture.m2libc}/libc-core.M1" - M1-macro-0_M1 - M1-macro-0-footer_M1 - ]; - }; - M1-macro-0_hex2-0 = builders.raw.build { - pname = "M1-macro-0_hex2-0"; - version = "1.6.0"; + args = + (lib.lists.when (config.aux.platform.bits == 64) "--64") + ++ [ + "-f" + M1-macro-0_M1 + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "-o" + (builtins.placeholder "out") + ]; + }; + M1-macro-0_M1' = builders.raw.build { + pname = "M1-macro-0_M1-1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M0.package; + executable = catm.package; - args = [ - M1-macro-0_M1' - (builtins.placeholder "out") - ]; - }; - M1-macro-0_hex2-0' = builders.raw.build { - pname = "M1-macro-0_hex2-0-1"; - version = "1.6.0"; + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "${sources.m2libc}/${architecture.m2libc}/libc-core.M1" + M1-macro-0_M1 + M1-macro-0-footer_M1 + ]; + }; + M1-macro-0_hex2-0 = builders.raw.build { + pname = "M1-macro-0_hex2-0"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = catm.package; + executable = M0.package; - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" - M1-macro-0_hex2-0 - ]; - }; - in [ - M1-macro-0_hex2-0' - (builtins.placeholder "out") - ]; - }); + args = [ + M1-macro-0_M1' + (builtins.placeholder "out") + ]; + }; + M1-macro-0_hex2-0' = builders.raw.build { + pname = "M1-macro-0_hex2-0-1"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = catm.package; + + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" + M1-macro-0_hex2-0 + ]; + }; + in [ + M1-macro-0_hex2-0' + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase09.nix b/foundation/src/stages/stage0/phases/phase09.nix index 000fb72..d94fdfa 100644 --- a/foundation/src/stages/stage0/phases/phase09.nix +++ b/foundation/src/stages/stage0/phases/phase09.nix @@ -41,7 +41,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -53,128 +56,130 @@ in { config = { aux.foundation.stages.stage0.hex2-1 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "hex2-1"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "hex2-1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-0.package; + executable = hex2-0.package; - args = let - hex2_linker_M1 = builders.raw.build { - pname = "hex2_linker_M1"; - version = "1.6.0"; + args = let + hex2_linker_M1 = builders.raw.build { + pname = "hex2_linker_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M2.package; + executable = M2.package; - args = [ - "--architecture" - architecture.m2libc - "-f" - "${sources.m2libc}/sys/types.h" - "-f" - "${sources.m2libc}/stddef.h" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" - "-f" - "${sources.m2libc}/fcntl.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" - "-f" - "${sources.m2libc}/stdlib.c" - "-f" - "${sources.m2libc}/stdio.h" - "-f" - "${sources.m2libc}/stdio.c" - "-f" - "${sources.m2libc}/bootstrappable.c" - "-f" - "${sources.mescc-tools}/hex2.h" - "-f" - "${sources.mescc-tools}/hex2_linker.c" - "-f" - "${sources.mescc-tools}/hex2_word.c" - "-f" - "${sources.mescc-tools}/hex2.c" - "--debug" - "-o" - (builtins.placeholder "out") - ]; - }; - hex2_linker-footer_M1 = builders.raw.build { - pname = "hex2_linker-footer_M1"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = blood-elf.package; - - args = - (lib.lists.when (config.aux.platform.bits == 64) "--64") - ++ [ + args = [ + "--architecture" + architecture.m2libc "-f" - hex2_linker_M1 + "${sources.m2libc}/sys/types.h" + "-f" + "${sources.m2libc}/stddef.h" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" + "-f" + "${sources.m2libc}/fcntl.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" + "-f" + "${sources.m2libc}/stdlib.c" + "-f" + "${sources.m2libc}/stdio.h" + "-f" + "${sources.m2libc}/stdio.c" + "-f" + "${sources.m2libc}/bootstrappable.c" + "-f" + "${sources.mescc-tools}/hex2.h" + "-f" + "${sources.mescc-tools}/hex2_linker.c" + "-f" + "${sources.mescc-tools}/hex2_word.c" + "-f" + "${sources.mescc-tools}/hex2.c" + "--debug" + "-o" + (builtins.placeholder "out") + ]; + }; + hex2_linker-footer_M1 = builders.raw.build { + pname = "hex2_linker-footer_M1"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = blood-elf.package; + + args = + (lib.lists.when (config.aux.platform.bits == 64) "--64") + ++ [ + "-f" + hex2_linker_M1 + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "-o" + (builtins.placeholder "out") + ]; + }; + hex2_linker_hex2 = builders.raw.build { + pname = "hex2_linker_hex2"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = M1-0.package; + + args = [ + "--architecture" + architecture.m2libc ( if config.aux.platform.endian == "little" then "--little-endian" else "--big-endian" ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "-f" + "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" + "-f" + hex2_linker_M1 + "-f" + hex2_linker-footer_M1 "-o" (builtins.placeholder "out") ]; - }; - hex2_linker_hex2 = builders.raw.build { - pname = "hex2_linker_hex2"; - version = "1.6.0"; + }; + hex2_linker_hex2' = builders.raw.build { + pname = "hex2_linker_hex2-1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M1-0.package; + executable = catm.package; - args = [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "-f" - "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" - "-f" - hex2_linker_M1 - "-f" - hex2_linker-footer_M1 - "-o" - (builtins.placeholder "out") - ]; - }; - hex2_linker_hex2' = builders.raw.build { - pname = "hex2_linker_hex2-1"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = catm.package; - - args = [ - (builtins.placeholder "out") - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" - hex2_linker_hex2 - ]; - }; - in [ - hex2_linker_hex2' - (builtins.placeholder "out") - ]; - }); + args = [ + (builtins.placeholder "out") + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" + hex2_linker_hex2 + ]; + }; + in [ + hex2_linker_hex2' + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase10.nix b/foundation/src/stages/stage0/phases/phase10.nix index 567713d..9daaaf7 100644 --- a/foundation/src/stages/stage0/phases/phase10.nix +++ b/foundation/src/stages/stage0/phases/phase10.nix @@ -42,7 +42,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -54,133 +57,135 @@ in { config = { aux.foundation.stages.stage0.M1 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "M1"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-1.package; + executable = hex2-1.package; - args = let - M1-macro_M1 = builders.raw.build { - pname = "M1-macro_M1"; - version = "1.6.0"; + args = let + M1-macro_M1 = builders.raw.build { + pname = "M1-macro_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M2.package; + executable = M2.package; - args = [ - "--architecture" - architecture.m2libc - "-f" - "${sources.m2libc}/sys/types.h" - "-f" - "${sources.m2libc}/stddef.h" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" - "-f" - "${sources.m2libc}/fcntl.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" - "-f" - "${sources.m2libc}/string.c" - "-f" - "${sources.m2libc}/stdlib.c" - "-f" - "${sources.m2libc}/stdio.h" - "-f" - "${sources.m2libc}/stdio.c" - "-f" - "${sources.m2libc}/bootstrappable.c" - "-f" - "${sources.mescc-tools}/stringify.c" - "-f" - "${sources.mescc-tools}/M1-macro.c" - "--debug" - "-o" - (builtins.placeholder "out") - ]; - }; - M1-macro-footer_M1 = builders.raw.build { - pname = "M1-macro-footer_M1"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = blood-elf.package; - - args = - (lib.lists.when (config.aux.platform.bits == 64) "--64") - ++ [ + args = [ + "--architecture" + architecture.m2libc "-f" - M1-macro_M1 + "${sources.m2libc}/sys/types.h" + "-f" + "${sources.m2libc}/stddef.h" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" + "-f" + "${sources.m2libc}/fcntl.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" + "-f" + "${sources.m2libc}/string.c" + "-f" + "${sources.m2libc}/stdlib.c" + "-f" + "${sources.m2libc}/stdio.h" + "-f" + "${sources.m2libc}/stdio.c" + "-f" + "${sources.m2libc}/bootstrappable.c" + "-f" + "${sources.mescc-tools}/stringify.c" + "-f" + "${sources.mescc-tools}/M1-macro.c" + "--debug" + "-o" + (builtins.placeholder "out") + ]; + }; + M1-macro-footer_M1 = builders.raw.build { + pname = "M1-macro-footer_M1"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = blood-elf.package; + + args = + (lib.lists.when (config.aux.platform.bits == 64) "--64") + ++ [ + "-f" + M1-macro_M1 + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "-o" + (builtins.placeholder "out") + ]; + }; + M1-macro_hex2 = builders.raw.build { + pname = "M1-macro_hex2"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = M1-0.package; + + args = [ + "--architecture" + architecture.m2libc ( if config.aux.platform.endian == "little" then "--little-endian" else "--big-endian" ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "-f" + "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" + "-f" + M1-macro_M1 + "-f" + M1-macro-footer_M1 "-o" (builtins.placeholder "out") ]; - }; - M1-macro_hex2 = builders.raw.build { - pname = "M1-macro_hex2"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = M1-0.package; - - args = [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "-f" - "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" - "-f" - M1-macro_M1 - "-f" - M1-macro-footer_M1 - "-o" - (builtins.placeholder "out") - ]; - }; - in [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "--base-address" - ( - if config.aux.system == "x86_64-linux" - then "0x00600000" - else if config.aux.system == "aarch64-linux" - then "0x00600000" - else if config.aux.system == "i686-linux" - then "0x08048000" - else builtins.throw "Unsupported system: ${config.aux.system}" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" - "-f" - M1-macro_hex2 - "-o" - (builtins.placeholder "out") - ]; - }); + }; + in [ + "--architecture" + architecture.m2libc + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "--base-address" + ( + if config.aux.system == "x86_64-linux" + then "0x00600000" + else if config.aux.system == "aarch64-linux" + then "0x00600000" + else if config.aux.system == "i686-linux" + then "0x08048000" + else builtins.throw "Unsupported system: ${config.aux.system}" + ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" + "-f" + M1-macro_hex2 + "-o" + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase11.nix b/foundation/src/stages/stage0/phases/phase11.nix index 9c5ef9f..c5a13de 100644 --- a/foundation/src/stages/stage0/phases/phase11.nix +++ b/foundation/src/stages/stage0/phases/phase11.nix @@ -41,7 +41,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -53,135 +56,137 @@ in { config = { aux.foundation.stages.stage0.hex2 = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "hex2"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "hex2"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2-1.package; + executable = hex2-1.package; - args = let - hex2_linker_M1 = builders.raw.build { - pname = "hex2_linker_M1"; - version = "1.6.0"; + args = let + hex2_linker_M1 = builders.raw.build { + pname = "hex2_linker_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M2.package; + executable = M2.package; - args = [ - "--architecture" - architecture.m2libc - "-f" - "${sources.m2libc}/sys/types.h" - "-f" - "${sources.m2libc}/stddef.h" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" - "-f" - "${sources.m2libc}/fcntl.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" - "-f" - "${sources.m2libc}/stdlib.c" - "-f" - "${sources.m2libc}/stdio.h" - "-f" - "${sources.m2libc}/stdio.c" - "-f" - "${sources.m2libc}/bootstrappable.c" - "-f" - "${sources.mescc-tools}/hex2.h" - "-f" - "${sources.mescc-tools}/hex2_linker.c" - "-f" - "${sources.mescc-tools}/hex2_word.c" - "-f" - "${sources.mescc-tools}/hex2.c" - "--debug" - "-o" - (builtins.placeholder "out") - ]; - }; - hex2_linker-footer_M1 = builders.raw.build { - pname = "hex2_linker-footer_M1"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = blood-elf.package; - - args = - (lib.lists.when (config.aux.platform.bits == 64) "--64") - ++ [ + args = [ + "--architecture" + architecture.m2libc "-f" - hex2_linker_M1 + "${sources.m2libc}/sys/types.h" + "-f" + "${sources.m2libc}/stddef.h" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" + "-f" + "${sources.m2libc}/fcntl.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" + "-f" + "${sources.m2libc}/stdlib.c" + "-f" + "${sources.m2libc}/stdio.h" + "-f" + "${sources.m2libc}/stdio.c" + "-f" + "${sources.m2libc}/bootstrappable.c" + "-f" + "${sources.mescc-tools}/hex2.h" + "-f" + "${sources.mescc-tools}/hex2_linker.c" + "-f" + "${sources.mescc-tools}/hex2_word.c" + "-f" + "${sources.mescc-tools}/hex2.c" + "--debug" + "-o" + (builtins.placeholder "out") + ]; + }; + hex2_linker-footer_M1 = builders.raw.build { + pname = "hex2_linker-footer_M1"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = blood-elf.package; + + args = + (lib.lists.when (config.aux.platform.bits == 64) "--64") + ++ [ + "-f" + hex2_linker_M1 + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "-o" + (builtins.placeholder "out") + ]; + }; + hex2_linker_hex2 = builders.raw.build { + pname = "hex2_linker_hex2"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = M1.package; + + args = [ + "--architecture" + architecture.m2libc ( if config.aux.platform.endian == "little" then "--little-endian" else "--big-endian" ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "-f" + "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" + "-f" + hex2_linker_M1 + "-f" + hex2_linker-footer_M1 "-o" (builtins.placeholder "out") ]; - }; - hex2_linker_hex2 = builders.raw.build { - pname = "hex2_linker_hex2"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = M1.package; - - args = [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "-f" - "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" - "-f" - hex2_linker_M1 - "-f" - hex2_linker-footer_M1 - "-o" - (builtins.placeholder "out") - ]; - }; - in [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "--base-address" - ( - if config.aux.system == "x86_64-linux" - then "0x00600000" - else if config.aux.system == "aarch64-linux" - then "0x00600000" - else if config.aux.system == "i686-linux" - then "0x08048000" - else builtins.throw "Unsupported system: ${config.aux.system}" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" - "-f" - hex2_linker_hex2 - "-o" - (builtins.placeholder "out") - ]; - }); + }; + in [ + "--architecture" + architecture.m2libc + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "--base-address" + ( + if config.aux.system == "x86_64-linux" + then "0x00600000" + else if config.aux.system == "aarch64-linux" + then "0x00600000" + else if config.aux.system == "i686-linux" + then "0x08048000" + else builtins.throw "Unsupported system: ${config.aux.system}" + ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" + "-f" + hex2_linker_hex2 + "-o" + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage0/phases/phase12.nix b/foundation/src/stages/stage0/phases/phase12.nix index f241d84..db74952 100644 --- a/foundation/src/stages/stage0/phases/phase12.nix +++ b/foundation/src/stages/stage0/phases/phase12.nix @@ -41,7 +41,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -53,137 +56,139 @@ in { config = { aux.foundation.stages.stage0.kaem-unwrapped = { - package = lib.modules.overrides.default (builders.raw.build { - pname = "kaem-unwrapped"; - version = "1.6.0"; + package = lib.modules.overrides.default ( + builders.raw.build { + pname = "kaem-unwrapped"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = hex2.package; + executable = hex2.package; - args = let - kaem_M1 = builders.raw.build { - pname = "kaem_M1"; - version = "1.6.0"; + args = let + kaem_M1 = builders.raw.build { + pname = "kaem_M1"; + version = "1.6.0"; - meta = cfg.meta; + meta = cfg.meta; - executable = M2.package; + executable = M2.package; - args = [ - "--architecture" - architecture.m2libc - "-f" - "${sources.m2libc}/sys/types.h" - "-f" - "${sources.m2libc}/stddef.h" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" - "-f" - "${sources.m2libc}/fcntl.c" - "-f" - "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" - "-f" - "${sources.m2libc}/string.c" - "-f" - "${sources.m2libc}/stdlib.c" - "-f" - "${sources.m2libc}/stdio.h" - "-f" - "${sources.m2libc}/stdio.c" - "-f" - "${sources.m2libc}/bootstrappable.c" - "-f" - "${sources.mescc-tools}/Kaem/kaem.h" - "-f" - "${sources.mescc-tools}/Kaem/variable.c" - "-f" - "${sources.mescc-tools}/Kaem/kaem_globals.c" - "-f" - "${sources.mescc-tools}/Kaem/kaem.c" - "--debug" - "-o" - (builtins.placeholder "out") - ]; - }; - kaem-footer_M1 = builders.raw.build { - pname = "kaem-footer_M1"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = blood-elf.package; - - args = - (lib.lists.when (config.aux.platform.bits == 64) "--64") - ++ [ + args = [ + "--architecture" + architecture.m2libc "-f" - kaem_M1 + "${sources.m2libc}/sys/types.h" + "-f" + "${sources.m2libc}/stddef.h" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/unistd.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/fcntl.c" + "-f" + "${sources.m2libc}/fcntl.c" + "-f" + "${sources.m2libc}/${architecture.m2libc}/linux/sys/stat.c" + "-f" + "${sources.m2libc}/string.c" + "-f" + "${sources.m2libc}/stdlib.c" + "-f" + "${sources.m2libc}/stdio.h" + "-f" + "${sources.m2libc}/stdio.c" + "-f" + "${sources.m2libc}/bootstrappable.c" + "-f" + "${sources.mescc-tools}/Kaem/kaem.h" + "-f" + "${sources.mescc-tools}/Kaem/variable.c" + "-f" + "${sources.mescc-tools}/Kaem/kaem_globals.c" + "-f" + "${sources.mescc-tools}/Kaem/kaem.c" + "--debug" + "-o" + (builtins.placeholder "out") + ]; + }; + kaem-footer_M1 = builders.raw.build { + pname = "kaem-footer_M1"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = blood-elf.package; + + args = + (lib.lists.when (config.aux.platform.bits == 64) "--64") + ++ [ + "-f" + kaem_M1 + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "-o" + (builtins.placeholder "out") + ]; + }; + kaem_hex2 = builders.raw.build { + pname = "kaem_hex2"; + version = "1.6.0"; + + meta = cfg.meta; + + executable = M1.package; + + args = [ + "--architecture" + architecture.m2libc ( if config.aux.platform.endian == "little" then "--little-endian" else "--big-endian" ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" + "-f" + "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" + "-f" + kaem_M1 + "-f" + kaem-footer_M1 "-o" (builtins.placeholder "out") ]; - }; - kaem_hex2 = builders.raw.build { - pname = "kaem_hex2"; - version = "1.6.0"; - - meta = cfg.meta; - - executable = M1.package; - - args = [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/${architecture.m2libc}_defs.M1" - "-f" - "${sources.m2libc}/${architecture.m2libc}/libc-full.M1" - "-f" - kaem_M1 - "-f" - kaem-footer_M1 - "-o" - (builtins.placeholder "out") - ]; - }; - in [ - "--architecture" - architecture.m2libc - ( - if config.aux.platform.endian == "little" - then "--little-endian" - else "--big-endian" - ) - "--base-address" - ( - if config.aux.system == "x86_64-linux" - then "0x00600000" - else if config.aux.system == "aarch64-linux" - then "0x00600000" - else if config.aux.system == "i686-linux" - then "0x08048000" - else builtins.throw "Unsupported system: ${config.aux.system}" - ) - "-f" - "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" - "-f" - kaem_hex2 - "-o" - (builtins.placeholder "out") - ]; - }); + }; + in [ + "--architecture" + architecture.m2libc + ( + if config.aux.platform.endian == "little" + then "--little-endian" + else "--big-endian" + ) + "--base-address" + ( + if config.aux.system == "x86_64-linux" + then "0x00600000" + else if config.aux.system == "aarch64-linux" + then "0x00600000" + else if config.aux.system == "i686-linux" + then "0x08048000" + else builtins.throw "Unsupported system: ${config.aux.system}" + ) + "-f" + "${sources.m2libc}/${architecture.m2libc}/ELF-${architecture.m2libc}-debug.hex2" + "-f" + kaem_hex2 + "-o" + (builtins.placeholder "out") + ]; + } + ); }; }; } diff --git a/foundation/src/stages/stage1/bash/boot.nix b/foundation/src/stages/stage1/bash/boot.nix index 1403422..89a356d 100644 --- a/foundation/src/stages/stage1/bash/boot.nix +++ b/foundation/src/stages/stage1/bash/boot.nix @@ -32,7 +32,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/bash/default.nix b/foundation/src/stages/stage1/bash/default.nix index 38952c0..82bd80f 100644 --- a/foundation/src/stages/stage1/bash/default.nix +++ b/foundation/src/stages/stage1/bash/default.nix @@ -9,9 +9,7 @@ stage1 = config.aux.foundation.stages.stage1; in { - includes = [ - ./boot.nix - ]; + includes = [./boot.nix]; options.aux.foundation.stages.stage1.bash = { meta = { @@ -37,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage1/binutils/default.nix b/foundation/src/stages/stage1/binutils/default.nix index 9e93240..6d0408c 100644 --- a/foundation/src/stages/stage1/binutils/default.nix +++ b/foundation/src/stages/stage1/binutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/bison/default.nix b/foundation/src/stages/stage1/bison/default.nix index 0adedf3..fc5fe71 100644 --- a/foundation/src/stages/stage1/bison/default.nix +++ b/foundation/src/stages/stage1/bison/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/bzip2/default.nix b/foundation/src/stages/stage1/bzip2/default.nix index 54edfad..8dc7737 100644 --- a/foundation/src/stages/stage1/bzip2/default.nix +++ b/foundation/src/stages/stage1/bzip2/default.nix @@ -34,7 +34,10 @@ in { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; # TODO: Support more platforms. - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/coreutils/default.nix b/foundation/src/stages/stage1/coreutils/default.nix index a995064..4067019 100644 --- a/foundation/src/stages/stage1/coreutils/default.nix +++ b/foundation/src/stages/stage1/coreutils/default.nix @@ -9,9 +9,7 @@ stage1 = config.aux.foundation.stages.stage1; in { - includes = [ - ./boot.nix - ]; + includes = [./boot.nix]; options.aux.foundation.stages.stage1.coreutils = { meta = { @@ -37,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/diffutils/default.nix b/foundation/src/stages/stage1/diffutils/default.nix index 67d6ee7..6da1585 100644 --- a/foundation/src/stages/stage1/diffutils/default.nix +++ b/foundation/src/stages/stage1/diffutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/findutils/default.nix b/foundation/src/stages/stage1/findutils/default.nix index dc62440..cb03e45 100644 --- a/foundation/src/stages/stage1/findutils/default.nix +++ b/foundation/src/stages/stage1/findutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/gawk/default.nix b/foundation/src/stages/stage1/gawk/default.nix index df8b03f..3efd0d3 100644 --- a/foundation/src/stages/stage1/gawk/default.nix +++ b/foundation/src/stages/stage1/gawk/default.nix @@ -9,9 +9,7 @@ stage1 = config.aux.foundation.stages.stage1; in { - includes = [ - ./boot.nix - ]; + includes = [./boot.nix]; options.aux.foundation.stages.stage1.gawk = { meta = { @@ -37,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage1/gcc/default.nix b/foundation/src/stages/stage1/gcc/default.nix index 94eac78..3a25822 100644 --- a/foundation/src/stages/stage1/gcc/default.nix +++ b/foundation/src/stages/stage1/gcc/default.nix @@ -39,7 +39,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/gnugrep/default.nix b/foundation/src/stages/stage1/gnugrep/default.nix index 502bdb1..bc79914 100644 --- a/foundation/src/stages/stage1/gnugrep/default.nix +++ b/foundation/src/stages/stage1/gnugrep/default.nix @@ -32,7 +32,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage1/gnum4/default.nix b/foundation/src/stages/stage1/gnum4/default.nix index 1e7e9c3..341e8f6 100644 --- a/foundation/src/stages/stage1/gnum4/default.nix +++ b/foundation/src/stages/stage1/gnum4/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/gnumake/default.nix b/foundation/src/stages/stage1/gnumake/default.nix index 09c3da0..f6bcace 100644 --- a/foundation/src/stages/stage1/gnumake/default.nix +++ b/foundation/src/stages/stage1/gnumake/default.nix @@ -9,9 +9,7 @@ stage1 = config.aux.foundation.stages.stage1; in { - includes = [ - ./boot.nix - ]; + includes = [./boot.nix]; options.aux.foundation.stages.stage1.gnumake = { meta = { @@ -37,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/gnupatch/default.nix b/foundation/src/stages/stage1/gnupatch/default.nix index fcd53b7..bb498b1 100644 --- a/foundation/src/stages/stage1/gnupatch/default.nix +++ b/foundation/src/stages/stage1/gnupatch/default.nix @@ -32,7 +32,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; @@ -118,13 +121,8 @@ in { ]; objects = - builtins.map - ( - value: - builtins.replaceStrings - [".c"] - [".o"] - (builtins.baseNameOf value) + builtins.map ( + value: builtins.replaceStrings [".c"] [".o"] (builtins.baseNameOf value) ) sources; in @@ -134,9 +132,7 @@ in { meta = cfg.meta; src = cfg.src; - deps.build.host = [ - stage1.tinycc.mes.compiler.package - ]; + deps.build.host = [stage1.tinycc.mes.compiler.package]; script = '' # Unpack diff --git a/foundation/src/stages/stage1/gnused/default.nix b/foundation/src/stages/stage1/gnused/default.nix index 74d804a..df212be 100644 --- a/foundation/src/stages/stage1/gnused/default.nix +++ b/foundation/src/stages/stage1/gnused/default.nix @@ -9,9 +9,7 @@ stage1 = config.aux.foundation.stages.stage1; in { - includes = [ - ./boot.nix - ]; + includes = [./boot.nix]; options.aux.foundation.stages.stage1.gnused = { meta = { @@ -37,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage1/gnutar/default.nix b/foundation/src/stages/stage1/gnutar/default.nix index 1c69b74..c00c516 100644 --- a/foundation/src/stages/stage1/gnutar/default.nix +++ b/foundation/src/stages/stage1/gnutar/default.nix @@ -38,7 +38,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage1/gzip/default.nix b/foundation/src/stages/stage1/gzip/default.nix index 88bd6ce..7195099 100644 --- a/foundation/src/stages/stage1/gzip/default.nix +++ b/foundation/src/stages/stage1/gzip/default.nix @@ -32,7 +32,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/heirloom/default.nix b/foundation/src/stages/stage1/heirloom/default.nix index 57bb742..95f5cdc 100644 --- a/foundation/src/stages/stage1/heirloom/default.nix +++ b/foundation/src/stages/stage1/heirloom/default.nix @@ -10,9 +10,7 @@ stage1 = config.aux.foundation.stages.stage1; stage2 = config.aux.foundation.stages.stage2; in { - includes = [ - ./devtools.nix - ]; + includes = [./devtools.nix]; options.aux.foundation.stages.stage1.heirloom = { meta = { @@ -48,7 +46,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/heirloom/devtools.nix b/foundation/src/stages/stage1/heirloom/devtools.nix index affce51..74f2dea 100644 --- a/foundation/src/stages/stage1/heirloom/devtools.nix +++ b/foundation/src/stages/stage1/heirloom/devtools.nix @@ -54,7 +54,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; }; diff --git a/foundation/src/stages/stage1/linux-headers/default.nix b/foundation/src/stages/stage1/linux-headers/default.nix index fc496fe..ef15a8a 100644 --- a/foundation/src/stages/stage1/linux-headers/default.nix +++ b/foundation/src/stages/stage1/linux-headers/default.nix @@ -27,7 +27,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/ln-boot/default.nix b/foundation/src/stages/stage1/ln-boot/default.nix index 833cba3..a435029 100644 --- a/foundation/src/stages/stage1/ln-boot/default.nix +++ b/foundation/src/stages/stage1/ln-boot/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/mes/compiler.nix b/foundation/src/stages/stage1/mes/compiler.nix index a6e8974..d25f456 100644 --- a/foundation/src/stages/stage1/mes/compiler.nix +++ b/foundation/src/stages/stage1/mes/compiler.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; @@ -79,11 +82,9 @@ in { sources = import ./sources.nix; - files = - lib.strings.concatMapSep - " " - (getSourcePath ".o") - (builtins.map compile sources.x86.linux.mescc.mes); + files = lib.strings.concatMapSep " " (getSourcePath ".o") ( + builtins.map compile sources.x86.linux.mescc.mes + ); in builders.kaem.build { name = "mes-${stage1.mes.version}"; diff --git a/foundation/src/stages/stage1/mes/libc.nix b/foundation/src/stages/stage1/mes/libc.nix index ecf2fd6..ac7ca65 100644 --- a/foundation/src/stages/stage1/mes/libc.nix +++ b/foundation/src/stages/stage1/mes/libc.nix @@ -32,7 +32,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; @@ -57,9 +60,7 @@ in { meta = cfg.meta; - deps.build.host = [ - stage1.ln-boot.package - ]; + deps.build.host = [stage1.ln-boot.package]; script = '' cd ${stage1.mes.libs.prefix} diff --git a/foundation/src/stages/stage1/mes/libs.nix b/foundation/src/stages/stage1/mes/libs.nix index 3154f93..801a7e5 100644 --- a/foundation/src/stages/stage1/mes/libs.nix +++ b/foundation/src/stages/stage1/mes/libs.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; @@ -199,11 +202,13 @@ in { libc-mini = createLib "libc-mini" sources.x86.linux.mescc.libc_mini; libmescc = createLib "libmescc" sources.x86.linux.mescc.libmescc; libc = createLib "libc" sources.x86.linux.mescc.libc; - libc_tcc = createLib "libc+tcc" (sources.x86.linux.mescc.libc_tcc + libc_tcc = createLib "libc+tcc" ( + sources.x86.linux.mescc.libc_tcc ++ [ # We need `symlink` support for `ln-boot` to work. "lib/linux/symlink.c" - ]); + ] + ); in builders.kaem.build { name = "mes-m2-libs-${stage1.mes.version}"; diff --git a/foundation/src/stages/stage1/musl/boot.nix b/foundation/src/stages/stage1/musl/boot.nix index ad8892d..28e751a 100644 --- a/foundation/src/stages/stage1/musl/boot.nix +++ b/foundation/src/stages/stage1/musl/boot.nix @@ -131,7 +131,6 @@ in { # Install make install cp ${stage1.tinycc.mes.libs.package}/lib/libtcc1.a $out/lib - ''; }; }; diff --git a/foundation/src/stages/stage1/musl/default.nix b/foundation/src/stages/stage1/musl/default.nix index 3b36ff5..9f0f08b 100644 --- a/foundation/src/stages/stage1/musl/default.nix +++ b/foundation/src/stages/stage1/musl/default.nix @@ -9,9 +9,7 @@ stage1 = config.aux.foundation.stages.stage1; in { - includes = [ - ./boot.nix - ]; + includes = [./boot.nix]; options.aux.foundation.stages.stage1.musl = { meta = { @@ -38,7 +36,10 @@ in { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; # TODO: Support more platforms. - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86-64_linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/nyacc/default.nix b/foundation/src/stages/stage1/nyacc/default.nix index 64d8b2f..8f02c56 100644 --- a/foundation/src/stages/stage1/nyacc/default.nix +++ b/foundation/src/stages/stage1/nyacc/default.nix @@ -35,7 +35,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/python/default.nix b/foundation/src/stages/stage1/python/default.nix index 9297b03..49083fd 100644 --- a/foundation/src/stages/stage1/python/default.nix +++ b/foundation/src/stages/stage1/python/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "i686-linux" + "x86_64-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/tinycc/default.nix b/foundation/src/stages/stage1/tinycc/default.nix index 1e3168a..a7b6043 100644 --- a/foundation/src/stages/stage1/tinycc/default.nix +++ b/foundation/src/stages/stage1/tinycc/default.nix @@ -38,7 +38,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/xz/default.nix b/foundation/src/stages/stage1/xz/default.nix index 3857a63..cf64b28 100644 --- a/foundation/src/stages/stage1/xz/default.nix +++ b/foundation/src/stages/stage1/xz/default.nix @@ -36,7 +36,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage1/zlib/default.nix b/foundation/src/stages/stage1/zlib/default.nix index 39c5a04..b413d56 100644 --- a/foundation/src/stages/stage1/zlib/default.nix +++ b/foundation/src/stages/stage1/zlib/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/bash/default.nix b/foundation/src/stages/stage2/bash/default.nix index 11e6e7f..b44ebe5 100644 --- a/foundation/src/stages/stage2/bash/default.nix +++ b/foundation/src/stages/stage2/bash/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage2/binutils/default.nix b/foundation/src/stages/stage2/binutils/default.nix index 27a4fcb..6a06ddd 100644 --- a/foundation/src/stages/stage2/binutils/default.nix +++ b/foundation/src/stages/stage2/binutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/busybox/default.nix b/foundation/src/stages/stage2/busybox/default.nix index bdef1f2..d04397d 100644 --- a/foundation/src/stages/stage2/busybox/default.nix +++ b/foundation/src/stages/stage2/busybox/default.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; @@ -64,9 +67,7 @@ in { }; package = let - patches = [ - ./patches/busybox-in-store.patch - ]; + patches = [./patches/busybox-in-store.patch]; busyboxConfig = [ "CC=musl-gcc" diff --git a/foundation/src/stages/stage2/bzip2/default.nix b/foundation/src/stages/stage2/bzip2/default.nix index ba1ab7b..1e9e788 100644 --- a/foundation/src/stages/stage2/bzip2/default.nix +++ b/foundation/src/stages/stage2/bzip2/default.nix @@ -34,7 +34,10 @@ in { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; # TODO: Support more platforms. - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/coreutils/default.nix b/foundation/src/stages/stage2/coreutils/default.nix index 4d9ec19..d2d51df 100644 --- a/foundation/src/stages/stage2/coreutils/default.nix +++ b/foundation/src/stages/stage2/coreutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/diffutils/default.nix b/foundation/src/stages/stage2/diffutils/default.nix index 90c8747..eec8333 100644 --- a/foundation/src/stages/stage2/diffutils/default.nix +++ b/foundation/src/stages/stage2/diffutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/findutils/default.nix b/foundation/src/stages/stage2/findutils/default.nix index 201b530..b352430 100644 --- a/foundation/src/stages/stage2/findutils/default.nix +++ b/foundation/src/stages/stage2/findutils/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/gawk/default.nix b/foundation/src/stages/stage2/gawk/default.nix index dd7f269..081e913 100644 --- a/foundation/src/stages/stage2/gawk/default.nix +++ b/foundation/src/stages/stage2/gawk/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage2/gcc/default.nix b/foundation/src/stages/stage2/gcc/default.nix index 51da8ea..4d54ba9 100644 --- a/foundation/src/stages/stage2/gcc/default.nix +++ b/foundation/src/stages/stage2/gcc/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/glibc/default.nix b/foundation/src/stages/stage2/glibc/default.nix index 2e76ebb..603fb8c 100644 --- a/foundation/src/stages/stage2/glibc/default.nix +++ b/foundation/src/stages/stage2/glibc/default.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/gnugrep/default.nix b/foundation/src/stages/stage2/gnugrep/default.nix index 1ecd5ec..73fddab 100644 --- a/foundation/src/stages/stage2/gnugrep/default.nix +++ b/foundation/src/stages/stage2/gnugrep/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage2/gnumake/default.nix b/foundation/src/stages/stage2/gnumake/default.nix index f43c46a..51a1cd7 100644 --- a/foundation/src/stages/stage2/gnumake/default.nix +++ b/foundation/src/stages/stage2/gnumake/default.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/gnupatch/default.nix b/foundation/src/stages/stage2/gnupatch/default.nix index e5520f1..3bc83aa 100644 --- a/foundation/src/stages/stage2/gnupatch/default.nix +++ b/foundation/src/stages/stage2/gnupatch/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/gnused/default.nix b/foundation/src/stages/stage2/gnused/default.nix index 3b1c564..e3a249e 100644 --- a/foundation/src/stages/stage2/gnused/default.nix +++ b/foundation/src/stages/stage2/gnused/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage2/gnutar/default.nix b/foundation/src/stages/stage2/gnutar/default.nix index 9dd33f6..c31634c 100644 --- a/foundation/src/stages/stage2/gnutar/default.nix +++ b/foundation/src/stages/stage2/gnutar/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; mainProgram = lib.options.create { diff --git a/foundation/src/stages/stage2/gzip/default.nix b/foundation/src/stages/stage2/gzip/default.nix index a3babb9..7a0567c 100644 --- a/foundation/src/stages/stage2/gzip/default.nix +++ b/foundation/src/stages/stage2/gzip/default.nix @@ -33,7 +33,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/stages/stage2/patchelf/default.nix b/foundation/src/stages/stage2/patchelf/default.nix index 40c9fbe..c19e373 100644 --- a/foundation/src/stages/stage2/patchelf/default.nix +++ b/foundation/src/stages/stage2/patchelf/default.nix @@ -34,7 +34,10 @@ in { platforms = lib.options.create { type = lib.types.list.of lib.types.string; description = "Platforms the package supports."; - default.value = ["i686-linux"]; + default.value = [ + "x86_64-linux" + "i686-linux" + ]; }; }; diff --git a/foundation/src/system/default.nix b/foundation/src/system/default.nix index aae1d96..d0946f1 100644 --- a/foundation/src/system/default.nix +++ b/foundation/src/system/default.nix @@ -2,7 +2,7 @@ options.aux = { system = lib.options.create { type = lib.types.string; - default.value = "i686-linux"; + default.value = "x86_64-linux"; description = '' The system to build packages for. This value can be provided as either `config.aux.system` or by setting the `system` argument for modules.