Compare commits
5 commits
61139839b6
...
7adf088998
Author | SHA1 | Date | |
---|---|---|---|
isabel roses | 7adf088998 | ||
isabel roses | 120d4b3257 | ||
Jake Hamilton | 9316874396 | ||
Jake Hamilton | dc2ce818b8 | ||
Jake Hamilton | 69a8760bd3 |
|
@ -4,11 +4,7 @@
|
||||||
modules = import ./src;
|
modules = import ./src;
|
||||||
|
|
||||||
result = lib.modules.run {
|
result = lib.modules.run {
|
||||||
modules =
|
modules = (builtins.attrValues modules) ++ [{config.aux.system = system;}];
|
||||||
(builtins.attrValues modules)
|
|
||||||
++ [
|
|
||||||
{config.aux.system = system;}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
result.config.exports.resolved.packages
|
result.config.exports.resolved.packages
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"lib": {
|
"lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"dir": "lib",
|
||||||
"dirtyRev": "9c29945531c58ad81f05cd1f4958c8894a733216-dirty",
|
"dirtyRev": "9850da8aa9dc9be22e237c9b424a18e801e53ecb-dirty",
|
||||||
"dirtyShortRev": "9c29945-dirty",
|
"dirtyShortRev": "9850da8-dirty",
|
||||||
"lastModified": 1718255029,
|
"lastModified": 1718529861,
|
||||||
"narHash": "sha256-iPMsyNszFA+EzjtIpjmu9EAG7zdjLbuugLtfa64dJos=",
|
"narHash": "sha256-tv/0C7ixH+9Ij+r+5nua48OlXXXnbdEsnenxX4eG/Sk=",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:../?dir=lib"
|
"url": "file:../?dir=lib"
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,24 +14,18 @@
|
||||||
|
|
||||||
forEachSystem = lib.attrs.generate [
|
forEachSystem = lib.attrs.generate [
|
||||||
"i686-linux"
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
extras = let
|
extras = let
|
||||||
result = lib.modules.run {
|
result = lib.modules.run {modules = builtins.attrValues modules;};
|
||||||
modules =
|
|
||||||
builtins.attrValues modules;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
result.config.exports.resolved.extras;
|
result.config.exports.resolved.extras;
|
||||||
|
|
||||||
packages = forEachSystem (
|
packages = forEachSystem (
|
||||||
system: let
|
system: let
|
||||||
result = lib.modules.run {
|
result = lib.modules.run {
|
||||||
modules =
|
modules = (builtins.attrValues modules) ++ [{config.aux.system = system;}];
|
||||||
(builtins.attrValues modules)
|
|
||||||
++ [
|
|
||||||
{config.aux.system = system;}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
result.config.exports.resolved.packages
|
result.config.exports.resolved.packages
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
}: let
|
}: let
|
||||||
system = config.aux.system;
|
inherit (config.aux) system;
|
||||||
|
|
||||||
architecture =
|
architecture =
|
||||||
if system == "x86_64-linux"
|
if system == "x86_64-linux"
|
||||||
|
|
|
@ -35,7 +35,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,7 +50,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.kaem = {
|
aux.foundation.stages.stage0.kaem = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "kaem";
|
pname = "kaem";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -64,7 +68,8 @@ in {
|
||||||
|
|
||||||
kaemUnwrapped = kaem-unwrapped.package;
|
kaemUnwrapped = kaem-unwrapped.package;
|
||||||
PATH = lib.paths.bin [mescc-tools-extra.package];
|
PATH = lib.paths.bin [mescc-tools-extra.package];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,7 +58,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.mescc-tools-extra = {
|
aux.foundation.stages.stage0.mescc-tools-extra = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "mescc-tools-tools";
|
pname = "mescc-tools-tools";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -75,7 +79,8 @@ in {
|
||||||
m2libcOS = "linux";
|
m2libcOS = "linux";
|
||||||
m2libcArch = architecture.m2libc;
|
m2libcArch = architecture.m2libc;
|
||||||
mesccTools = mescc-tools.package;
|
mesccTools = mescc-tools.package;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -141,7 +144,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.mescc-tools = {
|
aux.foundation.stages.stage0.mescc-tools = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "mescc-tools";
|
pname = "mescc-tools";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -176,7 +180,8 @@ in {
|
||||||
cp = getExtraUtil "cp";
|
cp = getExtraUtil "cp";
|
||||||
chmod = getExtraUtil "chmod";
|
chmod = getExtraUtil "chmod";
|
||||||
replace = getExtraUtil "replace";
|
replace = getExtraUtil "replace";
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,7 +69,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.hex0 = {
|
aux.foundation.stages.stage0.hex0 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "hex0";
|
pname = "hex0";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -82,7 +86,8 @@ in {
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHashAlgo = "sha256";
|
outputHashAlgo = "sha256";
|
||||||
outputHash = cfg.hash;
|
outputHash = cfg.hash;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
hash = lib.modules.overrides.default (
|
hash = lib.modules.overrides.default (
|
||||||
if system == "x86_64-linux"
|
if system == "x86_64-linux"
|
||||||
|
@ -94,12 +99,14 @@ in {
|
||||||
else null
|
else null
|
||||||
);
|
);
|
||||||
|
|
||||||
executable = lib.modules.overrides.default (import <nix/fetchurl.nix> {
|
executable = lib.modules.overrides.default (
|
||||||
|
import <nix/fetchurl.nix> {
|
||||||
name = "hex0-seed";
|
name = "hex0-seed";
|
||||||
url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/${architecture}/hex0-seed";
|
url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/${architecture}/hex0-seed";
|
||||||
executable = true;
|
executable = true;
|
||||||
hash = cfg.hash;
|
hash = cfg.hash;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,7 +49,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.hex1 = {
|
aux.foundation.stages.stage0.hex1 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "hex1";
|
pname = "hex1";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -58,7 +62,8 @@ in {
|
||||||
"${sources.base}/hex1_${architecture.base}.hex0"
|
"${sources.base}/hex1_${architecture.base}.hex0"
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,7 +50,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.hex2-0 = {
|
aux.foundation.stages.stage0.hex2-0 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "hex2-0";
|
pname = "hex2-0";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -59,7 +63,8 @@ in {
|
||||||
"${sources.base}/hex2_${architecture.base}.hex1"
|
"${sources.base}/hex2_${architecture.base}.hex1"
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +51,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.catm = {
|
aux.foundation.stages.stage0.catm = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "catm";
|
pname = "catm";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -69,7 +73,8 @@ in {
|
||||||
"${sources.base}/catm_${architecture.base}.hex2"
|
"${sources.base}/catm_${architecture.base}.hex2"
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +51,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.M0 = {
|
aux.foundation.stages.stage0.M0 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "M0";
|
pname = "M0";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -75,7 +79,8 @@ in {
|
||||||
M0_hex2-0
|
M0_hex2-0
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,7 +52,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.cc_arch = {
|
aux.foundation.stages.stage0.cc_arch = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "cc_arch";
|
pname = "cc_arch";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -89,7 +93,8 @@ in {
|
||||||
cc_arch1_hex2-0
|
cc_arch1_hex2-0
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,7 +53,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.M2 = {
|
aux.foundation.stages.stage0.M2 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "M2";
|
pname = "M2";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -140,7 +144,8 @@ in {
|
||||||
M2_hex2-0'
|
M2_hex2-0'
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,7 +54,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.blood-elf = {
|
aux.foundation.stages.stage0.blood-elf = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "blood-elf";
|
pname = "blood-elf";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -130,7 +134,8 @@ in {
|
||||||
blood-elf_hex2-0'
|
blood-elf_hex2-0'
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,7 +55,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.M1-0 = {
|
aux.foundation.stages.stage0.M1-0 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "M1-0";
|
pname = "M1-0";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -155,7 +159,8 @@ in {
|
||||||
M1-macro-0_hex2-0'
|
M1-macro-0_hex2-0'
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,7 +56,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.hex2-1 = {
|
aux.foundation.stages.stage0.hex2-1 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "hex2-1";
|
pname = "hex2-1";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -174,7 +178,8 @@ in {
|
||||||
hex2_linker_hex2'
|
hex2_linker_hex2'
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +57,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.M1 = {
|
aux.foundation.stages.stage0.M1 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "M1";
|
pname = "M1";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -180,7 +184,8 @@ in {
|
||||||
"-o"
|
"-o"
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,7 +56,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.hex2 = {
|
aux.foundation.stages.stage0.hex2 = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "hex2";
|
pname = "hex2";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -181,7 +185,8 @@ in {
|
||||||
"-o"
|
"-o"
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,7 +56,8 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
aux.foundation.stages.stage0.kaem-unwrapped = {
|
aux.foundation.stages.stage0.kaem-unwrapped = {
|
||||||
package = lib.modules.overrides.default (builders.raw.build {
|
package = lib.modules.overrides.default (
|
||||||
|
builders.raw.build {
|
||||||
pname = "kaem-unwrapped";
|
pname = "kaem-unwrapped";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -183,7 +187,8 @@ in {
|
||||||
"-o"
|
"-o"
|
||||||
(builtins.placeholder "out")
|
(builtins.placeholder "out")
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.bash;
|
cfg = config.aux.foundation.stages.stage1.bash;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
includes = [
|
{
|
||||||
./boot.nix
|
includes = [ ./boot.nix ];
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.bash = {
|
options.aux.foundation.stages.stage1.bash = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -37,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -72,7 +72,8 @@ in {
|
||||||
sha256 = "132qng0jy600mv1fs95ylnlisx2wavkkgpb19c6kmz7lnmjhjwhk";
|
sha256 = "132qng0jy600mv1fs95ylnlisx2wavkkgpb19c6kmz7lnmjhjwhk";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# flush output for generated code
|
# flush output for generated code
|
||||||
./patches/mksignames-flush.patch
|
./patches/mksignames-flush.patch
|
||||||
|
@ -108,7 +109,8 @@ in {
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export AR="tcc -ar"
|
export AR="tcc -ar"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.binutils;
|
cfg = config.aux.foundation.stages.stage1.binutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.binutils = {
|
options.aux.foundation.stages.stage1.binutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,7 +64,8 @@ in {
|
||||||
sha256 = "rppXieI0WeWWBuZxRyPy0//DHAMXQZHvDQFb3wYAdFA=";
|
sha256 = "rppXieI0WeWWBuZxRyPy0//DHAMXQZHvDQFb3wYAdFA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Make binutils output deterministic by default.
|
# Make binutils output deterministic by default.
|
||||||
./patches/deterministic.patch
|
./patches/deterministic.patch
|
||||||
|
@ -130,7 +133,8 @@ in {
|
||||||
export AR="tcc -ar"
|
export AR="tcc -ar"
|
||||||
export lt_cv_sys_max_cmd_len=32768
|
export lt_cv_sys_max_cmd_len=32768
|
||||||
export CFLAGS="-D__LITTLE_ENDIAN__=1"
|
export CFLAGS="-D__LITTLE_ENDIAN__=1"
|
||||||
bash ./configure ${builtins.concatStringsSep " " configureFlags}
|
chmod +x ./configure
|
||||||
|
./configure ${builtins.concatStringsSep " " configureFlags}
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make -j $NIX_BUILD_CORES all-libiberty all-gas all-bfd all-libctf all-zlib all-gprof
|
make -j $NIX_BUILD_CORES all-libiberty all-gas all-bfd all-libctf all-zlib all-gprof
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.bison;
|
cfg = config.aux.foundation.stages.stage1.bison;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.bison = {
|
options.aux.foundation.stages.stage1.bison = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +89,8 @@ in {
|
||||||
cd bison-${cfg.version}
|
cd bison-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -34,7 +34,10 @@ in {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
# TODO: Support more platforms.
|
# TODO: Support more platforms.
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.coreutils;
|
cfg = config.aux.foundation.stages.stage1.coreutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
includes = [
|
{
|
||||||
./boot.nix
|
includes = [ ./boot.nix ];
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.coreutils = {
|
options.aux.foundation.stages.stage1.coreutils = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -37,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@ in {
|
||||||
sha256 = "X2ANkJOXOwr+JTk9m8GMRPIjJlf0yg2V6jHHAutmtzk=";
|
sha256 = "X2ANkJOXOwr+JTk9m8GMRPIjJlf0yg2V6jHHAutmtzk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--prefix=${builtins.placeholder "out"}"
|
"--prefix=${builtins.placeholder "out"}"
|
||||||
"--build=${platform.build}"
|
"--build=${platform.build}"
|
||||||
|
@ -100,7 +101,8 @@ in {
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure ${builtins.concatStringsSep " " configureFlags}
|
chmod +x ./configure
|
||||||
|
./configure ${builtins.concatStringsSep " " configureFlags}
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make -j $NIX_BUILD_CORES AR="tcc -ar" MAKEINFO="true"
|
make -j $NIX_BUILD_CORES AR="tcc -ar" MAKEINFO="true"
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.diffutils;
|
cfg = config.aux.foundation.stages.stage1.diffutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.diffutils = {
|
options.aux.foundation.stages.stage1.diffutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,7 +90,8 @@ in {
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host}
|
--host=${platform.host}
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.findutils;
|
cfg = config.aux.foundation.stages.stage1.findutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.findutils = {
|
options.aux.foundation.stages.stage1.findutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -93,7 +95,8 @@ in {
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export AR="tcc -ar"
|
export AR="tcc -ar"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host}
|
--host=${platform.host}
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gawk.boot;
|
cfg = config.aux.foundation.stages.stage1.gawk.boot;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gawk.boot = {
|
options.aux.foundation.stages.stage1.gawk.boot = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -35,7 +34,8 @@ in {
|
||||||
sha256 = "1z4bibjm7ldvjwq3hmyifyb429rs2d9bdwkvs0r171vv1khpdwmb";
|
sha256 = "1z4bibjm7ldvjwq3hmyifyb429rs2d9bdwkvs0r171vv1khpdwmb";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# for reproducibility don't generate date stamp
|
# for reproducibility don't generate date stamp
|
||||||
./patches/no-stamp.patch
|
./patches/no-stamp.patch
|
||||||
|
@ -68,7 +68,8 @@ in {
|
||||||
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
|
||||||
export ac_cv_func_getpgrp_void=yes
|
export ac_cv_func_getpgrp_void=yes
|
||||||
export ac_cv_func_tzset=yes
|
export ac_cv_func_tzset=yes
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gawk;
|
cfg = config.aux.foundation.stages.stage1.gawk;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
includes = [
|
{
|
||||||
./boot.nix
|
includes = [ ./boot.nix ];
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.gawk = {
|
options.aux.foundation.stages.stage1.gawk = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -37,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -96,7 +96,8 @@ in {
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export AR="tcc -ar"
|
export AR="tcc -ar"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host}
|
--host=${platform.host}
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gcc;
|
cfg = config.aux.foundation.stages.stage1.gcc;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
includes = [
|
includes = [
|
||||||
./v4.6.nix
|
./v4.6.nix
|
||||||
./v4.6.cxx.nix
|
./v4.6.cxx.nix
|
||||||
|
@ -39,7 +38,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -198,7 +200,8 @@ in {
|
||||||
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${stage1.musl.package}/lib/libc.so"
|
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${stage1.musl.package}/lib/libc.so"
|
||||||
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
||||||
|
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gcc.v46.cxx;
|
cfg = config.aux.foundation.stages.stage1.gcc.v46.cxx;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gcc.v46.cxx = {
|
options.aux.foundation.stages.stage1.gcc.v46.cxx = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -112,7 +111,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Remove hardcoded NATIVE_SYSTEM_HEADER_DIR
|
# Remove hardcoded NATIVE_SYSTEM_HEADER_DIR
|
||||||
./patches/no-system-headers.patch
|
./patches/no-system-headers.patch
|
||||||
|
@ -162,7 +162,8 @@ in {
|
||||||
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
|
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
|
||||||
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
||||||
|
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gcc.v46;
|
cfg = config.aux.foundation.stages.stage1.gcc.v46;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gcc.v46 = {
|
options.aux.foundation.stages.stage1.gcc.v46 = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -112,7 +111,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Remove hardcoded NATIVE_SYSTEM_HEADER_DIR
|
# Remove hardcoded NATIVE_SYSTEM_HEADER_DIR
|
||||||
./patches/no-system-headers.patch
|
./patches/no-system-headers.patch
|
||||||
|
@ -163,7 +163,8 @@ in {
|
||||||
export ac_cv_func_memcpy=yes
|
export ac_cv_func_memcpy=yes
|
||||||
export ac_cv_func_strerror=yes
|
export ac_cv_func_strerror=yes
|
||||||
|
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gcc.v8;
|
cfg = config.aux.foundation.stages.stage1.gcc.v8;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gcc.v8 = {
|
options.aux.foundation.stages.stage1.gcc.v8 = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -168,7 +167,8 @@ in {
|
||||||
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
|
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
|
||||||
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
||||||
|
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -32,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gnum4;
|
cfg = config.aux.foundation.stages.stage1.gnum4;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gnum4 = {
|
options.aux.foundation.stages.stage1.gnum4 = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,7 +88,8 @@ in {
|
||||||
cd m4-${cfg.version}
|
cd m4-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gnumake;
|
cfg = config.aux.foundation.stages.stage1.gnumake;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
includes = [
|
{
|
||||||
./boot.nix
|
includes = [ ./boot.nix ];
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.gnumake = {
|
options.aux.foundation.stages.stage1.gnumake = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -37,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@ in {
|
||||||
sha256 = "3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
|
sha256 = "3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Replaces /bin/sh with sh, see patch file for reasoning
|
# Replaces /bin/sh with sh, see patch file for reasoning
|
||||||
./patches/0001-No-impure-bin-sh.patch
|
./patches/0001-No-impure-bin-sh.patch
|
||||||
|
@ -103,7 +104,8 @@ in {
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host}
|
--host=${platform.host}
|
||||||
|
|
|
@ -32,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,13 +121,8 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
objects =
|
objects =
|
||||||
builtins.map
|
builtins.map (
|
||||||
(
|
value: builtins.replaceStrings [".c"] [".o"] (builtins.baseNameOf value)
|
||||||
value:
|
|
||||||
builtins.replaceStrings
|
|
||||||
[".c"]
|
|
||||||
[".o"]
|
|
||||||
(builtins.baseNameOf value)
|
|
||||||
)
|
)
|
||||||
sources;
|
sources;
|
||||||
in
|
in
|
||||||
|
@ -134,9 +132,7 @@ in {
|
||||||
meta = cfg.meta;
|
meta = cfg.meta;
|
||||||
src = cfg.src;
|
src = cfg.src;
|
||||||
|
|
||||||
deps.build.host = [
|
deps.build.host = [stage1.tinycc.mes.compiler.package];
|
||||||
stage1.tinycc.mes.compiler.package
|
|
||||||
];
|
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
# Unpack
|
# Unpack
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in {
|
||||||
includes = [
|
includes = [./boot.nix];
|
||||||
./boot.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.gnused = {
|
options.aux.foundation.stages.stage1.gnused = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -37,7 +35,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gnutar.boot;
|
cfg = config.aux.foundation.stages.stage1.gnutar.boot;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gnutar.boot = {
|
options.aux.foundation.stages.stage1.gnutar.boot = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -35,7 +34,8 @@ in {
|
||||||
sha256 = "02m6gajm647n8l9a5bnld6fnbgdpyi4i3i83p7xcwv0kif47xhy6";
|
sha256 = "02m6gajm647n8l9a5bnld6fnbgdpyi4i3i83p7xcwv0kif47xhy6";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
in
|
in
|
||||||
builders.bash.boot.build {
|
builders.bash.boot.build {
|
||||||
name = "gnutar-boot-${cfg.version}";
|
name = "gnutar-boot-${cfg.version}";
|
||||||
|
@ -58,7 +58,8 @@ in {
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gnutar;
|
cfg = config.aux.foundation.stages.stage1.gnutar;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
includes = [
|
includes = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./musl.nix
|
./musl.nix
|
||||||
|
@ -38,7 +37,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -96,7 +98,8 @@ in {
|
||||||
cd tar-${cfg.version}
|
cd tar-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gnutar.musl;
|
cfg = config.aux.foundation.stages.stage1.gnutar.musl;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gnutar.musl = {
|
options.aux.foundation.stages.stage1.gnutar.musl = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -60,7 +59,8 @@ in {
|
||||||
export ac_cv_sizeof_unsigned_long=4
|
export ac_cv_sizeof_unsigned_long=4
|
||||||
export ac_cv_sizeof_long_long=8
|
export ac_cv_sizeof_long_long=8
|
||||||
export ac_cv_header_netdb_h=no
|
export ac_cv_header_netdb_h=no
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.gzip;
|
cfg = config.aux.foundation.stages.stage1.gzip;
|
||||||
|
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.gzip = {
|
options.aux.foundation.stages.stage1.gzip = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -32,7 +31,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,9 +63,7 @@ in {
|
||||||
sha256 = "0ryr5b00qz3xcdcv03qwjdfji8pasp0007ay3ppmk71wl8c1i90w";
|
sha256 = "0ryr5b00qz3xcdcv03qwjdfji8pasp0007ay3ppmk71wl8c1i90w";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package = builders.bash.boot.build {
|
||||||
in
|
|
||||||
builders.bash.boot.build {
|
|
||||||
name = "gzip-${cfg.version}";
|
name = "gzip-${cfg.version}";
|
||||||
meta = cfg.meta;
|
meta = cfg.meta;
|
||||||
|
|
||||||
|
@ -83,7 +83,8 @@ in {
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib -Dstrlwr=unused"
|
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib -Dstrlwr=unused"
|
||||||
bash ./configure --prefix=$out
|
chmod +x ./configure
|
||||||
|
./configure --prefix=$out
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make
|
make
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
stage2 = config.aux.foundation.stages.stage2;
|
stage2 = config.aux.foundation.stages.stage2;
|
||||||
in {
|
in {
|
||||||
includes = [
|
includes = [./devtools.nix];
|
||||||
./devtools.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.heirloom = {
|
options.aux.foundation.stages.stage1.heirloom = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -48,7 +46,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,7 +27,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
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;
|
sources = import ./sources.nix;
|
||||||
|
|
||||||
files =
|
files = lib.strings.concatMapSep " " (getSourcePath ".o") (
|
||||||
lib.strings.concatMapSep
|
builtins.map compile sources.x86.linux.mescc.mes
|
||||||
" "
|
);
|
||||||
(getSourcePath ".o")
|
|
||||||
(builtins.map compile sources.x86.linux.mescc.mes);
|
|
||||||
in
|
in
|
||||||
builders.kaem.build {
|
builders.kaem.build {
|
||||||
name = "mes-${stage1.mes.version}";
|
name = "mes-${stage1.mes.version}";
|
||||||
|
|
|
@ -32,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,9 +60,7 @@ in {
|
||||||
|
|
||||||
meta = cfg.meta;
|
meta = cfg.meta;
|
||||||
|
|
||||||
deps.build.host = [
|
deps.build.host = [stage1.ln-boot.package];
|
||||||
stage1.ln-boot.package
|
|
||||||
];
|
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
cd ${stage1.mes.libs.prefix}
|
cd ${stage1.mes.libs.prefix}
|
||||||
|
|
|
@ -34,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
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;
|
libc-mini = createLib "libc-mini" sources.x86.linux.mescc.libc_mini;
|
||||||
libmescc = createLib "libmescc" sources.x86.linux.mescc.libmescc;
|
libmescc = createLib "libmescc" sources.x86.linux.mescc.libmescc;
|
||||||
libc = createLib "libc" sources.x86.linux.mescc.libc;
|
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.
|
# We need `symlink` support for `ln-boot` to work.
|
||||||
"lib/linux/symlink.c"
|
"lib/linux/symlink.c"
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
in
|
in
|
||||||
builders.kaem.build {
|
builders.kaem.build {
|
||||||
name = "mes-m2-libs-${stage1.mes.version}";
|
name = "mes-m2-libs-${stage1.mes.version}";
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.musl.boot;
|
cfg = config.aux.foundation.stages.stage1.musl.boot;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.musl.boot = {
|
options.aux.foundation.stages.stage1.musl.boot = {
|
||||||
package = lib.options.create {
|
package = lib.options.create {
|
||||||
type = lib.types.derivation;
|
type = lib.types.derivation;
|
||||||
|
@ -35,7 +34,8 @@ in {
|
||||||
sha256 = "E3DJqBKyzyp9koAlEMygBYzDfmanvt1wBR8KNAFQIqM=";
|
sha256 = "E3DJqBKyzyp9koAlEMygBYzDfmanvt1wBR8KNAFQIqM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
# Thanks to the live-bootstrap project!
|
# Thanks to the live-bootstrap project!
|
||||||
# See https://github.com/fosslinux/live-bootstrap/blob/d98f97e21413efc32c770d0356f1feda66025686/sysa/musl-1.1.24/musl-1.1.24.sh
|
# See https://github.com/fosslinux/live-bootstrap/blob/d98f97e21413efc32c770d0356f1feda66025686/sysa/musl-1.1.24/musl-1.1.24.sh
|
||||||
liveBootstrap = "https://github.com/fosslinux/live-bootstrap/raw/d98f97e21413efc32c770d0356f1feda66025686/sysa/musl-1.1.24";
|
liveBootstrap = "https://github.com/fosslinux/live-bootstrap/raw/d98f97e21413efc32c770d0356f1feda66025686/sysa/musl-1.1.24";
|
||||||
|
@ -118,7 +118,8 @@ in {
|
||||||
src/misc/wordexp.c
|
src/misc/wordexp.c
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
@ -131,7 +132,6 @@ in {
|
||||||
# Install
|
# Install
|
||||||
make install
|
make install
|
||||||
cp ${stage1.tinycc.mes.libs.package}/lib/libtcc1.a $out/lib
|
cp ${stage1.tinycc.mes.libs.package}/lib/libtcc1.a $out/lib
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.musl;
|
cfg = config.aux.foundation.stages.stage1.musl;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
includes = [
|
{
|
||||||
./boot.nix
|
includes = [ ./boot.nix ];
|
||||||
];
|
|
||||||
|
|
||||||
options.aux.foundation.stages.stage1.musl = {
|
options.aux.foundation.stages.stage1.musl = {
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -38,7 +35,10 @@ in {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
# TODO: Support more platforms.
|
# TODO: Support more platforms.
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86-64_linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,7 +98,8 @@ in {
|
||||||
src/misc/wordexp.c
|
src/misc/wordexp.c
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -35,7 +35,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.python;
|
cfg = config.aux.foundation.stages.stage1.python;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.python = {
|
options.aux.foundation.stages.stage1.python = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,7 +64,8 @@ in {
|
||||||
sha256 = "eVw09E30Wg6blxDIxxwVxnGHFSTNQSyhTe8hLozLFV0=";
|
sha256 = "eVw09E30Wg6blxDIxxwVxnGHFSTNQSyhTe8hLozLFV0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Disable the use of ldconfig in ctypes.util.find_library (since
|
# Disable the use of ldconfig in ctypes.util.find_library (since
|
||||||
# ldconfig doesn't work on NixOS), and don't use
|
# ldconfig doesn't work on NixOS), and don't use
|
||||||
|
@ -104,7 +107,8 @@ in {
|
||||||
export C_INCLUDE_PATH="${stage1.zlib.package}/include"
|
export C_INCLUDE_PATH="${stage1.zlib.package}/include"
|
||||||
export LIBRARY_PATH="${stage1.zlib.package}/lib"
|
export LIBRARY_PATH="${stage1.zlib.package}/lib"
|
||||||
export LD_LIBRARY_PATH="$LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$LIBRARY_PATH"
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host}
|
--host=${platform.host}
|
||||||
|
|
|
@ -38,7 +38,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.xz;
|
cfg = config.aux.foundation.stages.stage1.xz;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.xz = {
|
options.aux.foundation.stages.stage1.xz = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -36,7 +35,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,7 +91,8 @@ in {
|
||||||
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
|
||||||
export AR="tcc -ar"
|
export AR="tcc -ar"
|
||||||
export LD=tcc
|
export LD=tcc
|
||||||
bash ./configure \
|
chmod +x configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage1.zlib;
|
cfg = config.aux.foundation.stages.stage1.zlib;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage1.zlib = {
|
options.aux.foundation.stages.stage1.zlib = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,7 +86,8 @@ in {
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
export CC=musl-gcc
|
export CC=musl-gcc
|
||||||
bash ./configure --prefix=$out
|
chmod +x configure
|
||||||
|
./configure --prefix=$out
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make -j $NIX_BUILD_CORES
|
make -j $NIX_BUILD_CORES
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.bash;
|
cfg = config.aux.foundation.stages.stage2.bash;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.bash = {
|
options.aux.foundation.stages.stage2.bash = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -95,7 +97,8 @@ in {
|
||||||
cd bash-${cfg.version}
|
cd bash-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.binutils;
|
cfg = config.aux.foundation.stages.stage2.binutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.binutils = {
|
options.aux.foundation.stages.stage2.binutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,7 +64,8 @@ in {
|
||||||
sha256 = "rppXieI0WeWWBuZxRyPy0//DHAMXQZHvDQFb3wYAdFA=";
|
sha256 = "rppXieI0WeWWBuZxRyPy0//DHAMXQZHvDQFb3wYAdFA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Make binutils output deterministic by default.
|
# Make binutils output deterministic by default.
|
||||||
./patches/deterministic.patch
|
./patches/deterministic.patch
|
||||||
|
@ -120,7 +123,8 @@ in {
|
||||||
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
|
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure ${builtins.concatStringsSep " " configureFlags}
|
chmod +x ./configure
|
||||||
|
./configure ${builtins.concatStringsSep " " configureFlags}
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make -j $NIX_BUILD_CORES
|
make -j $NIX_BUILD_CORES
|
||||||
|
|
|
@ -34,7 +34,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,9 +67,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package = let
|
||||||
patches = [
|
patches = [./patches/busybox-in-store.patch];
|
||||||
./patches/busybox-in-store.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
busyboxConfig = [
|
busyboxConfig = [
|
||||||
"CC=musl-gcc"
|
"CC=musl-gcc"
|
||||||
|
|
|
@ -34,7 +34,10 @@ in {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
# TODO: Support more platforms.
|
# TODO: Support more platforms.
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.coreutils;
|
cfg = config.aux.foundation.stages.stage2.coreutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.coreutils = {
|
options.aux.foundation.stages.stage2.coreutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,7 +64,8 @@ in {
|
||||||
sha256 = "X2ANkJOXOwr+JTk9m8GMRPIjJlf0yg2V6jHHAutmtzk=";
|
sha256 = "X2ANkJOXOwr+JTk9m8GMRPIjJlf0yg2V6jHHAutmtzk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--prefix=${builtins.placeholder "out"}"
|
"--prefix=${builtins.placeholder "out"}"
|
||||||
"--build=${platform.build}"
|
"--build=${platform.build}"
|
||||||
|
@ -99,7 +102,8 @@ in {
|
||||||
cd coreutils-${cfg.version}
|
cd coreutils-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure ${builtins.concatStringsSep " " configureFlags}
|
chmod +x ./configure
|
||||||
|
./configure ${builtins.concatStringsSep " " configureFlags}
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make -j $NIX_BUILD_CORES
|
make -j $NIX_BUILD_CORES
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.diffutils;
|
cfg = config.aux.foundation.stages.stage2.diffutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.diffutils = {
|
options.aux.foundation.stages.stage2.diffutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +89,8 @@ in {
|
||||||
cd diffutils-${cfg.version}
|
cd diffutils-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.findutils;
|
cfg = config.aux.foundation.stages.stage2.findutils;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.findutils = {
|
options.aux.foundation.stages.stage2.findutils = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +89,8 @@ in {
|
||||||
cd findutils-${cfg.version}
|
cd findutils-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gawk;
|
cfg = config.aux.foundation.stages.stage2.gawk;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gawk = {
|
options.aux.foundation.stages.stage2.gawk = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -93,7 +95,8 @@ in {
|
||||||
cd gawk-${cfg.version}
|
cd gawk-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gcc;
|
cfg = config.aux.foundation.stages.stage2.gcc;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gcc = {
|
options.aux.foundation.stages.stage2.gcc = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,7 +194,8 @@ in {
|
||||||
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${stage1.musl.package}/lib/libc.so"
|
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${stage1.musl.package}/lib/libc.so"
|
||||||
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
export LIBRARY_PATH="${stage1.musl.package}/lib"
|
||||||
|
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.glibc;
|
cfg = config.aux.foundation.stages.stage2.glibc;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
|
@ -9,7 +7,8 @@
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
stage2 = config.aux.foundation.stages.stage2;
|
stage2 = config.aux.foundation.stages.stage2;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.glibc = {
|
options.aux.foundation.stages.stage2.glibc = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -34,7 +33,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -92,7 +94,8 @@ in {
|
||||||
cd build
|
cd build
|
||||||
# libstdc++.so is built against musl and fails to link
|
# libstdc++.so is built against musl and fails to link
|
||||||
export CXX=false
|
export CXX=false
|
||||||
bash ../configure \
|
chmod +x ../configure
|
||||||
|
../configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gnugrep;
|
cfg = config.aux.foundation.stages.stage2.gnugrep;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gnugrep = {
|
options.aux.foundation.stages.stage2.gnugrep = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -92,7 +94,8 @@ in {
|
||||||
cd grep-${cfg.version}
|
cd grep-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gnumake;
|
cfg = config.aux.foundation.stages.stage2.gnumake;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
|
@ -9,7 +7,8 @@
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
stage2 = config.aux.foundation.stages.stage2;
|
stage2 = config.aux.foundation.stages.stage2;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gnumake = {
|
options.aux.foundation.stages.stage2.gnumake = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -34,7 +33,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -63,7 +65,8 @@ in {
|
||||||
sha256 = "3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
|
sha256 = "3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
patches = [
|
patches = [
|
||||||
# Replaces /bin/sh with sh, see patch file for reasoning
|
# Replaces /bin/sh with sh, see patch file for reasoning
|
||||||
./patches/0001-No-impure-bin-sh.patch
|
./patches/0001-No-impure-bin-sh.patch
|
||||||
|
@ -102,7 +105,8 @@ in {
|
||||||
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
|
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gnupatch;
|
cfg = config.aux.foundation.stages.stage2.gnupatch;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gnupatch = {
|
options.aux.foundation.stages.stage2.gnupatch = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,7 +90,8 @@ in {
|
||||||
cd patch-${cfg.version}
|
cd patch-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gnused;
|
cfg = config.aux.foundation.stages.stage2.gnused;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gnused = {
|
options.aux.foundation.stages.stage2.gnused = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -94,7 +96,8 @@ in {
|
||||||
cd sed-${cfg.version}
|
cd sed-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gnutar;
|
cfg = config.aux.foundation.stages.stage2.gnutar;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gnutar = {
|
options.aux.foundation.stages.stage2.gnutar = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mainProgram = lib.options.create {
|
mainProgram = lib.options.create {
|
||||||
|
@ -93,7 +95,8 @@ in {
|
||||||
cd tar-${cfg.version}
|
cd tar-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.gzip;
|
cfg = config.aux.foundation.stages.stage2.gzip;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
builders = config.aux.foundation.builders;
|
builders = config.aux.foundation.builders;
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.gzip = {
|
options.aux.foundation.stages.stage2.gzip = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -33,7 +32,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,7 +88,8 @@ in {
|
||||||
cd gzip-${cfg.version}
|
cd gzip-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{ lib, config }:
|
||||||
lib,
|
let
|
||||||
config,
|
|
||||||
}: let
|
|
||||||
cfg = config.aux.foundation.stages.stage2.patchelf;
|
cfg = config.aux.foundation.stages.stage2.patchelf;
|
||||||
|
|
||||||
platform = config.aux.platform;
|
platform = config.aux.platform;
|
||||||
|
@ -9,7 +7,8 @@
|
||||||
|
|
||||||
stage1 = config.aux.foundation.stages.stage1;
|
stage1 = config.aux.foundation.stages.stage1;
|
||||||
stage2 = config.aux.foundation.stages.stage2;
|
stage2 = config.aux.foundation.stages.stage2;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.aux.foundation.stages.stage2.patchelf = {
|
options.aux.foundation.stages.stage2.patchelf = {
|
||||||
meta = {
|
meta = {
|
||||||
description = lib.options.create {
|
description = lib.options.create {
|
||||||
|
@ -34,7 +33,10 @@ in {
|
||||||
platforms = lib.options.create {
|
platforms = lib.options.create {
|
||||||
type = lib.types.list.of lib.types.string;
|
type = lib.types.list.of lib.types.string;
|
||||||
description = "Platforms the package supports.";
|
description = "Platforms the package supports.";
|
||||||
default.value = ["i686-linux"];
|
default.value = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +89,8 @@ in {
|
||||||
cd patchelf-${cfg.version}
|
cd patchelf-${cfg.version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
bash ./configure \
|
chmod +x ./configure
|
||||||
|
./configure \
|
||||||
--prefix=$out \
|
--prefix=$out \
|
||||||
--build=${platform.build} \
|
--build=${platform.build} \
|
||||||
--host=${platform.host} \
|
--host=${platform.host} \
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
options.aux = {
|
options.aux = {
|
||||||
system = lib.options.create {
|
system = lib.options.create {
|
||||||
type = lib.types.string;
|
type = lib.types.string;
|
||||||
default.value = "i686-linux";
|
default.value = "x86_64-linux";
|
||||||
description = ''
|
description = ''
|
||||||
The system to build packages for. This value can be provided as either
|
The system to build packages for. This value can be provided as either
|
||||||
`config.aux.system` or by setting the `system` argument for modules.
|
`config.aux.system` or by setting the `system` argument for modules.
|
||||||
|
|
|
@ -59,7 +59,34 @@ lib: {
|
||||||
};
|
};
|
||||||
|
|
||||||
apply = {
|
apply = {
|
||||||
# defaults = graph: defaults:
|
## Apply a set of defaults to a graph. This will ensure that missing entries are added
|
||||||
|
## and any entries that do exist are given the appropriate `before` and `after` values.
|
||||||
|
##
|
||||||
|
## @type Dag a -> Dag a -> Dag a
|
||||||
|
defaults = graph: defaults: let
|
||||||
|
result =
|
||||||
|
builtins.mapAttrs
|
||||||
|
(
|
||||||
|
name: entry:
|
||||||
|
if defaults ? ${name}
|
||||||
|
then
|
||||||
|
if builtins.isString entry
|
||||||
|
then {
|
||||||
|
value = entry;
|
||||||
|
before = defaults.${name}.before or [];
|
||||||
|
after = defaults.${name}.after or [];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
entry
|
||||||
|
// {
|
||||||
|
before = (entry.before or []) ++ (defaults.${name}.before or []);
|
||||||
|
after = (entry.after or []) ++ (defaults.${name}.after or []);
|
||||||
|
}
|
||||||
|
else entry
|
||||||
|
)
|
||||||
|
graph;
|
||||||
|
in
|
||||||
|
defaults // result;
|
||||||
};
|
};
|
||||||
|
|
||||||
## Map over the entries in a DAG and modify their values.
|
## Map over the entries in a DAG and modify their values.
|
||||||
|
|
|
@ -820,6 +820,7 @@ lib: {
|
||||||
check = value: builtins.isAttrs value || builtins.isFunction value || lib.types.path.check value;
|
check = value: builtins.isAttrs value || builtins.isFunction value || lib.types.path.check value;
|
||||||
merge = location: definitions: let
|
merge = location: definitions: let
|
||||||
result = base.extend {
|
result = base.extend {
|
||||||
|
prefix = location;
|
||||||
modules =
|
modules =
|
||||||
[{config.__module__.args.dynamic.name = lib.lists.last location;}]
|
[{config.__module__.args.dynamic.name = lib.lists.last location;}]
|
||||||
++ getModules definitions;
|
++ getModules definitions;
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "foundation",
|
"dir": "foundation",
|
||||||
"dirtyRev": "0312e3c4cc261e2384fcf372c766a0cf245f3213-dirty",
|
"dirtyRev": "9850da8aa9dc9be22e237c9b424a18e801e53ecb-dirty",
|
||||||
"dirtyShortRev": "0312e3c-dirty",
|
"dirtyShortRev": "9850da8-dirty",
|
||||||
"lastModified": 1718460525,
|
"lastModified": 1718529861,
|
||||||
"narHash": "sha256-+ToaXY8ISWLx9AtO/CjfY/6SGuKu8A/d9ncqE4h2H20=",
|
"narHash": "sha256-X1Wd6mDz8GTaoxt1ylkvZfrJOcZtspJrEjXMtJ2ZyG0=",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:../?dir=foundation"
|
"url": "file:../?dir=foundation"
|
||||||
},
|
},
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
"lib": {
|
"lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"dir": "lib",
|
||||||
"dirtyRev": "0312e3c4cc261e2384fcf372c766a0cf245f3213-dirty",
|
"dirtyRev": "9850da8aa9dc9be22e237c9b424a18e801e53ecb-dirty",
|
||||||
"dirtyShortRev": "0312e3c-dirty",
|
"dirtyShortRev": "9850da8-dirty",
|
||||||
"lastModified": 1718460525,
|
"lastModified": 1718529861,
|
||||||
"narHash": "sha256-+ToaXY8ISWLx9AtO/CjfY/6SGuKu8A/d9ncqE4h2H20=",
|
"narHash": "sha256-X1Wd6mDz8GTaoxt1ylkvZfrJOcZtspJrEjXMtJ2ZyG0=",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:../?dir=lib"
|
"url": "file:../?dir=lib"
|
||||||
},
|
},
|
||||||
|
|
|
@ -24,6 +24,10 @@ in {
|
||||||
# }))
|
# }))
|
||||||
# .config;
|
# .config;
|
||||||
foundation-gcc = config.packages.foundation.gcc;
|
foundation-gcc = config.packages.foundation.gcc;
|
||||||
|
foundation-binutils = config.packages.foundation.binutils;
|
||||||
|
foundation-linux-headers = config.packages.foundation.linux-headers.versions.latest.extend {
|
||||||
|
platform.host = lib.modules.overrides.force "x86_64-linux";
|
||||||
|
};
|
||||||
# example-x = config.packages.example.x;
|
# example-x = config.packages.example.x;
|
||||||
# cross-example-x-x86_64-linux = config.packages.cross.x86_64-linux.example.x;
|
# cross-example-x-x86_64-linux = config.packages.cross.x86_64-linux.example.x;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,7 @@ in {
|
||||||
builtins.mapAttrs
|
builtins.mapAttrs
|
||||||
(
|
(
|
||||||
name: package: let
|
name: package: let
|
||||||
result = lib'.packages.build package system system;
|
result = lib'.packages.build package system system system;
|
||||||
in
|
in
|
||||||
result
|
result
|
||||||
)
|
)
|
||||||
|
|
|
@ -21,37 +21,37 @@
|
||||||
in
|
in
|
||||||
builtins.head sorted;
|
builtins.head sorted;
|
||||||
|
|
||||||
build = package: system: cross: let
|
build = package: build: host: target: let
|
||||||
resolved =
|
resolved =
|
||||||
if package ? versions
|
if package ? versions
|
||||||
then package.versions.${config.preferences.packages.version} or (package.versions.${lib'.packages.getLatest package})
|
then package.versions.${config.preferences.packages.version} or (package.versions.${lib'.packages.getLatest package})
|
||||||
else package;
|
else package;
|
||||||
|
|
||||||
buildDependencies = builtins.mapAttrs (name: dep: lib'.packages.build dep system cross);
|
buildDependencies = build': host': target': builtins.mapAttrs (name: dep: lib'.packages.build dep build' host' target');
|
||||||
|
|
||||||
result = resolved.extend ({config}: {
|
result = resolved.extend ({config}: {
|
||||||
config = {
|
config = {
|
||||||
platform = {
|
platform = {
|
||||||
build = system;
|
build = build;
|
||||||
host = cross;
|
host = host;
|
||||||
target = lib.modules.override 150 cross;
|
target = lib.modules.override 150 target;
|
||||||
};
|
};
|
||||||
|
|
||||||
deps = {
|
deps = {
|
||||||
build = {
|
build = {
|
||||||
only = buildDependencies resolved.deps.build.only;
|
only = buildDependencies build build build resolved.deps.build.only;
|
||||||
build = buildDependencies resolved.deps.build.build;
|
build = buildDependencies build build target resolved.deps.build.build;
|
||||||
host = buildDependencies resolved.deps.build.host;
|
host = buildDependencies build host target resolved.deps.build.host;
|
||||||
target = buildDependencies resolved.deps.build.target;
|
target = buildDependencies build target target resolved.deps.build.target;
|
||||||
};
|
};
|
||||||
host = {
|
host = {
|
||||||
only = buildDependencies resolved.deps.host.only;
|
only = buildDependencies host host host resolved.deps.host.only;
|
||||||
host = buildDependencies resolved.deps.host.host;
|
host = buildDependencies host host target resolved.deps.host.host;
|
||||||
target = buildDependencies resolved.deps.host.target;
|
target = buildDependencies host target target resolved.deps.host.target;
|
||||||
};
|
};
|
||||||
target = {
|
target = {
|
||||||
only = buildDependencies resolved.deps.target.only;
|
only = buildDependencies target target target resolved.deps.target.only;
|
||||||
target = buildDependencies resolved.deps.target.target;
|
target = buildDependencies target target target resolved.deps.target.target;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
result.config;
|
result;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,13 @@
|
||||||
|
|
||||||
matchAnyAttrs = patterns:
|
matchAnyAttrs = patterns:
|
||||||
if builtins.isList patterns
|
if builtins.isList patterns
|
||||||
then value: builtins.any (pattern: lib.attrs.match pattern value) patterns
|
then
|
||||||
|
value:
|
||||||
|
builtins.any (pattern:
|
||||||
|
if builtins.isFunction pattern
|
||||||
|
then pattern value
|
||||||
|
else matchAnyAttrs pattern value)
|
||||||
|
patterns
|
||||||
else lib.attrs.match patterns;
|
else lib.attrs.match patterns;
|
||||||
|
|
||||||
getDoubles = predicate:
|
getDoubles = predicate:
|
||||||
|
@ -1586,8 +1592,8 @@ in {
|
||||||
};
|
};
|
||||||
isArmv7 =
|
isArmv7 =
|
||||||
map ({arch, ...}: {cpu = {inherit arch;};})
|
map ({arch, ...}: {cpu = {inherit arch;};})
|
||||||
(lib.filter (cpu: lib.hasPrefix "armv7" cpu.arch or "")
|
(builtins.filter (cpu: lib.strings.hasPrefix "armv7" cpu.arch or "")
|
||||||
(lib.attrValues types.cpus));
|
(builtins.attrValues types.cpus));
|
||||||
isAarch64 = {
|
isAarch64 = {
|
||||||
cpu = {
|
cpu = {
|
||||||
family = "arm";
|
family = "arm";
|
||||||
|
@ -1926,7 +1932,7 @@ in {
|
||||||
// lib'.systems.platforms.select resolved)
|
// lib'.systems.platforms.select resolved)
|
||||||
linux-kernel
|
linux-kernel
|
||||||
gcc
|
gcc
|
||||||
rust
|
rustc
|
||||||
;
|
;
|
||||||
|
|
||||||
double = lib'.systems.into.double resolved.system;
|
double = lib'.systems.into.double resolved.system;
|
||||||
|
@ -2097,7 +2103,7 @@ in {
|
||||||
then "x86" # not i386
|
then "x86" # not i386
|
||||||
else if resolved.isMips64
|
else if resolved.isMips64
|
||||||
then "mips64" # uboot *does* distinguish between mips32/mips64
|
then "mips64" # uboot *does* distinguish between mips32/mips64
|
||||||
else resolved.linuxArch; # other cases appear to agree with linuxArch
|
else resolved.linux.arch # other cases appear to agree with linuxArch
|
||||||
|
|
||||||
qemu.arch =
|
qemu.arch =
|
||||||
if resolved.isAarch32
|
if resolved.isAarch32
|
||||||
|
@ -2162,7 +2168,7 @@ in {
|
||||||
}
|
}
|
||||||
// builtins.mapAttrs (name: match: match resolved.system) lib'.systems.match
|
// builtins.mapAttrs (name: match: match resolved.system) lib'.systems.match
|
||||||
// builtins.mapAttrs (name: validate: validate (resolved.gcc.arch or "default")) lib'.systems.validate.architecture
|
// builtins.mapAttrs (name: validate: validate (resolved.gcc.arch or "default")) lib'.systems.validate.architecture
|
||||||
// settings;
|
// (builtins.removeAttrs settings ["system"]);
|
||||||
|
|
||||||
assertions =
|
assertions =
|
||||||
builtins.foldl'
|
builtins.foldl'
|
||||||
|
|
|
@ -82,13 +82,15 @@
|
||||||
extend = lib.options.create {
|
extend = lib.options.create {
|
||||||
description = "Extend the package's submodules with additional configuration.";
|
description = "Extend the package's submodules with additional configuration.";
|
||||||
type = lib.types.function lib.types.raw;
|
type = lib.types.function lib.types.raw;
|
||||||
default.value = value:
|
default.value = value: let
|
||||||
meta.extend {
|
result = meta.extend {
|
||||||
modules =
|
modules =
|
||||||
if builtins.isAttrs value
|
if builtins.isAttrs value
|
||||||
then [{config = value;}]
|
then [{config = value;}]
|
||||||
else lib.lists.from.any value;
|
else lib.lists.from.any value;
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
result.config;
|
||||||
};
|
};
|
||||||
|
|
||||||
name = lib.options.create {
|
name = lib.options.create {
|
||||||
|
@ -172,40 +174,47 @@
|
||||||
default.value = "x86_64-linux";
|
default.value = "x86_64-linux";
|
||||||
apply = raw: let
|
apply = raw: let
|
||||||
system = lib'.systems.from.string raw;
|
system = lib'.systems.from.string raw;
|
||||||
in {
|
x = lib'.systems.withBuildInfo raw;
|
||||||
inherit raw system;
|
in
|
||||||
|
x;
|
||||||
double = lib'.systems.into.double system;
|
|
||||||
triple = lib'.systems.into.triple system;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
host = lib.options.create {
|
host = lib.options.create {
|
||||||
description = "The host platform for the package.";
|
description = "The host platform for the package.";
|
||||||
type = lib.types.string;
|
type = lib.types.string;
|
||||||
default.value = "x86_64-linux";
|
default.value = "x86_64-linux";
|
||||||
|
# apply = raw: let
|
||||||
|
# system = lib'.systems.from.string raw;
|
||||||
|
# in {
|
||||||
|
# inherit raw system;
|
||||||
|
|
||||||
|
# double = lib'.systems.into.double system;
|
||||||
|
# triple = lib'.systems.into.triple system;
|
||||||
|
# };
|
||||||
apply = raw: let
|
apply = raw: let
|
||||||
system = lib'.systems.from.string raw;
|
system = lib'.systems.from.string raw;
|
||||||
in {
|
x = lib'.systems.withBuildInfo raw;
|
||||||
inherit raw system;
|
in
|
||||||
|
x;
|
||||||
double = lib'.systems.into.double system;
|
|
||||||
triple = lib'.systems.into.triple system;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
target = lib.options.create {
|
target = lib.options.create {
|
||||||
description = "The target platform for the package.";
|
description = "The target platform for the package.";
|
||||||
type = lib.types.string;
|
type = lib.types.string;
|
||||||
default.value = "x86_64-linux";
|
default.value = "x86_64-linux";
|
||||||
|
# apply = raw: let
|
||||||
|
# system = lib'.systems.from.string raw;
|
||||||
|
# in {
|
||||||
|
# inherit raw system;
|
||||||
|
|
||||||
|
# double = lib'.systems.into.double system;
|
||||||
|
# triple = lib'.systems.into.triple system;
|
||||||
|
# };
|
||||||
apply = raw: let
|
apply = raw: let
|
||||||
system = lib'.systems.from.string raw;
|
system = lib'.systems.from.string raw;
|
||||||
in {
|
x = lib'.systems.withBuildInfo raw;
|
||||||
inherit raw system;
|
in
|
||||||
|
x;
|
||||||
double = lib'.systems.into.double system;
|
|
||||||
triple = lib'.systems.into.triple system;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
117
tidepool/src/packages/foundation/binutils/default.nix
Normal file
117
tidepool/src/packages/foundation/binutils/default.nix
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
lib',
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
}: let
|
||||||
|
inherit
|
||||||
|
(config)
|
||||||
|
mirrors
|
||||||
|
builders
|
||||||
|
# These are the upstream foundational packages exported from the Aux Foundation project.
|
||||||
|
|
||||||
|
foundation
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
config.packages.foundation.binutils = {
|
||||||
|
versions = {
|
||||||
|
"latest" = {
|
||||||
|
config,
|
||||||
|
meta,
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
src = lib.options.create {
|
||||||
|
type = lib.types.derivation;
|
||||||
|
description = "Source for the package.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
meta = {
|
||||||
|
platforms = ["i686-linux"];
|
||||||
|
};
|
||||||
|
|
||||||
|
pname = "binutils";
|
||||||
|
version = "2.41";
|
||||||
|
|
||||||
|
builder = builders.basic;
|
||||||
|
|
||||||
|
env = {
|
||||||
|
PATH = lib.paths.bin [
|
||||||
|
foundation.stage2-gcc
|
||||||
|
foundation.stage2-binutils
|
||||||
|
foundation.stage2-gnumake
|
||||||
|
foundation.stage2-gnupatch
|
||||||
|
foundation.stage2-gnused
|
||||||
|
foundation.stage2-gnugrep
|
||||||
|
foundation.stage2-gawk
|
||||||
|
foundation.stage2-diffutils
|
||||||
|
foundation.stage2-findutils
|
||||||
|
foundation.stage2-gnutar
|
||||||
|
foundation.stage1-xz
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = let
|
||||||
|
patches = [
|
||||||
|
# Make binutils output deterministic by default.
|
||||||
|
./patches/deterministic.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
# "CC=musl-gcc"
|
||||||
|
"LDFLAGS=--static"
|
||||||
|
"--prefix=${builtins.placeholder "out"}"
|
||||||
|
"--build=${config.platform.build.triple}"
|
||||||
|
"--host=${config.platform.host.triple}"
|
||||||
|
"--target=${config.platform.target.triple}"
|
||||||
|
|
||||||
|
"--with-sysroot=/"
|
||||||
|
"--enable-deterministic-archives"
|
||||||
|
# depends on bison
|
||||||
|
"--disable-gprofng"
|
||||||
|
|
||||||
|
# Turn on --enable-new-dtags by default to make the linker set
|
||||||
|
# RUNPATH instead of RPATH on binaries. This is important because
|
||||||
|
# RUNPATH can be overridden using LD_LIBRARY_PATH at runtime.
|
||||||
|
"--enable-new-dtags"
|
||||||
|
|
||||||
|
# By default binutils searches $libdir for libraries. This brings in
|
||||||
|
# libbfd and libopcodes into a default visibility. Drop default lib
|
||||||
|
# path to force users to declare their use of these libraries.
|
||||||
|
"--with-lib-path=:"
|
||||||
|
|
||||||
|
"--disable-multilib"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
unpack = lib.dag.entry.before ["patch"] ''
|
||||||
|
tar xf ${config.src}
|
||||||
|
cd binutils-${config.version}
|
||||||
|
'';
|
||||||
|
|
||||||
|
patch = lib.dag.entry.between ["configure"] ["unpack"] ''
|
||||||
|
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
|
||||||
|
'';
|
||||||
|
|
||||||
|
configure = lib.dag.entry.between ["build"] ["patch"] ''
|
||||||
|
bash ./configure ${builtins.concatStringsSep " " configureFlags}
|
||||||
|
'';
|
||||||
|
|
||||||
|
build = lib.dag.entry.between ["install"] ["configure"] ''
|
||||||
|
make -j $NIX_BUILD_CORES
|
||||||
|
'';
|
||||||
|
|
||||||
|
install = lib.dag.entry.after ["build"] ''
|
||||||
|
make -j $NIX_BUILD_CORES install-strip
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
src = builtins.fetchurl {
|
||||||
|
url = "${mirrors.gnu}/binutils/binutils-${config.version}.tar.xz";
|
||||||
|
sha256 = "rppXieI0WeWWBuZxRyPy0//DHAMXQZHvDQFb3wYAdFA=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff -ur orig/binutils-2.23.1/ld/ldlang.c binutils-2.23.1/ld/ldlang.c
|
||||||
|
--- orig/ld/ldlang.c
|
||||||
|
+++ new/ld/ldlang.c
|
||||||
|
@@ -3095,6 +3095,8 @@
|
||||||
|
ldfile_output_machine))
|
||||||
|
einfo (_("%P%F:%s: can not set architecture: %E\n"), name);
|
||||||
|
|
||||||
|
+ link_info.output_bfd->flags |= BFD_DETERMINISTIC_OUTPUT;
|
||||||
|
+
|
||||||
|
link_info.hash = bfd_link_hash_table_create (link_info.output_bfd);
|
||||||
|
if (link_info.hash == NULL)
|
||||||
|
einfo (_("%P%F: can not create hash table: %E\n"));
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
}: {
|
}: {
|
||||||
includes = [
|
includes = [
|
||||||
./gcc
|
./gcc
|
||||||
|
./binutils
|
||||||
|
./linux-headers
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
in {
|
in {
|
||||||
config.packages.foundation.gcc = {
|
config.packages.foundation.gcc = {
|
||||||
versions = {
|
versions = {
|
||||||
"13.2.0" = {
|
"latest" = {
|
||||||
config,
|
config,
|
||||||
meta,
|
meta,
|
||||||
}: {
|
}: {
|
||||||
|
@ -98,9 +98,12 @@ in {
|
||||||
then foundation.stage2-gcc
|
then foundation.stage2-gcc
|
||||||
# Otherwise we are going to need a cross-compiler.
|
# Otherwise we are going to need a cross-compiler.
|
||||||
else
|
else
|
||||||
|
# TODO: Create a gcc-cross package.
|
||||||
(meta.extend (args: {
|
(meta.extend (args: {
|
||||||
config = {
|
config = {
|
||||||
platform = {
|
platform = {
|
||||||
|
build = config.platform.build.triple;
|
||||||
|
host = config.platform.build.triple;
|
||||||
target = lib.modules.override.force config.platform.host.triple;
|
target = lib.modules.override.force config.platform.host.triple;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -126,6 +129,14 @@ in {
|
||||||
|
|
||||||
phases = let
|
phases = let
|
||||||
host = lib'.systems.withBuildInfo config.platform.host;
|
host = lib'.systems.withBuildInfo config.platform.host;
|
||||||
|
|
||||||
|
mbits =
|
||||||
|
if host.system.cpu.family == "x86"
|
||||||
|
then
|
||||||
|
if host.is64bit
|
||||||
|
then "-m64"
|
||||||
|
else "-m32"
|
||||||
|
else "";
|
||||||
in {
|
in {
|
||||||
unpack = lib.dag.entry.before ["patch"] ''
|
unpack = lib.dag.entry.before ["patch"] ''
|
||||||
# Unpack
|
# Unpack
|
||||||
|
@ -150,7 +161,7 @@ in {
|
||||||
|
|
||||||
configure = lib.dag.entry.between ["build"] ["patch"] ''
|
configure = lib.dag.entry.between ["build"] ["patch"] ''
|
||||||
# Configure
|
# Configure
|
||||||
export CC="gcc -Wl,-dynamic-linker -march=${host.gcc.arch or host.system.cpu.arch} -Wl,${foundation.stage1-musl}/lib/libc.so"
|
export CC="gcc -Wl,-dynamic-linker -march=${host.gcc.arch or host.system.cpu.family} ${mbits} -Wl,${foundation.stage1-musl}/lib/libc.so"
|
||||||
export CXX="g++ -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
|
export CXX="g++ -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
|
||||||
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
|
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
|
||||||
export LIBRARY_PATH="${foundation.stage1-musl}/lib"
|
export LIBRARY_PATH="${foundation.stage1-musl}/lib"
|
||||||
|
|
112
tidepool/src/packages/foundation/glibc/default.nix
Normal file
112
tidepool/src/packages/foundation/glibc/default.nix
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
lib',
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
}: let
|
||||||
|
inherit
|
||||||
|
(config)
|
||||||
|
mirrors
|
||||||
|
builders
|
||||||
|
# These are the upstream foundational packages exported from the Aux Foundation project.
|
||||||
|
|
||||||
|
foundation
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
config.packages.foundation.glibc = {
|
||||||
|
versions = {
|
||||||
|
"latest" = {
|
||||||
|
config,
|
||||||
|
meta,
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
src = lib.options.create {
|
||||||
|
type = lib.types.derivation;
|
||||||
|
description = "Source for the package.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
meta = {
|
||||||
|
platforms = ["i686-linux"];
|
||||||
|
};
|
||||||
|
|
||||||
|
pname = "gcc";
|
||||||
|
version = "2.38";
|
||||||
|
|
||||||
|
src = builtins.fetchurl {
|
||||||
|
url = "${mirrors.gnu}/libc/glibc-${config.version}.tar.xz";
|
||||||
|
sha256 = "+4KZiZiyspllRnvBtp0VLpwwfSzzAcnq+0VVt3DvP9I=";
|
||||||
|
};
|
||||||
|
|
||||||
|
builder = builders.basic;
|
||||||
|
|
||||||
|
env = {
|
||||||
|
PATH = let
|
||||||
|
gcc =
|
||||||
|
if config.platform.build.triple == config.platform.host.triple
|
||||||
|
# If we're on the same system then we can use the existing GCC instance.
|
||||||
|
then foundation.stage2-gcc
|
||||||
|
# Otherwise we are going to need a cross-compiler.
|
||||||
|
else
|
||||||
|
(meta.extend (args: {
|
||||||
|
config = {
|
||||||
|
platform = {
|
||||||
|
build = config.platform.build.triple;
|
||||||
|
host = config.platform.build.triple;
|
||||||
|
target = lib.modules.override.force config.platform.host.triple;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}))
|
||||||
|
.config
|
||||||
|
.package;
|
||||||
|
in
|
||||||
|
lib.paths.bin [
|
||||||
|
foundation.stage2-gcc
|
||||||
|
foundation.stage2-binutils
|
||||||
|
foundation.stage2-gnumake
|
||||||
|
foundation.stage2-gnused
|
||||||
|
foundation.stage2-gnugrep
|
||||||
|
foundation.stage2-gawk
|
||||||
|
foundation.stage2-diffutils
|
||||||
|
foundation.stage2-findutils
|
||||||
|
foundation.stage2-gnutar
|
||||||
|
foundation.stage2-gzip
|
||||||
|
foundation.stage2-bzip2
|
||||||
|
foundation.stage1-xz
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = {
|
||||||
|
unpack = lib.dag.entry.before ["patch"] ''
|
||||||
|
tar xf ${config.src}
|
||||||
|
cd glibc-${config.version}
|
||||||
|
'';
|
||||||
|
|
||||||
|
configure = lib.dag.entry.between ["build"] ["patch"] ''
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
# libstdc++.so is built against musl and fails to link
|
||||||
|
export CXX=false
|
||||||
|
bash ../configure \
|
||||||
|
--prefix=$out \
|
||||||
|
--build=${config.platform.build.triple} \
|
||||||
|
--host=${config.platform.host.triple} \
|
||||||
|
--with-headers=${foundation.stage1-linux-headers}/include
|
||||||
|
'';
|
||||||
|
|
||||||
|
build = lib.dag.entry.between ["install"] ["configure"] ''
|
||||||
|
# Build
|
||||||
|
make -j $NIX_BUILD_CORES
|
||||||
|
'';
|
||||||
|
|
||||||
|
install = lib.dag.entry.after ["build"] ''
|
||||||
|
# Install
|
||||||
|
make -j $NIX_BUILD_CORES install-strip
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
89
tidepool/src/packages/foundation/linux-headers/default.nix
Normal file
89
tidepool/src/packages/foundation/linux-headers/default.nix
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
lib',
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
}: let
|
||||||
|
inherit
|
||||||
|
(config)
|
||||||
|
mirrors
|
||||||
|
builders
|
||||||
|
# These are the upstream foundational packages exported from the Aux Foundation project.
|
||||||
|
|
||||||
|
foundation
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
config.packages.foundation.linux-headers = {
|
||||||
|
versions = {
|
||||||
|
"latest" = {
|
||||||
|
config,
|
||||||
|
meta,
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
src = lib.options.create {
|
||||||
|
type = lib.types.derivation;
|
||||||
|
description = "Source for the package.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
meta = {
|
||||||
|
platforms = ["i686-linux"];
|
||||||
|
};
|
||||||
|
|
||||||
|
pname = "linux-headers";
|
||||||
|
version = "6.5.6";
|
||||||
|
|
||||||
|
builder = builders.basic;
|
||||||
|
|
||||||
|
env = {
|
||||||
|
PATH = lib.paths.bin [
|
||||||
|
foundation.stage2-gcc
|
||||||
|
foundation.stage1-musl
|
||||||
|
foundation.stage2-binutils
|
||||||
|
foundation.stage2-gnumake
|
||||||
|
foundation.stage2-gnupatch
|
||||||
|
foundation.stage2-gnused
|
||||||
|
foundation.stage2-gnugrep
|
||||||
|
foundation.stage2-gawk
|
||||||
|
foundation.stage2-diffutils
|
||||||
|
foundation.stage2-findutils
|
||||||
|
foundation.stage2-gnutar
|
||||||
|
foundation.stage1-xz
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = {
|
||||||
|
unpack = lib.dag.entry.before ["patch"] ''
|
||||||
|
tar xf ${config.src}
|
||||||
|
cd linux-${config.version}
|
||||||
|
'';
|
||||||
|
|
||||||
|
patch =
|
||||||
|
lib.dag.entry.between ["configure"] ["unpack"] ''
|
||||||
|
'';
|
||||||
|
|
||||||
|
configure =
|
||||||
|
lib.dag.entry.between ["build"] ["patch"] ''
|
||||||
|
'';
|
||||||
|
|
||||||
|
build = lib.dag.entry.between ["install"] ["configure"] ''
|
||||||
|
make -j $NIX_BUILD_CORES CC=musl-gcc HOSTCC=musl-gcc ARCH=${config.platform.host.linux.arch} headers
|
||||||
|
'';
|
||||||
|
|
||||||
|
install = lib.dag.entry.after ["build"] ''
|
||||||
|
find usr/include -name '.*' -exec rm {} +
|
||||||
|
mkdir -p $out
|
||||||
|
cp -rv usr/include $out/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
src = builtins.fetchurl {
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major config.version}.x/linux-${config.version}.tar.xz";
|
||||||
|
sha256 = "eONtQhRUcFHCTfIUD0zglCjWxRWtmnGziyjoCUqV0vY=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue