feat: working native x86_64-linux gcc
This commit is contained in:
parent
8b9b072d56
commit
5a222fa399
71 changed files with 2304 additions and 574 deletions
|
|
@ -5,7 +5,7 @@ let
|
|||
inherit (config) lib packages;
|
||||
inherit (config.internal.packages) foundation;
|
||||
|
||||
pretty = lib.generators.pretty {};
|
||||
pretty = lib.generators.pretty { };
|
||||
in
|
||||
{
|
||||
config.builders = {
|
||||
|
|
@ -77,10 +77,14 @@ in
|
|||
++ (lib.packages.dependencies.get dependencies.host.host)
|
||||
++ (lib.packages.dependencies.get dependencies.host.target)
|
||||
++ (lib.packages.dependencies.get dependencies.target.target)
|
||||
++ [
|
||||
++ lib.lists.when (system == "i686-linux") [
|
||||
foundation.stage2-bash
|
||||
foundation.stage2-coreutils
|
||||
]
|
||||
++ lib.lists.when (system == "x86_64-linux") [
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "i686-linux" system system).package
|
||||
(lib.packages.build packages.foundation.coreutils.versions."9.4-stage1" "i686-linux" system system).package
|
||||
]
|
||||
);
|
||||
in
|
||||
builtins.concatStringsSep ":" (
|
||||
|
|
@ -120,8 +124,8 @@ in
|
|||
};
|
||||
};
|
||||
in
|
||||
if sorted ? result then
|
||||
result
|
||||
if sorted ? result then
|
||||
result
|
||||
else
|
||||
builtins.throw ''
|
||||
${pretty phases}
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
./packages.nix
|
||||
./systems.nix
|
||||
./types.nix
|
||||
./fp.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
16
tidepool/src/lib/fp.nix
Normal file
16
tidepool/src/lib/fp.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, config }:
|
||||
{
|
||||
config = {
|
||||
lib.fp = {
|
||||
foldl = f: default: items:
|
||||
let
|
||||
process = index:
|
||||
if index < 0 then
|
||||
default
|
||||
else
|
||||
f (process (index - 1)) (builtins.elemAt items index);
|
||||
in
|
||||
process (builtins.length items - 1);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -14,8 +14,7 @@ in
|
|||
in
|
||||
builtins.map (dependency: dependency.package) available;
|
||||
|
||||
build =
|
||||
build': host': target':
|
||||
build = build': host': target':
|
||||
builtins.mapAttrs (name: dep: lib.packages.build dep build' host' target');
|
||||
|
||||
collect =
|
||||
|
|
@ -179,8 +178,8 @@ in
|
|||
let
|
||||
getHooks =
|
||||
(builtins.trace dependency.name)
|
||||
(builtins.trace dependency.hooks)
|
||||
dependency.hooks or (lib.fp.const { });
|
||||
(builtins.trace dependency.hooks)
|
||||
dependency.hooks or (lib.fp.const { });
|
||||
in
|
||||
dependency.hooks ctx
|
||||
)
|
||||
|
|
@ -257,6 +256,15 @@ in
|
|||
target = lib.modules.override 75 target;
|
||||
};
|
||||
|
||||
withDependencyErrorContext = prefix: deps:
|
||||
builtins.mapAttrs
|
||||
(name: value:
|
||||
builtins.addErrorContext
|
||||
"📦 [Aux Tidepool] while resolving dependency `${lib.options.getIdentifier (["deps"] ++ prefix ++ [name])}` for `${identifier}`."
|
||||
value
|
||||
)
|
||||
deps;
|
||||
|
||||
withPlatform = lib.modules.run {
|
||||
args = {
|
||||
global = global.config;
|
||||
|
|
@ -277,14 +285,6 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
withDependencyErrorContext = prefix: deps:
|
||||
builtins.mapAttrs
|
||||
(name: value:
|
||||
builtins.addErrorContext
|
||||
"📦 [Aux Tidepool] while resolving dependency `${lib.options.getIdentifier (["deps"] ++ prefix ++ [name])}` for `${identifier}`."
|
||||
value
|
||||
) deps;
|
||||
|
||||
# Not all platform information can be effectively handled via submodules. To handle
|
||||
# the case where a user copies the resolved config over we need to ensure that
|
||||
# dependencies are appropriately updated.
|
||||
|
|
@ -293,26 +293,26 @@ in
|
|||
build = {
|
||||
build =
|
||||
lib.packages.dependencies.build build build build
|
||||
(withDependencyErrorContext ["build" "build"] withPlatform.config.deps.build.build);
|
||||
(withDependencyErrorContext [ "build" "build" ] withPlatform.config.deps.build.build);
|
||||
host =
|
||||
lib.packages.dependencies.build build build host
|
||||
(withDependencyErrorContext ["build" "host"] withPlatform.config.deps.build.host);
|
||||
(withDependencyErrorContext [ "build" "host" ] withPlatform.config.deps.build.host);
|
||||
target =
|
||||
lib.packages.dependencies.build build build target
|
||||
(withDependencyErrorContext ["build" "target"] withPlatform.config.deps.build.target);
|
||||
(withDependencyErrorContext [ "build" "target" ] withPlatform.config.deps.build.target);
|
||||
};
|
||||
host = {
|
||||
host =
|
||||
lib.packages.dependencies.build build host host
|
||||
(withDependencyErrorContext ["host" "host"] withPlatform.config.deps.host.host);
|
||||
(withDependencyErrorContext [ "host" "host" ] withPlatform.config.deps.host.host);
|
||||
target =
|
||||
lib.packages.dependencies.build build host target
|
||||
(withDependencyErrorContext ["host" "target"] withPlatform.config.deps.host.target);
|
||||
(withDependencyErrorContext [ "host" "target" ] withPlatform.config.deps.host.target);
|
||||
};
|
||||
target = {
|
||||
target =
|
||||
lib.packages.dependencies.build build target target
|
||||
(withDependencyErrorContext ["target" "target"] withPlatform.config.deps.target.target);
|
||||
(withDependencyErrorContext [ "target" "target" ] withPlatform.config.deps.target.target);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -337,18 +337,18 @@ in
|
|||
|
||||
package =
|
||||
(builtins.addErrorContext "📦 [Aux Tidepool] while building package ${package.name}")
|
||||
(lib.modules.override 0 (withDeps.builder.build withDeps));
|
||||
(lib.modules.override 0 (withDeps.builder.build withDeps));
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
support = lib.packages.supports withPlatform.config build host target;
|
||||
buildSystem = withPlatform.config.platform.build;
|
||||
hostSystem = withPlatform.config.platform.host;
|
||||
targetSystem = withPlatform.config.platform.target;
|
||||
|
||||
buildSystem = lib.systems.withBuildInfo build;
|
||||
hostSystem = lib.systems.withBuildInfo host;
|
||||
targetSystem = lib.systems.withBuildInfo target;
|
||||
support = lib.packages.supports withPlatform.config buildSystem.double hostSystem.double targetSystem.double;
|
||||
|
||||
result =
|
||||
if !support.compatible then
|
||||
|
|
@ -358,26 +358,23 @@ in
|
|||
else
|
||||
withPackage.config;
|
||||
in
|
||||
builtins.addErrorContext "📦 [Aux Tidepool] while building package `${identifier}` for platform build=${buildSystem.double}, host=${hostSystem.double}, target=${targetSystem.double}."
|
||||
builtins.addErrorContext "📦 [Aux Tidepool] while building package `${identifier}` for platform build=${buildSystem.double}, host=${hostSystem.double}, target=${targetSystem.double}."
|
||||
(builtins.trace "(lib) Building package ${result.name}")
|
||||
result;
|
||||
|
||||
supports = alias: build: host: target:
|
||||
let
|
||||
buildSystem = lib.systems.withBuildInfo build;
|
||||
hostSystem = lib.systems.withBuildInfo host;
|
||||
targetSystem = lib.systems.withBuildInfo target;
|
||||
|
||||
package = lib.packages.resolve alias;
|
||||
matches = builtins.filter
|
||||
(platform:
|
||||
platform.build.double == buildSystem.double &&
|
||||
platform.host.double == hostSystem.double &&
|
||||
platform.target.double == targetSystem.double)
|
||||
platform.build.double == build &&
|
||||
platform.host.double == host &&
|
||||
platform.target.double == target)
|
||||
package.platforms;
|
||||
in {
|
||||
compatible =
|
||||
(config.preferences.packages.allow.incompatible && builtins.length matches == 0)
|
||||
|| builtins.length matches > 0;
|
||||
|| builtins.length matches > 0;
|
||||
|
||||
broken = !config.preferences.packages.allow.broken && package.meta.broken;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config }:
|
||||
{ config }:
|
||||
let
|
||||
lib' = config.lib;
|
||||
inherit (config) lib;
|
||||
types = config.lib.systems.types;
|
||||
|
||||
setTypes =
|
||||
|
|
@ -26,12 +26,12 @@ let
|
|||
|
||||
getDoubles =
|
||||
predicate:
|
||||
builtins.map lib'.systems.into.double (builtins.filter predicate lib'.systems.doubles.all);
|
||||
builtins.map lib.systems.into.double (builtins.filter predicate lib.systems.doubles.all);
|
||||
in
|
||||
{
|
||||
config = {
|
||||
lib.systems = {
|
||||
match = builtins.mapAttrs (lib.fp.const matchAnyAttrs) lib'.systems.patterns;
|
||||
match = builtins.mapAttrs (lib.fp.const matchAnyAttrs) lib.systems.patterns;
|
||||
|
||||
platforms = {
|
||||
pc = {
|
||||
|
|
@ -45,7 +45,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
pc_simplekernel = lib.attrs.mergeRecursive lib'.systems.platforms.pc {
|
||||
pc_simplekernel = lib.attrs.mergeRecursive lib.systems.platforms.pc {
|
||||
linux-kernel.autoModules = false;
|
||||
};
|
||||
|
||||
|
|
@ -234,7 +234,7 @@ in
|
|||
};
|
||||
|
||||
# Legacy attribute, for compatibility with existing configs only.
|
||||
raspberrypi2 = lib'.systems.platforms.armv7l-hf-multiplatform;
|
||||
raspberrypi2 = lib.systems.platforms.armv7l-hf-multiplatform;
|
||||
|
||||
# Nvidia Bluefield 2 (w. crypto support)
|
||||
bluefield2 = {
|
||||
|
|
@ -301,7 +301,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
guruplug = lib.recursiveUpdate lib'.systems.platforms.sheevaplug {
|
||||
guruplug = lib.recursiveUpdate lib.systems.platforms.sheevaplug {
|
||||
# Define `CONFIG_MACH_GURUPLUG' (see
|
||||
# <http://kerneltrap.org/mailarchive/git-commits-head/2010/5/19/33618>)
|
||||
# and other GuruPlug-specific things. Requires the `guruplug-defconfig'
|
||||
|
|
@ -309,7 +309,7 @@ in
|
|||
linux-kernel.baseConfig = "guruplug_defconfig";
|
||||
};
|
||||
|
||||
beaglebone = lib.recursiveUpdate lib'.systems.platforms.armv7l-hf-multiplatform {
|
||||
beaglebone = lib.recursiveUpdate lib.systems.platforms.armv7l-hf-multiplatform {
|
||||
linux-kernel = {
|
||||
name = "beaglebone";
|
||||
baseConfig = "bb.org_defconfig";
|
||||
|
|
@ -603,7 +603,7 @@ in
|
|||
mipsel-linux-gnu = {
|
||||
triple = "mipsel-unknown-linux-gnu";
|
||||
}
|
||||
// lib'.systems.platforms.gcc_mips32r2_o32;
|
||||
// lib.systems.platforms.gcc_mips32r2_o32;
|
||||
|
||||
# This function takes a minimally-valid "platform" and returns an
|
||||
# attrset containing zero or more additional attrs which should be
|
||||
|
|
@ -612,31 +612,31 @@ in
|
|||
platform:
|
||||
# x86
|
||||
if platform.isx86 then
|
||||
lib'.systems.platforms.pc
|
||||
lib.systems.platforms.pc
|
||||
# ARM
|
||||
else if platform.isAarch32 then
|
||||
let
|
||||
version = platform.system.cpu.version or null;
|
||||
in
|
||||
if version == null then
|
||||
lib'.systems.platforms.pc
|
||||
lib.systems.platforms.pc
|
||||
else if lib.versions.gte "6" version then
|
||||
lib'.systems.platforms.sheevaplug
|
||||
lib.systems.platforms.sheevaplug
|
||||
else if lib.versions.gte "7" version then
|
||||
lib'.systems.platforms.raspberrypi
|
||||
lib.systems.platforms.raspberrypi
|
||||
else
|
||||
lib'.systems.platforms.armv7l-hf-multiplatform
|
||||
lib.systems.platforms.armv7l-hf-multiplatform
|
||||
else if platform.isAarch64 then
|
||||
if platform.isDarwin then
|
||||
lib'.systems.platforms.apple-m1
|
||||
lib.systems.platforms.apple-m1
|
||||
else
|
||||
lib'.systems.platforms.aarch64-multiplatform
|
||||
lib.systems.platforms.aarch64-multiplatform
|
||||
else if platform.isRiscV then
|
||||
lib'.systems.platforms.riscv-multiplatform
|
||||
lib.systems.platforms.riscv-multiplatform
|
||||
else if platform.system.cpu == types.cpus.mipsel then
|
||||
lib'.systems.platforms.mipsel-linux-gnu
|
||||
lib.systems.platforms.mipsel-linux-gnu
|
||||
else if platform.system.cpu == types.cpus.powerpc64le then
|
||||
lib'.systems.platforms.powernv
|
||||
lib.systems.platforms.powernv
|
||||
else
|
||||
{ };
|
||||
};
|
||||
|
|
@ -940,41 +940,41 @@ in
|
|||
default = [ ];
|
||||
x86-64 = [ ];
|
||||
x86-64-v2 = [ "x86-64" ];
|
||||
x86-64-v3 = [ "x86-64-v2" ] ++ lib'.systems.architectures.inferiors.x86-64-v2;
|
||||
x86-64-v4 = [ "x86-64-v3" ] ++ lib'.systems.architectures.inferiors.x86-64-v3;
|
||||
x86-64-v3 = [ "x86-64-v2" ] ++ lib.systems.architectures.inferiors.x86-64-v2;
|
||||
x86-64-v4 = [ "x86-64-v3" ] ++ lib.systems.architectures.inferiors.x86-64-v3;
|
||||
|
||||
# x86_64 Intel
|
||||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||
nehalem = [ "x86-64-v2" ] ++ lib'.systems.architectures.inferiors.x86-64-v2;
|
||||
westmere = [ "nehalem" ] ++ lib'.systems.architectures.inferiors.nehalem;
|
||||
sandybridge = [ "westmere" ] ++ lib'.systems.architectures.inferiors.westmere;
|
||||
ivybridge = [ "sandybridge" ] ++ lib'.systems.architectures.inferiors.sandybridge;
|
||||
nehalem = [ "x86-64-v2" ] ++ lib.systems.architectures.inferiors.x86-64-v2;
|
||||
westmere = [ "nehalem" ] ++ lib.systems.architectures.inferiors.nehalem;
|
||||
sandybridge = [ "westmere" ] ++ lib.systems.architectures.inferiors.westmere;
|
||||
ivybridge = [ "sandybridge" ] ++ lib.systems.architectures.inferiors.sandybridge;
|
||||
|
||||
haswell = lib.unique (
|
||||
[
|
||||
"ivybridge"
|
||||
"x86-64-v3"
|
||||
]
|
||||
++ lib'.systems.architectures.inferiors.ivybridge
|
||||
++ lib'.systems.architectures.inferiors.x86-64-v3
|
||||
++ lib.systems.architectures.inferiors.ivybridge
|
||||
++ lib.systems.architectures.inferiors.x86-64-v3
|
||||
);
|
||||
broadwell = [ "haswell" ] ++ lib'.systems.architectures.inferiors.haswell;
|
||||
skylake = [ "broadwell" ] ++ lib'.systems.architectures.inferiors.broadwell;
|
||||
broadwell = [ "haswell" ] ++ lib.systems.architectures.inferiors.haswell;
|
||||
skylake = [ "broadwell" ] ++ lib.systems.architectures.inferiors.broadwell;
|
||||
|
||||
skylake-avx512 = lib.unique (
|
||||
[
|
||||
"skylake"
|
||||
"x86-64-v4"
|
||||
]
|
||||
++ lib'.systems.architectures.inferiors.skylake
|
||||
++ lib'.systems.architectures.inferiors.x86-64-v4
|
||||
++ lib.systems.architectures.inferiors.skylake
|
||||
++ lib.systems.architectures.inferiors.x86-64-v4
|
||||
);
|
||||
cannonlake = [ "skylake-avx512" ] ++ lib'.systems.architectures.inferiors.skylake-avx512;
|
||||
icelake-client = [ "cannonlake" ] ++ lib'.systems.architectures.inferiors.cannonlake;
|
||||
icelake-server = [ "icelake-client" ] ++ lib'.systems.architectures.inferiors.icelake-client;
|
||||
cascadelake = [ "cannonlake" ] ++ lib'.systems.architectures.inferiors.cannonlake;
|
||||
cooperlake = [ "cascadelake" ] ++ lib'.systems.architectures.inferiors.cascadelake;
|
||||
tigerlake = [ "icelake-server" ] ++ lib'.systems.architectures.inferiors.icelake-server;
|
||||
cannonlake = [ "skylake-avx512" ] ++ lib.systems.architectures.inferiors.skylake-avx512;
|
||||
icelake-client = [ "cannonlake" ] ++ lib.systems.architectures.inferiors.cannonlake;
|
||||
icelake-server = [ "icelake-client" ] ++ lib.systems.architectures.inferiors.icelake-client;
|
||||
cascadelake = [ "cannonlake" ] ++ lib.systems.architectures.inferiors.cannonlake;
|
||||
cooperlake = [ "cascadelake" ] ++ lib.systems.architectures.inferiors.cascadelake;
|
||||
tigerlake = [ "icelake-server" ] ++ lib.systems.architectures.inferiors.icelake-server;
|
||||
|
||||
# CX16 does not exist on alderlake, while it does on nearly all other intel CPUs
|
||||
alderlake = [ ];
|
||||
|
|
@ -1006,16 +1006,16 @@ in
|
|||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||
# https://en.wikichip.org/wiki/amd/microarchitectures/zen
|
||||
# https://en.wikichip.org/wiki/intel/microarchitectures/skylake
|
||||
znver1 = [ "skylake" ] ++ lib'.systems.architectures.inferiors.skylake; # Includes haswell and x86-64-v3
|
||||
znver2 = [ "znver1" ] ++ lib'.systems.architectures.inferiors.znver1;
|
||||
znver3 = [ "znver2" ] ++ lib'.systems.architectures.inferiors.znver2;
|
||||
znver1 = [ "skylake" ] ++ lib.systems.architectures.inferiors.skylake; # Includes haswell and x86-64-v3
|
||||
znver2 = [ "znver1" ] ++ lib.systems.architectures.inferiors.znver1;
|
||||
znver3 = [ "znver2" ] ++ lib.systems.architectures.inferiors.znver2;
|
||||
znver4 = lib.unique (
|
||||
[
|
||||
"znver3"
|
||||
"x86-64-v4"
|
||||
]
|
||||
++ lib'.systems.architectures.inferiors.znver3
|
||||
++ lib'.systems.architectures.inferiors.x86-64-v4
|
||||
++ lib.systems.architectures.inferiors.znver3
|
||||
++ lib.systems.architectures.inferiors.x86-64-v4
|
||||
);
|
||||
|
||||
# other
|
||||
|
|
@ -1031,7 +1031,7 @@ in
|
|||
validate = {
|
||||
architecture =
|
||||
let
|
||||
isSupported = feature: x: builtins.elem feature (lib'.systems.architectures.features.${x} or [ ]);
|
||||
isSupported = feature: x: builtins.elem feature (lib.systems.architectures.features.${x} or [ ]);
|
||||
in
|
||||
{
|
||||
sse3Support = isSupported "sse3";
|
||||
|
|
@ -1052,108 +1052,108 @@ in
|
|||
lib.any lib.id [
|
||||
# x86
|
||||
(
|
||||
b == lib'.systems.types.cpus.i386 && lib'.systems.validate.compatible a lib'.systems.types.cpus.i486
|
||||
b == lib.systems.types.cpus.i386 && lib.systems.validate.compatible a lib.systems.types.cpus.i486
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.i486 && lib'.systems.validate.compatible a lib'.systems.types.cpus.i586
|
||||
b == lib.systems.types.cpus.i486 && lib.systems.validate.compatible a lib.systems.types.cpus.i586
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.i586 && lib'.systems.validate.compatible a lib'.systems.types.cpus.i686
|
||||
b == lib.systems.types.cpus.i586 && lib.systems.validate.compatible a lib.systems.types.cpus.i686
|
||||
)
|
||||
|
||||
# XXX: Not true in some cases. Like in WSL mode.
|
||||
(
|
||||
b == lib'.systems.types.cpus.i686
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.x86_64
|
||||
b == lib.systems.types.cpus.i686
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.x86_64
|
||||
)
|
||||
|
||||
# ARMv4
|
||||
(
|
||||
b == lib'.systems.types.cpus.arm
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv5tel
|
||||
b == lib.systems.types.cpus.arm
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv5tel
|
||||
)
|
||||
|
||||
# ARMv5
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv5tel
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv6l
|
||||
b == lib.systems.types.cpus.armv5tel
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv6l
|
||||
)
|
||||
|
||||
# ARMv6
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv6l
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv6m
|
||||
b == lib.systems.types.cpus.armv6l
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv6m
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv6m
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv7l
|
||||
b == lib.systems.types.cpus.armv6m
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv7l
|
||||
)
|
||||
|
||||
# ARMv7
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv7l
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv7a
|
||||
b == lib.systems.types.cpus.armv7l
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv7a
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv7l
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv7r
|
||||
b == lib.systems.types.cpus.armv7l
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv7r
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv7l
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv7m
|
||||
b == lib.systems.types.cpus.armv7l
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv7m
|
||||
)
|
||||
|
||||
# ARMv8
|
||||
(b == lib'.systems.types.cpus.aarch64 && a == lib'.systems.types.cpus.armv8a)
|
||||
(b == lib.systems.types.cpus.aarch64 && a == lib.systems.types.cpus.armv8a)
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv8a
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.aarch64
|
||||
b == lib.systems.types.cpus.armv8a
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.aarch64
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv8r
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv8a
|
||||
b == lib.systems.types.cpus.armv8r
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv8a
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.armv8m
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.armv8a
|
||||
b == lib.systems.types.cpus.armv8m
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.armv8a
|
||||
)
|
||||
|
||||
# PowerPC
|
||||
(
|
||||
b == lib'.systems.types.cpus.powerpc
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.powerpc64
|
||||
b == lib.systems.types.cpus.powerpc
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.powerpc64
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.powerpcle
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.powerpc64le
|
||||
b == lib.systems.types.cpus.powerpcle
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.powerpc64le
|
||||
)
|
||||
|
||||
# MIPS
|
||||
(
|
||||
b == lib'.systems.types.cpus.mips
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.mips64
|
||||
b == lib.systems.types.cpus.mips
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.mips64
|
||||
)
|
||||
(
|
||||
b == lib'.systems.types.cpus.mipsel
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.mips64el
|
||||
b == lib.systems.types.cpus.mipsel
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.mips64el
|
||||
)
|
||||
|
||||
# RISCV
|
||||
(
|
||||
b == lib'.systems.types.cpus.riscv32
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.riscv64
|
||||
b == lib.systems.types.cpus.riscv32
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.riscv64
|
||||
)
|
||||
|
||||
# SPARC
|
||||
(
|
||||
b == lib'.systems.types.cpus.sparc
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.sparc64
|
||||
b == lib.systems.types.cpus.sparc
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.sparc64
|
||||
)
|
||||
|
||||
# WASM
|
||||
(
|
||||
b == lib'.systems.types.cpus.wasm32
|
||||
&& lib'.systems.validate.compatible a lib'.systems.types.cpus.wasm64
|
||||
b == lib.systems.types.cpus.wasm32
|
||||
&& lib.systems.validate.compatible a lib.systems.types.cpus.wasm64
|
||||
)
|
||||
|
||||
# identity
|
||||
|
|
@ -1237,7 +1237,7 @@ in
|
|||
value:
|
||||
lib.types.is "systemWithBuildInfo" value
|
||||
&& value ? system
|
||||
&& lib'.systems.types.platform.check value.system;
|
||||
&& lib.systems.types.platform.check value.system;
|
||||
};
|
||||
|
||||
endian = lib.types.enum (builtins.attrValues types.endians);
|
||||
|
|
@ -1763,8 +1763,8 @@ in
|
|||
value:
|
||||
let
|
||||
parts = lib.strings.split "-" value;
|
||||
skeleton = lib'.systems.skeleton parts;
|
||||
system = lib'.systems.create (lib'.systems.from.skeleton skeleton);
|
||||
skeleton = lib.systems.skeleton parts;
|
||||
system = lib.systems.create (lib.systems.from.skeleton skeleton);
|
||||
in
|
||||
system;
|
||||
|
||||
|
|
@ -1791,9 +1791,9 @@ in
|
|||
vendor =
|
||||
if spec ? vendor then
|
||||
getVendor spec.vendor
|
||||
else if lib'.systems.match.isDarwin resolved then
|
||||
else if lib.systems.match.isDarwin resolved then
|
||||
types.vendors.apple
|
||||
else if lib'.systems.match.isWindows resolved then
|
||||
else if lib.systems.match.isWindows resolved then
|
||||
types.vendors.pc
|
||||
else
|
||||
types.vendors.unknown;
|
||||
|
|
@ -1809,10 +1809,10 @@ in
|
|||
abi =
|
||||
if spec ? abi then
|
||||
getAbi spec.abi
|
||||
else if lib'.systems.match.isLinux resolved || lib'.systems.match.isWindows resolved then
|
||||
if lib'.systems.match.isAarch32 resolved then
|
||||
else if lib.systems.match.isLinux resolved || lib.systems.match.isWindows resolved then
|
||||
if lib.systems.match.isAarch32 resolved then
|
||||
if lib.versions.gte "6" (resolved.cpu.version) then types.abis.gnueabihf else types.abis.gnueabi
|
||||
else if lib'.systems.match.isPower64 resolved && lib'.systems.match.isBigEndian resolved then
|
||||
else if lib.systems.match.isPower64 resolved && lib.systems.match.isBigEndian resolved then
|
||||
types.abis.gnuabielfv2
|
||||
else
|
||||
types.abis.gnu
|
||||
|
|
@ -2220,12 +2220,12 @@ in
|
|||
};
|
||||
};
|
||||
isUnix = [
|
||||
lib'.systems.match.isBSD
|
||||
lib'.systems.match.isDarwin
|
||||
lib'.systems.match.isLinux
|
||||
lib'.systems.match.isSunOS
|
||||
lib'.systems.match.isCygwin
|
||||
lib'.systems.match.isRedox
|
||||
lib.systems.match.isBSD
|
||||
lib.systems.match.isDarwin
|
||||
lib.systems.match.isLinux
|
||||
lib.systems.match.isSunOS
|
||||
lib.systems.match.isCygwin
|
||||
lib.systems.match.isRedox
|
||||
];
|
||||
|
||||
isMacOS = {
|
||||
|
|
@ -2337,7 +2337,7 @@ in
|
|||
};
|
||||
|
||||
doubles = {
|
||||
resolved = builtins.map lib'.systems.from.string lib'.systems.doubles.all;
|
||||
resolved = builtins.map lib.systems.from.string lib.systems.doubles.all;
|
||||
|
||||
all = [
|
||||
# Cygwin
|
||||
|
|
@ -2444,34 +2444,34 @@ in
|
|||
"i686-windows"
|
||||
];
|
||||
|
||||
arm = getDoubles lib'.systems.match.isAarch32;
|
||||
armv7 = getDoubles lib'.systems.match.isArmv7;
|
||||
aarch64 = getDoubles lib'.systems.match.isAarch64;
|
||||
x86 = getDoubles lib'.systems.match.isx86;
|
||||
i686 = getDoubles lib'.systems.match.isi686;
|
||||
x86_64 = getDoubles lib'.systems.match.isx86_64;
|
||||
microblaze = getDoubles lib'.systems.match.isMicroBlaze;
|
||||
mips = getDoubles lib'.systems.match.isMips;
|
||||
mmix = getDoubles lib'.systems.match.isMmix;
|
||||
power = getDoubles lib'.systems.match.isPower;
|
||||
riscv = getDoubles lib'.systems.match.isRiscV;
|
||||
riscv32 = getDoubles lib'.systems.match.isRiscV32;
|
||||
riscv64 = getDoubles lib'.systems.match.isRiscV64;
|
||||
rx = getDoubles lib'.systems.match.isRx;
|
||||
vc4 = getDoubles lib'.systems.match.isVc4;
|
||||
or1k = getDoubles lib'.systems.match.isOr1k;
|
||||
m68k = getDoubles lib'.systems.match.isM68k;
|
||||
s390 = getDoubles lib'.systems.match.isS390;
|
||||
s390x = getDoubles lib'.systems.match.isS390x;
|
||||
loongarch64 = getDoubles lib'.systems.match.isLoongArch64;
|
||||
js = getDoubles lib'.systems.match.isJavaScript;
|
||||
arm = getDoubles lib.systems.match.isAarch32;
|
||||
armv7 = getDoubles lib.systems.match.isArmv7;
|
||||
aarch64 = getDoubles lib.systems.match.isAarch64;
|
||||
x86 = getDoubles lib.systems.match.isx86;
|
||||
i686 = getDoubles lib.systems.match.isi686;
|
||||
x86_64 = getDoubles lib.systems.match.isx86_64;
|
||||
microblaze = getDoubles lib.systems.match.isMicroBlaze;
|
||||
mips = getDoubles lib.systems.match.isMips;
|
||||
mmix = getDoubles lib.systems.match.isMmix;
|
||||
power = getDoubles lib.systems.match.isPower;
|
||||
riscv = getDoubles lib.systems.match.isRiscV;
|
||||
riscv32 = getDoubles lib.systems.match.isRiscV32;
|
||||
riscv64 = getDoubles lib.systems.match.isRiscV64;
|
||||
rx = getDoubles lib.systems.match.isRx;
|
||||
vc4 = getDoubles lib.systems.match.isVc4;
|
||||
or1k = getDoubles lib.systems.match.isOr1k;
|
||||
m68k = getDoubles lib.systems.match.isM68k;
|
||||
s390 = getDoubles lib.systems.match.isS390;
|
||||
s390x = getDoubles lib.systems.match.isS390x;
|
||||
loongarch64 = getDoubles lib.systems.match.isLoongArch64;
|
||||
js = getDoubles lib.systems.match.isJavaScript;
|
||||
|
||||
bigEndian = getDoubles lib'.systems.match.isBigEndian;
|
||||
littleEndian = getDoubles lib'.systems.match.isLittleEndian;
|
||||
bigEndian = getDoubles lib.systems.match.isBigEndian;
|
||||
littleEndian = getDoubles lib.systems.match.isLittleEndian;
|
||||
|
||||
cygwin = getDoubles lib'.systems.match.isCygwin;
|
||||
darwin = getDoubles lib'.systems.match.isDarwin;
|
||||
freebsd = getDoubles lib'.systems.match.isFreeBSD;
|
||||
cygwin = getDoubles lib.systems.match.isCygwin;
|
||||
darwin = getDoubles lib.systems.match.isDarwin;
|
||||
freebsd = getDoubles lib.systems.match.isFreeBSD;
|
||||
# Should be better, but MinGW is unclear.
|
||||
gnu =
|
||||
getDoubles (
|
||||
|
|
@ -2516,17 +2516,17 @@ in
|
|||
abi = types.abis.gnuabielfv2;
|
||||
}
|
||||
);
|
||||
illumos = getDoubles lib'.systems.match.isSunOS;
|
||||
linux = getDoubles lib'.systems.match.isLinux;
|
||||
netbsd = getDoubles lib'.systems.match.isNetBSD;
|
||||
openbsd = getDoubles lib'.systems.match.isOpenBSD;
|
||||
unix = getDoubles lib'.systems.match.isUnix;
|
||||
wasi = getDoubles lib'.systems.match.isWasi;
|
||||
redox = getDoubles lib'.systems.match.isRedox;
|
||||
windows = getDoubles lib'.systems.match.isWindows;
|
||||
genode = getDoubles lib'.systems.match.isGenode;
|
||||
illumos = getDoubles lib.systems.match.isSunOS;
|
||||
linux = getDoubles lib.systems.match.isLinux;
|
||||
netbsd = getDoubles lib.systems.match.isNetBSD;
|
||||
openbsd = getDoubles lib.systems.match.isOpenBSD;
|
||||
unix = getDoubles lib.systems.match.isUnix;
|
||||
wasi = getDoubles lib.systems.match.isWasi;
|
||||
redox = getDoubles lib.systems.match.isRedox;
|
||||
windows = getDoubles lib.systems.match.isWindows;
|
||||
genode = getDoubles lib.systems.match.isGenode;
|
||||
|
||||
embedded = getDoubles lib'.systems.match.isNone;
|
||||
embedded = getDoubles lib.systems.match.isNone;
|
||||
|
||||
mesaPlatforms = [
|
||||
"i686-linux"
|
||||
|
|
@ -2550,7 +2550,7 @@ in
|
|||
settings = if builtins.isString args then { system = args; } else args;
|
||||
|
||||
resolved = {
|
||||
system = lib'.systems.from.string (if settings ? triple then settings.triple else settings.system);
|
||||
system = lib.systems.from.string (if settings ? triple then settings.triple else settings.system);
|
||||
|
||||
inherit
|
||||
(
|
||||
|
|
@ -2559,21 +2559,21 @@ in
|
|||
gcc = settings.gcc or { };
|
||||
rustc = settings.rustc or { };
|
||||
}
|
||||
// lib'.systems.platforms.select resolved
|
||||
// lib.systems.platforms.select resolved
|
||||
)
|
||||
linux-kernel
|
||||
gcc
|
||||
rustc
|
||||
;
|
||||
|
||||
double = lib'.systems.into.double resolved.system;
|
||||
triple = lib'.systems.into.triple resolved.system;
|
||||
double = lib.systems.into.double resolved.system;
|
||||
triple = lib.systems.into.triple resolved.system;
|
||||
|
||||
isExecutable =
|
||||
platform:
|
||||
(resolved.isAndroid == platform.isAndroid)
|
||||
&& resolved.system.kernel == platform.system.kernel
|
||||
&& lib'.systems.validate.compatible resolved.system.cpu platform.system.cpu;
|
||||
&& lib.systems.validate.compatible resolved.system.cpu platform.system.cpu;
|
||||
|
||||
# The difference between `isStatic` and `hasSharedLibraries` is mainly the
|
||||
# addition of the `staticMarker` (see make-derivation.nix). Some
|
||||
|
|
@ -2791,14 +2791,18 @@ 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
|
||||
) lib.systems.validate.architecture
|
||||
// (builtins.removeAttrs settings [ "system" ]);
|
||||
|
||||
assertions = builtins.foldl' (
|
||||
result: { assertion, message }: if assertion resolved then result else builtins.throw message
|
||||
result:
|
||||
{ assertion, message }:
|
||||
if assertion resolved then
|
||||
result
|
||||
else builtins.throw message
|
||||
) true (resolved.system.abi.assertions or [ ]);
|
||||
in
|
||||
assert resolved.useAndroidPrebuilt -> resolved.isAndroid;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ in
|
|||
in
|
||||
lib.packages.build package build host target;
|
||||
in
|
||||
lib.types.attrs.of (lib.types.coerce initial transform lib.types.package);
|
||||
lib.types.attrs.lazy (lib.types.coerce initial transform lib.types.package);
|
||||
|
||||
alias = lib.types.submodule (
|
||||
{ config, name }:
|
||||
|
|
@ -224,14 +224,13 @@ in
|
|||
stable = lib.options.create {
|
||||
description = "The stable version of the package.";
|
||||
type = lib.types.package;
|
||||
default.value = null;
|
||||
default.value = config.latest;
|
||||
};
|
||||
|
||||
latest = lib.options.create {
|
||||
description = "The latest version of the package.";
|
||||
type = lib.types.package;
|
||||
default.value =
|
||||
if config.versions == { } then null else config.versions.${lib.packages.getLatest config};
|
||||
default.value = if config.versions == { } then null else config.versions.${lib.packages.getLatest config};
|
||||
};
|
||||
|
||||
versions = lib.options.create {
|
||||
|
|
@ -640,7 +639,9 @@ in
|
|||
package = lib.options.create {
|
||||
description = "The built derivation.";
|
||||
type = lib.types.derivation;
|
||||
default.value = config.builder.build config;
|
||||
default.value =
|
||||
(builtins.trace "(internal) Building package ${config.name}")
|
||||
config.builder.build config;
|
||||
};
|
||||
|
||||
phases = lib.options.create {
|
||||
|
|
@ -671,19 +672,26 @@ in
|
|||
description = "The dependencies for the package.";
|
||||
type = deps build host target;
|
||||
default.value = { };
|
||||
apply = value: {
|
||||
build = {
|
||||
build = lib.packages.dependencies.build build build build value.build.build;
|
||||
host = lib.packages.dependencies.build build build host value.build.host;
|
||||
target = lib.packages.dependencies.build build build target value.build.target;
|
||||
};
|
||||
host = {
|
||||
host = lib.packages.dependencies.build build host host value.host.host;
|
||||
target = lib.packages.dependencies.build build host target value.host.target;
|
||||
};
|
||||
target = {
|
||||
target = lib.packages.dependencies.build build target target value.target.target;
|
||||
};
|
||||
apply = value:
|
||||
if value ? __done__ then
|
||||
value
|
||||
else
|
||||
(builtins.trace "(internal) building dependencies for package ${config.name}")
|
||||
{
|
||||
__done__ = true;
|
||||
|
||||
build = {
|
||||
build = lib.packages.dependencies.build build build build value.build.build;
|
||||
host = lib.packages.dependencies.build build build host value.build.host;
|
||||
target = lib.packages.dependencies.build build build target value.build.target;
|
||||
};
|
||||
host = {
|
||||
host = lib.packages.dependencies.build build host host value.host.host;
|
||||
target = lib.packages.dependencies.build build host target value.host.target;
|
||||
};
|
||||
target = {
|
||||
target = lib.packages.dependencies.build build target target value.target.target;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.bash = {
|
||||
stable = config.packages.foundation.bash.versions."5.2.15-bootstrap";
|
||||
latest = config.packages.foundation.bash.versions."5.2.15-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"5.2.15-stage1-passthrough" = ./versions/5.2.15-stage1-passthrough.nix;
|
||||
"5.2.15-stage1" = ./versions/5.2.15-stage1.nix;
|
||||
"5.2.15-bootstrap" = ./versions/5.2.15-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnupatch.versions."2.7-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
|
||||
homepage = "https://www.gnu.org/software/bash";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
main = "/bin/bash";
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
|
||||
homepage = "https://www.gnu.org/software/bash";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
main = "/bin/bash";
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/bash/bash-${version}.tar.gz";
|
||||
sha256 = "132qng0jy600mv1fs95ylnlisx2wavkkgpb19c6kmz7lnmjhjwhk";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
};
|
||||
host = {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host = {
|
||||
coreutils = packages.foundation.coreutils.versions."9.4-stage1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd bash-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple} \
|
||||
--enable-static-link \
|
||||
bash_cv_func_strtoimax=y \
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
rm $out/bin/bashbug
|
||||
|
||||
ln -s $out/bin/bash $out/bin/sh
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -2,9 +2,10 @@
|
|||
{
|
||||
config.packages.foundation.binutils = {
|
||||
stable = config.packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
latest = config.packages.foundation.binutils.versions."2.41-stage1";
|
||||
latest = config.packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"2.41-stage1-passthrough" = ./versions/2.41-stage1-passthrough.nix;
|
||||
"2.41-stage1" = ./versions/2.41-stage1.nix;
|
||||
"2.41-bootstrap" = ./versions/2.41-bootstrap.nix;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Tools for manipulating binaries (linker, assembler, etc.)";
|
||||
homepage = "https://www.gnu.org/software/binutils";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -66,109 +66,35 @@ in
|
|||
sha256 = "rppXieI0WeWWBuZxRyPy0//DHAMXQZHvDQFb3wYAdFA=";
|
||||
};
|
||||
|
||||
platform = lib.modules.override 1 {
|
||||
build =
|
||||
if
|
||||
config.platform.target.double == "x86_64-linux" || config.platform.target.double == "i686-linux"
|
||||
then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = if isBootstrapped then
|
||||
packages.foundation.gnumake.versions."4.4.1-bootstrap"
|
||||
else
|
||||
packages.foundation.gnumake.latest;
|
||||
|
||||
gnused = if isBootstrapped then
|
||||
packages.foundation.gnused.versions."4.9-bootstrap"
|
||||
else
|
||||
packages.foundation.gnused.latest;
|
||||
|
||||
gnugrep = if isBootstrapped then
|
||||
packages.foundation.gnugrep.versions."3.11-bootstrap"
|
||||
else
|
||||
packages.foundation.gnugrep.latest;
|
||||
|
||||
gnupatch = if isBootstrapped then
|
||||
packages.foundation.gnupatch.versions."2.7-bootstrap"
|
||||
else
|
||||
packages.foundation.gnupatch.latest;
|
||||
|
||||
gawk = if isBootstrapped then
|
||||
packages.foundation.gawk.versions."5.2.2-bootstrap"
|
||||
else
|
||||
packages.foundation.gawk.latest;
|
||||
|
||||
diffutils = if isBootstrapped then
|
||||
packages.foundation.diffutils.versions."3.10-bootstrap"
|
||||
else
|
||||
packages.foundation.diffutils.latest;
|
||||
|
||||
findutils = if isBootstrapped then
|
||||
packages.foundation.findutils.versions."4.9.0-bootstrap"
|
||||
else
|
||||
packages.foundation.findutils.latest;
|
||||
|
||||
gnutar = if isBootstrapped then
|
||||
packages.foundation.gnutar.versions."1.35-bootstrap"
|
||||
else
|
||||
packages.foundation.gnutar.latest;
|
||||
|
||||
gzip = if isBootstrapped then
|
||||
packages.foundation.gzip.versions."1.13-bootstrap"
|
||||
else
|
||||
packages.foundation.gzip.latest;
|
||||
|
||||
bzip2 = if isBootstrapped then
|
||||
packages.foundation.bzip2.versions."1.0.8-bootstrap"
|
||||
else
|
||||
packages.foundation.bzip2.latest;
|
||||
|
||||
xz = if isBootstrapped then
|
||||
packages.foundation.xz.versions."5.4.3-bootstrap"
|
||||
else
|
||||
packages.foundation.xz.latest;
|
||||
|
||||
gcc = if isBootstrapped then
|
||||
packages.foundation.gcc.versions."13.2.0-bootstrap"
|
||||
else
|
||||
packages.foundation.gcc.latest;
|
||||
|
||||
binutils = if isBootstrapped then
|
||||
packages.foundation.binutils.versions."2.41-bootstrap"
|
||||
else
|
||||
packages.foundation.binutils.latest.extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
};
|
||||
};
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = if isBootstrapped then
|
||||
packages.foundation.binutils.versions."2.41-bootstrap"
|
||||
else
|
||||
packages.foundation.binutils.latest.extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
};
|
||||
};
|
||||
};
|
||||
gcc =
|
||||
if isBootstrapped then
|
||||
packages.foundation.gcc.versions."13.2.0-bootstrap"
|
||||
else
|
||||
packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
|
||||
target = {
|
||||
# binutils = if isBootstrapped then
|
||||
# packages.foundation.binutils.versions."2.41-bootstrap"
|
||||
# else
|
||||
# packages.foundation.binutils.latest.extend {
|
||||
# platform = {
|
||||
# build = lib.modules.overrides.force "i686-linux";
|
||||
# };
|
||||
# };
|
||||
binutils =
|
||||
if isBootstrapped then
|
||||
packages.foundation.binutils.versions."2.41-bootstrap"
|
||||
else
|
||||
packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.bison = {
|
||||
stable = config.packages.foundation.bison.versions."3.8.2-bootstrap";
|
||||
latest = config.packages.foundation.bison.versions."3.8.2-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"3.8.2-stage1-passthrough" = ./versions/3.8.2-stage1-passthrough.nix;
|
||||
"3.8.2-stage1" = ./versions/3.8.2-stage1.nix;
|
||||
"3.8.2-bootstrap" = ./versions/3.8.2-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.bison.versions."3.8.2-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Yacc-compatible parser generator.";
|
||||
homepage = "https://www.gnu.org/software/bison";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Yacc-compatible parser generator.";
|
||||
homepage = "https://www.gnu.org/software/bison";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/bison/bison-${version}.tar.xz";
|
||||
sha256 = "m7oCFMz38QecXVkhAEUie89hlRmEDr+oDNOEnP9aW/I=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
gnum4 = packages.foundation.gnum4.versions."1.4.19-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host = {
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd bison-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,10 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.bzip2 = {
|
||||
stable = config.packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
latest = config.packages.foundation.bzip2.versions."1.0.8";
|
||||
latest = config.packages.foundation.bzip2.versions."1.0.8-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"1.0.8" = ./versions/1.0.8.nix;
|
||||
"1.0.8-stage1-passthrough" = ./versions/1.0.8-stage1-passthrough.nix;
|
||||
"1.0.8-stage1" = ./versions/1.0.8-stage1.nix;
|
||||
"1.0.8-bootstrap" = ./versions/1.0.8-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.bzip2.versions."1.0.8-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "High-quality data compression program.";
|
||||
homepage = "https://www.sourceware.org/bzip2";
|
||||
license = lib.licenses.bsdOriginal;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
|
||||
hooks = package.hooks;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.host.triple)
|
||||
"${config.platform.host.triple}-";
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "High-quality data compression program.";
|
||||
homepage = "https://www.sourceware.org/bzip2";
|
||||
license = lib.licenses.bsdOriginal;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "https://sourceware.org/pub/bzip2/bzip2-${version}.tar.gz";
|
||||
sha256 = "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd bzip2-${version}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make \
|
||||
-j $NIX_BUILD_CORES \
|
||||
CC="$CC" \
|
||||
AR="${config.deps.build.host.binutils.package}/bin/${prefix}ar" \
|
||||
RANLIB="${config.deps.build.host.binutils.package}/bin/${prefix}ranlib" \
|
||||
STRIP="${config.deps.build.host.binutils.package}/bin/${prefix}strip" \
|
||||
NM="${config.deps.build.host.binutils.package}/bin/${prefix}nm" \
|
||||
bzip2 bzip2recover
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make install -j $NIX_BUILD_CORES PREFIX=$out
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
isBuildBootstrapped = config.platform.build.double == "i686-linux";
|
||||
isHostBootstrapped = config.platform.host.double == "i686-linux";
|
||||
|
||||
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.target.triple)
|
||||
"${config.platform.target.triple}-";
|
||||
in {
|
||||
config = {
|
||||
meta = {
|
||||
description = "High-quality data compression program.";
|
||||
homepage = "https://www.sourceware.org/bzip2";
|
||||
license = lib.licenses.bsdOriginal;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "https://sourceware.org/pub/bzip2/bzip2-${config.version}.tar.gz";
|
||||
sha256 = "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
inherit (packages.foundation)
|
||||
gnumake
|
||||
gnutar
|
||||
gzip;
|
||||
};
|
||||
|
||||
host = {
|
||||
inherit (packages.foundation)
|
||||
binutils
|
||||
gcc;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd bzip2-${config.version}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make \
|
||||
-j $NIX_BUILD_CORES \
|
||||
CFLAGS=-static \
|
||||
bzip2 bzip2recover
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make install -j $NIX_BUILD_CORES PREFIX=$out
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.coreutils = {
|
||||
stable = config.packages.foundation.coreutils.versions."9.4-bootstrap";
|
||||
latest = config.packages.foundation.coreutils.versions."9.4-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"9.4-stage1-passthrough" = ./versions/9.4-stage1-passthrough.nix;
|
||||
"9.4-stage1" = ./versions/9.4-stage1.nix;
|
||||
"9.4-bootstrap" = ./versions/9.4-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.coreutils.versions."9.4-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "The GNU Core Utilities";
|
||||
homepage = "https://www.gnu.org/software/coreutils";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.host.triple)
|
||||
"${config.platform.host.triple}-";
|
||||
|
||||
configureFlags = [
|
||||
"--prefix=${builtins.placeholder "out"}"
|
||||
"--build=${config.platform.build.triple}"
|
||||
"--host=${config.platform.host.triple}"
|
||||
"--enable-single-binary=symlinks"
|
||||
];
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "The GNU Core Utilities";
|
||||
homepage = "https://www.gnu.org/software/coreutils";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/coreutils/coreutils-${version}.tar.gz";
|
||||
sha256 = "X2ANkJOXOwr+JTk9m8GMRPIjJlf0yg2V6jHHAutmtzk=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xzf ${config.src}
|
||||
cd coreutils-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure ${builtins.concatStringsSep " " configureFlags}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES V=1
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.diffutils = {
|
||||
stable = config.packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
latest = config.packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"3.10-stage1-passthrough" = ./versions/3.10-stage1-passthrough.nix;
|
||||
"3.10-stage1" = ./versions/3.10-stage1.nix;
|
||||
"3.10-bootstrap" = ./versions/3.10-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.diffutils.versions."3.10-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Commands for showing the differences between files (diff, cmp, etc.).";
|
||||
homepage = "https://www.gnu.org/software/diffutils";
|
||||
license = lib.licenses.gpl3Only;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Commands for showing the differences between files (diff, cmp, etc.).";
|
||||
homepage = "https://www.gnu.org/software/diffutils";
|
||||
license = lib.licenses.gpl3Only;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/diffutils/diffutils-${version}.tar.xz";
|
||||
sha256 = "kOXpPMck5OvhLt6A3xY0Bjx6hVaSaFkZv+YLVWyb0J4=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd diffutils-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders;
|
||||
inherit (global.internal.packages) foundation;
|
||||
in {
|
||||
config = {
|
||||
meta = {
|
||||
description = "Commands for showing the differences between files (diff, cmp, etc.).";
|
||||
homepage = "https://www.gnu.org/software/diffutils";
|
||||
license = lib.licenses.gpl3Only;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${config.aux.mirrors.gnu}/diffutils/diffutils-${config.version}.tar.xz";
|
||||
sha256 = "kOXpPMck5OvhLt6A3xY0Bjx6hVaSaFkZv+YLVWyb0J4=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
inherit (packages.foundation)
|
||||
gnumake
|
||||
gnused
|
||||
gnugrep
|
||||
gnutar
|
||||
gawk
|
||||
xz
|
||||
diffutils
|
||||
findutils;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.findutils = {
|
||||
stable = config.packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
latest = config.packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"4.9.0-stage1-passthrough" = ./versions/4.9.0-stage1-passthrough.nix;
|
||||
"4.9.0-stage1" = ./versions/4.9.0-stage1.nix;
|
||||
"4.9.0-bootstrap" = ./versions/4.9.0-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.findutils.versions."4.9.0-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Find Utilities, the basic directory searching utilities of the GNU operating system.";
|
||||
homepage = "https://www.gnu.org/software/findutils";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Find Utilities, the basic directory searching utilities of the GNU operating system.";
|
||||
homepage = "https://www.gnu.org/software/findutils";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/findutils/findutils-${version}.tar.xz";
|
||||
sha256 = "or+4wJ1DZ3DtxZ9Q+kg+eFsWGjt7nVR1c8sIBl/UYv4=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd findutils-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
rm $out/bin/updatedb
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gawk = {
|
||||
stable = config.packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
latest = config.packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"5.2.2-stage1-passthrough" = ./versions/5.2.2-stage1-passthrough.nix;
|
||||
"5.2.2-stage1" = ./versions/5.2.2-stage1.nix;
|
||||
"5.2.2-bootstrap" = ./versions/5.2.2-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gawk.versions."5.2.2-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU implementation of the Awk programming language.";
|
||||
homepage = "https://www.gnu.org/software/gawk";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU implementation of the Awk programming language.";
|
||||
homepage = "https://www.gnu.org/software/gawk";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/gawk/gawk-${version}.tar.gz";
|
||||
sha256 = "lFrvfM/xAfILIqEIArwAXplKsrjqPnJMwaGXxi9B9lA=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd gawk-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
rm $out/bin/gawkbug
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -8,10 +8,11 @@
|
|||
{
|
||||
config.packages.foundation.gcc = {
|
||||
stable = config.packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
latest = config.packages.foundation.gcc.versions."13.2.0-stage3";
|
||||
latest = config.packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
|
||||
versions = {
|
||||
"13.2.0-stage4" = ./versions/13.2.0-stage4.nix;
|
||||
"13.2.0-stage3-passthrough" = ./versions/13.2.0-stage3-passthrough.nix;
|
||||
"13.2.0-stage3" = ./versions/13.2.0-stage3.nix;
|
||||
"13.2.0-stage2" = ./versions/13.2.0-stage2.nix;
|
||||
"13.2.0-stage1" = ./versions/13.2.0-stage1.nix;
|
||||
|
|
|
|||
|
|
@ -5,23 +5,12 @@ let
|
|||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
isBuildBootstrapped = config.platform.build.double == "i686-linux";
|
||||
isHostBootstrapped = config.platform.host.double == "i686-linux";
|
||||
|
||||
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.target.triple)
|
||||
"${config.platform.target.triple}-";
|
||||
|
||||
arch =
|
||||
if config.platform.target.double == "x86_64-linux" || config.platform.target.double == "i686-linux" then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux";
|
||||
|
||||
patches = [
|
||||
../patches/libstdc++-target.patch
|
||||
];
|
||||
|
|
@ -186,7 +175,7 @@ in
|
|||
};
|
||||
|
||||
hooks = ctx: {
|
||||
"aux:gcc:env" = lib.dag.entry.between [ "unpack" ] [ "configure" ] ''
|
||||
"aux:gcc:env" = lib.dag.entry.before [ "unpack" "configure" "build" "install" ] ''
|
||||
export CC='${config.package}/bin/${prefix}gcc'
|
||||
export CXX='${config.package}/bin/${prefix}g++'
|
||||
export CC_FOR_TARGET=$CC
|
||||
|
|
@ -237,7 +226,7 @@ in
|
|||
|
||||
install = ''
|
||||
# Install
|
||||
${lib.strings.when ((lib.systems.withBuildInfo config.platform.host).is64bit) ''
|
||||
${lib.strings.when (config.platform.host.is64bit) ''
|
||||
mkdir -p $out/lib
|
||||
ln -s lib $out/lib64
|
||||
''}
|
||||
|
|
|
|||
|
|
@ -5,23 +5,12 @@ let
|
|||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
isBuildBootstrapped = config.platform.build.double == "i686-linux";
|
||||
isHostBootstrapped = config.platform.host.double == "i686-linux";
|
||||
|
||||
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage2" config.version;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.target.triple)
|
||||
"${config.platform.target.triple}-";
|
||||
|
||||
arch =
|
||||
if config.platform.target.double == "x86_64-linux" || config.platform.target.double == "i686-linux" then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux";
|
||||
|
||||
patches = [
|
||||
../patches/libstdc++-target.patch
|
||||
];
|
||||
|
|
@ -186,7 +175,7 @@ in
|
|||
|
||||
target = {
|
||||
target = {
|
||||
glibc = packages.foundation.glibc.latest;
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -198,8 +187,8 @@ in
|
|||
LDFLAGS_FOR_TARGET = "-L$(pwd)/${config.platform.target.triple}/libgcc -L${config.deps.target.target.glibc.package}/lib";
|
||||
};
|
||||
|
||||
hooks = lib.modules.override 0 (ctx: {
|
||||
"aux:gcc:env" = lib.dag.entry.between [ "unpack" ] [ "configure" ] ''
|
||||
hooks = ctx: {
|
||||
"aux:gcc:env" = lib.dag.entry.before [ "unpack" "configure" "build" "install" ] ''
|
||||
export CC='${config.package}/bin/${prefix}gcc ${builtins.concatStringsSep " " gccFlags}'
|
||||
export CXX='${config.package}/bin/${prefix}g++ ${builtins.concatStringsSep " " gccFlags}'
|
||||
export CC_FOR_TARGET=$CC
|
||||
|
|
@ -209,7 +198,7 @@ in
|
|||
alias gcc='$CC'
|
||||
alias g++='$CXX'
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
|
|
@ -254,7 +243,7 @@ in
|
|||
|
||||
install = ''
|
||||
# Install
|
||||
${lib.strings.when ((lib.systems.withBuildInfo config.platform.host).is64bit) ''
|
||||
${lib.strings.when (config.platform.host.is64bit) ''
|
||||
mkdir -p $out/lib
|
||||
ln -s lib $out/lib64
|
||||
''}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
# gcc-bootstrap
|
||||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gcc.versions."13.2.0-stage3".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Compiler Collection.";
|
||||
homepage = "https://gcc.gnu.org";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
|
||||
hooks = package.hooks;
|
||||
};
|
||||
}
|
||||
|
|
@ -5,23 +5,12 @@ let
|
|||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
isBuildBootstrapped = config.platform.build.double == "i686-linux";
|
||||
isHostBootstrapped = config.platform.host.double == "i686-linux";
|
||||
|
||||
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage3" config.version;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.target.triple)
|
||||
"${config.platform.target.triple}-";
|
||||
|
||||
arch =
|
||||
if config.platform.target.double == "x86_64-linux" || config.platform.target.double == "i686-linux" then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux";
|
||||
|
||||
patches = [
|
||||
../patches/libstdc++-target.patch
|
||||
];
|
||||
|
|
@ -30,8 +19,8 @@ let
|
|||
"-Wl,-dynamic-linker"
|
||||
"-Wl,${config.deps.host.host.glibc.package}/lib/ld-linux${
|
||||
lib.strings.when (
|
||||
(lib.systems.withBuildInfo config.platform.target).isx86
|
||||
&& (lib.systems.withBuildInfo config.platform.target).is64bit
|
||||
config.platform.target.isx86
|
||||
&& config.platform.target.is64bit
|
||||
) "-x86-64"
|
||||
}.so.2"
|
||||
"-B${config.deps.host.host.glibc.package}/lib"
|
||||
|
|
@ -187,9 +176,10 @@ in
|
|||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host = {
|
||||
glibc = packages.foundation.glibc.latest;
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -200,8 +190,8 @@ in
|
|||
LDFLAGS_FOR_TARGET = "-L$(pwd)/${config.platform.target.triple}/libgcc -L${config.deps.host.host.glibc.package}/lib";
|
||||
};
|
||||
|
||||
hooks = lib.modules.override 0 (ctx: {
|
||||
"aux:gcc:env" = lib.dag.entry.between [ "unpack" ] [ "configure" ] ''
|
||||
hooks = ctx: {
|
||||
"aux:gcc:env" = lib.dag.entry.before [ "unpack" "configure" "build" "install" ] ''
|
||||
export CC='${config.package}/bin/gcc ${builtins.concatStringsSep " " gccFlags}'
|
||||
export CXX='${config.package}/bin/g++ ${builtins.concatStringsSep " " gccFlags}'
|
||||
export CC_FOR_TARGET=$CC
|
||||
|
|
@ -211,7 +201,7 @@ in
|
|||
alias gcc='$CC'
|
||||
alias g++='$CXX'
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
|
|
@ -248,7 +238,7 @@ in
|
|||
|
||||
install = ''
|
||||
# Install
|
||||
${lib.strings.when ((lib.systems.withBuildInfo config.platform.host).is64bit) ''
|
||||
${lib.strings.when (config.platform.host.is64bit) ''
|
||||
mkdir -p $out/lib
|
||||
ln -s lib $out/lib64
|
||||
''}
|
||||
|
|
|
|||
|
|
@ -5,23 +5,8 @@ let
|
|||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
isBuildBootstrapped = config.platform.build.double == "i686-linux";
|
||||
isHostBootstrapped = config.platform.host.double == "i686-linux";
|
||||
|
||||
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage4" config.version;
|
||||
|
||||
prefix = lib.strings.when
|
||||
(config.platform.build.triple != config.platform.target.triple)
|
||||
"${config.platform.target.triple}-";
|
||||
|
||||
arch =
|
||||
if config.platform.target.double == "x86_64-linux" || config.platform.target.double == "i686-linux" then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux";
|
||||
|
||||
patches = [
|
||||
../patches/libstdc++-target.patch
|
||||
];
|
||||
|
|
@ -30,8 +15,8 @@ let
|
|||
"-Wl,-dynamic-linker"
|
||||
"-Wl,${config.deps.host.host.glibc.package}/lib/ld-linux${
|
||||
lib.strings.when (
|
||||
(lib.systems.withBuildInfo config.platform.target).isx86
|
||||
&& (lib.systems.withBuildInfo config.platform.target).is64bit
|
||||
config.platform.target.isx86
|
||||
&& config.platform.target.is64bit
|
||||
) "-x86-64"
|
||||
}.so.2"
|
||||
"-B${config.deps.host.host.glibc.package}/lib"
|
||||
|
|
@ -119,11 +104,6 @@ in
|
|||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
platform = lib.modules.override 1 {
|
||||
build = arch;
|
||||
};
|
||||
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
|
|
@ -166,32 +146,32 @@ in
|
|||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41";
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-stage1-passthrough";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage3";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage3-passthrough";
|
||||
};
|
||||
|
||||
target = {
|
||||
binutils = packages.foundation.binutils.versions."2.41";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host = {
|
||||
glibc = packages.foundation.glibc;
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1-passthrough";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -205,7 +185,7 @@ in
|
|||
LIBRARY_PATH = "${config.deps.host.host.glibc.package}/lib";
|
||||
};
|
||||
|
||||
hooks = lib.modules.override 0 (ctx: {
|
||||
hooks = ctx: {
|
||||
"aux:gcc:env" = lib.dag.entry.between [ "unpack" ] [ "configure" ] ''
|
||||
export CC='${config.package}/bin/gcc ${builtins.concatStringsSep " " gccFlags}'
|
||||
export CXX='${config.package}/bin/g++ ${builtins.concatStringsSep " " gccFlags}'
|
||||
|
|
@ -216,7 +196,7 @@ in
|
|||
alias gcc='$CC'
|
||||
alias g++='$CXX'
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
|
|
@ -253,7 +233,7 @@ in
|
|||
|
||||
install = ''
|
||||
# Install
|
||||
${lib.strings.when ((lib.systems.withBuildInfo config.platform.host).is64bit) ''
|
||||
${lib.strings.when (config.platform.host.is64bit) ''
|
||||
mkdir -p $out/lib
|
||||
ln -s lib $out/lib64
|
||||
''}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.glibc = {
|
||||
stable = config.packages.foundation.glibc.versions."2.38-bootstrap";
|
||||
latest = config.packages.foundation.glibc.versions."2.38-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"2.38" = ./versions/2.38.nix;
|
||||
"2.38-stage1-passthrough" = ./versions/2.38-stage1-passthrough.nix;
|
||||
"2.38-stage1" = ./versions/2.38-stage1.nix;
|
||||
"2.38-bootstrap" = ./versions/2.38-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.glibc.versions."2.38-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "The GNU C Library.";
|
||||
homepage = "https://www.gnu.org/software/libc";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -4,14 +4,7 @@ let
|
|||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
isBuildBootstrapped = config.platform.build.double == "i686-linux";
|
||||
isHostBootstrapped = config.platform.host.double == "i686-linux";
|
||||
|
||||
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
|
||||
|
||||
isCross =
|
||||
(config.platform.build.triple != config.platform.host.triple)
|
||||
&& (config.platform.host.triple == config.platform.target.triple);
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
|
|
@ -28,7 +21,7 @@ in
|
|||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/libc/glibc-${config.version}.tar.xz";
|
||||
url = "${mirrors.gnu}/libc/glibc-${version}.tar.xz";
|
||||
sha256 = "+4KZiZiyspllRnvBtp0VLpwwfSzzAcnq+0VVt3DvP9I=";
|
||||
};
|
||||
|
||||
|
|
@ -48,23 +41,19 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
python = packages.foundation.python.versions."3.12.0-bootstrap";
|
||||
bison = packages.foundation.bison.versions."3.8.2-bootstrap";
|
||||
linux-headers = packages.foundation.linux-headers.versions."6.5.6-bootstrap";
|
||||
};
|
||||
host = {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage1";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
host = {
|
||||
host = {
|
||||
linux-headers = packages.foundation.linux-headers;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
tar xf ${config.src}
|
||||
cd glibc-${config.version}
|
||||
cd glibc-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
|
|
@ -75,7 +64,7 @@ in
|
|||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple} \
|
||||
--with-headers=${config.deps.host.host.linux-headers.package}/include \
|
||||
--with-headers=${config.deps.build.build.linux-headers.package}/include \
|
||||
--with-binutils=${config.deps.build.host.binutils.package}/${config.platform.target.triple}/bin
|
||||
'';
|
||||
|
||||
|
|
@ -87,7 +76,7 @@ in
|
|||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
ln -sv $(ls -d ${config.deps.host.host.linux-headers.package}/include/* | grep -v scsi\$) $out/include/
|
||||
ln -sv $(ls -d ${config.deps.build.build.linux-headers.package}/include/* | grep -v scsi\$) $out/include/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gnugrep = {
|
||||
stable = config.packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
latest = config.packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"3.11-stage1-passthrough" = ./versions/3.11-stage1-passthrough.nix;
|
||||
"3.11-stage1" = ./versions/3.11-stage1.nix;
|
||||
"3.11-bootstrap" = ./versions/3.11-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnugrep.versions."3.11-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU implementation of the Unix grep command.";
|
||||
homepage = "https://www.gnu.org/software/grep";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU implementation of the Unix grep command.";
|
||||
homepage = "https://www.gnu.org/software/grep";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/grep/grep-${version}.tar.xz";
|
||||
sha256 = "HbKu3eidDepCsW2VKPiUyNFdrk4ZC1muzHj1qVEnbqs=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd grep-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
rm $out/bin/{egrep,fgrep}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gnum4 = {
|
||||
stable = config.packages.foundation.gnum4.versions."1.4.19-bootstrap";
|
||||
latest = config.packages.foundation.gnum4.versions."1.4.19-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"1.4.19-stage1-passthrough" = ./versions/1.4.19-stage1-passthrough.nix;
|
||||
"1.4.19-stage1" = ./versions/1.4.19-stage1.nix;
|
||||
"1.4.19-bootstrap" = ./versions/1.4.19-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnum4.versions."1.4.19-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU M4, a macro processor.";
|
||||
homepage = "https://www.gnu.org/software/m4";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
|
||||
hooks = package.hooks;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU M4, a macro processor.";
|
||||
homepage = "https://www.gnu.org/software/m4";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/m4/m4-${version}.tar.xz";
|
||||
sha256 = "Y67eXG0zttmxNRHNC+LKwEby5w/QoHqpVzoEqCeDr5Y=";
|
||||
};
|
||||
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd m4-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gnumake = {
|
||||
stable = config.packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
latest = config.packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"4.4.1-stage1-passthrough" = ./versions/4.4.1-stage1-passthrough.nix;
|
||||
"4.4.1-stage1" = ./versions/4.4.1-stage1.nix;
|
||||
"4.4.1-bootstrap" = ./versions/4.4.1-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
From e00a5257a6ca5fedbf68b09eee7df3502971a057 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Sat, 24 Apr 2021 10:11:40 +0200
|
||||
Subject: [PATCH 1/2] No impure bin sh
|
||||
|
||||
default_shell is used to populuate default shell used to execute jobs.
|
||||
Unless SHELL is set to a different value this would be /bin/sh.
|
||||
Our stdenv provides sh in form of bash anyway. Having this value not
|
||||
hard-coded has some advantages:
|
||||
|
||||
- It would ensure that on all systems it uses sh from its PATH rather
|
||||
than /bin/sh, which helps as different systems might have different
|
||||
shells there (bash vs. dash)
|
||||
- In the past I had issues with LD_PRELOAD with BEAR, where /bin/sh
|
||||
used a different glibc than BEAR which came from my development shell.
|
||||
---
|
||||
src/job.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/job.c b/src/job.c
|
||||
index ae1f18b..6b4ddb3 100644
|
||||
--- a/src/job.c
|
||||
+++ b/src/job.c
|
||||
@@ -77,7 +77,7 @@ char * vms_strsignal (int status);
|
||||
|
||||
#else
|
||||
|
||||
-const char *default_shell = "/bin/sh";
|
||||
+const char *default_shell = "sh";
|
||||
int batch_mode_shell = 0;
|
||||
|
||||
#endif
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
From 795d63d3c8b5c0dbb7e544954f75507b371b7228 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Sat, 24 Apr 2021 10:20:16 +0200
|
||||
Subject: [PATCH 2/2] remove impure dirs
|
||||
|
||||
---
|
||||
src/read.c | 3 ---
|
||||
src/remake.c | 2 --
|
||||
2 files changed, 5 deletions(-)
|
||||
|
||||
diff --git a/src/read.c b/src/read.c
|
||||
index fa197fb..defacfb 100644
|
||||
--- a/src/read.c
|
||||
+++ b/src/read.c
|
||||
@@ -109,9 +109,6 @@ static const char *default_include_directories[] =
|
||||
#endif
|
||||
INCLUDEDIR,
|
||||
#ifndef _AMIGA
|
||||
- "/usr/gnu/include",
|
||||
- "/usr/local/include",
|
||||
- "/usr/include",
|
||||
#endif
|
||||
0
|
||||
};
|
||||
diff --git a/src/remake.c b/src/remake.c
|
||||
index fb237c5..94bff7d 100644
|
||||
--- a/src/remake.c
|
||||
+++ b/src/remake.c
|
||||
@@ -1601,8 +1601,6 @@ library_search (const char *lib, FILE_TIMESTAMP *mtime_ptr)
|
||||
static const char *dirs[] =
|
||||
{
|
||||
#ifndef _AMIGA
|
||||
- "/lib",
|
||||
- "/usr/lib",
|
||||
#endif
|
||||
#if defined(WINDOWS32) && !defined(LIBDIR)
|
||||
/*
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnumake.versions."4.4.1-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "A tool to control the generation of non-source files from sources.";
|
||||
homepage = "https://www.gnu.org/software/make";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
|
||||
hooks = package.hooks;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
|
||||
patches = [
|
||||
../patches/4.4.1-0001-No-impure-bin-sh.patch
|
||||
../patches/4.4.1-0002-remove-impure-dirs.patch
|
||||
];
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "A tool to control the generation of non-source files from sources.";
|
||||
homepage = "https://www.gnu.org/software/make";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/make/make-${version}.tar.gz";
|
||||
sha256 = "3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd make-${version}
|
||||
'';
|
||||
|
||||
patch = ''
|
||||
# Patch
|
||||
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gnupatch = {
|
||||
stable = config.packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
latest = config.packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"2.7-stage1-passthrough" = ./versions/2.7-stage1-passthrough.nix;
|
||||
"2.7-stage1" = ./versions/2.7-stage1.nix;
|
||||
"2.7-bootstrap" = ./versions/2.7-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnupatch.versions."2.7-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Patch, a program to apply differences to files.";
|
||||
homepage = "https://www.gnu.org/software/patch";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
|
||||
hooks = package.hooks;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Patch, a program to apply differences to files.";
|
||||
homepage = "https://www.gnu.org/software/patch";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/patch/patch-${version}.tar.xz";
|
||||
sha256 = "XCyR/kFUKWISbwvhUKpPo0lIXPLtwMfqfbwky4FxEa4=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd patch-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gnused = {
|
||||
stable = config.packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
latest = config.packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"4.9-stage1-passthrough" = ./versions/4.9-stage1-passthrough.nix;
|
||||
"4.9-stage1" = ./versions/4.9-stage1.nix;
|
||||
"4.9-bootstrap" = ./versions/4.9-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnused.versions."4.9-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU sed, a batch stream editor.";
|
||||
homepage = "https://www.gnu.org/software/sed";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU sed, a batch stream editor.";
|
||||
homepage = "https://www.gnu.org/software/sed";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/sed/sed-${version}.tar.xz";
|
||||
sha256 = "biJrcy4c1zlGStaGK9Ghq6QteYKSLaelNRljHSSXUYE=";
|
||||
};
|
||||
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd sed-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gnutar = {
|
||||
stable = config.packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
latest = config.packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"1.35-stage1-passthrough" = ./versions/1.35-stage1-passthrough.nix;
|
||||
"1.35-stage1" = ./versions/1.35-stage1.nix;
|
||||
"1.35-bootstrap" = ./versions/1.35-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gnutar.versions."1.35-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU implementation of the `tar` archiver.";
|
||||
homepage = "https://www.gnu.org/software/tar";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU implementation of the `tar` archiver.";
|
||||
homepage = "https://www.gnu.org/software/tar";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/tar/tar-${version}.tar.gz";
|
||||
sha256 = "FNVeMgY+qVJuBX+/Nfyr1TN452l4fv95GcN1WwLStX4=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xzf ${config.src}
|
||||
cd tar-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.gzip = {
|
||||
stable = config.packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
latest = config.packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"1.13-stage1-passthrough" = ./versions/1.13-stage1-passthrough.nix;
|
||||
"1.13-stage1" = ./versions/1.13-stage1.nix;
|
||||
"1.13-bootstrap" = ./versions/1.13-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.gzip.versions."1.13-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU zip compression program.";
|
||||
homepage = "https://www.gnu.org/software/gzip";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU zip compression program.";
|
||||
homepage = "https://www.gnu.org/software/gzip";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "${mirrors.gnu}/gzip/gzip-${version}.tar.xz";
|
||||
sha256 = "dFTraTXbF8ZlVXbC4bD6vv04tNCTbg+H9IzQYs6RoFc=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
cd gzip-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES bin_SCRIPTS=
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES bin_SCRIPTS= install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,9 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.linux-headers = {
|
||||
stable = config.packages.foundation.linux-headers.versions."6.5.6-bootstrap";
|
||||
latest = config.packages.foundation.linux-headers.versions."6.5.6-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"6.5.6" = ./versions/6.5.6.nix;
|
||||
"6.5.6-stage1-passthrough" = ./versions/6.5.6-stage1-passthrough.nix;
|
||||
"6.5.6-stage1" = ./versions/6.5.6-stage1.nix;
|
||||
"6.5.6-bootstrap" = ./versions/6.5.6-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.linux-headers.versions."6.5.6-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Header files and scripts for the Linux kernel.";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Header files and scripts for the Linux kernel.";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz";
|
||||
sha256 = "eONtQhRUcFHCTfIUD0zglCjWxRWtmnGziyjoCUqV0vY=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
tar xf ${config.src}
|
||||
cd linux-${version}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
make -j $NIX_BUILD_CORES V=1 \
|
||||
"CC=$CC" \
|
||||
"HOSTCC=$CC" \
|
||||
ARCH=${config.platform.host.linux.arch} \
|
||||
headers
|
||||
'';
|
||||
|
||||
install = ''
|
||||
find usr/include -name '.*' -exec rm {} +
|
||||
mkdir -p $out
|
||||
cp -rv usr/include $out/
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders;
|
||||
inherit (global.internal.packages) foundation;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "Header files and scripts for the Linux kernel.";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
# { build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
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=";
|
||||
};
|
||||
|
||||
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 = ''
|
||||
tar xf ${config.src}
|
||||
cd linux-${config.version}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
make -j $NIX_BUILD_CORES CC=musl-gcc HOSTCC=musl-gcc ARCH=${config.platform.target.linux.arch} headers
|
||||
'';
|
||||
|
||||
install = ''
|
||||
find usr/include -name '.*' -exec rm {} +
|
||||
mkdir -p $out
|
||||
cp -rv usr/include $out/
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,8 +2,11 @@
|
|||
{
|
||||
config.packages.foundation.xz = {
|
||||
stable = config.packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
latest = config.packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
|
||||
versions = {
|
||||
"5.4.3-stage1-passthrough" = ./versions/5.4.3-stage1-passthrough.nix;
|
||||
"5.4.3-stage1" = ./versions/5.4.3-stage1.nix;
|
||||
"5.4.3-bootstrap" = ./versions/5.4.3-bootstrap.nix;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
package = packages.foundation.xz.versions."5.4.3-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force "i686-linux";
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "A general-purpose data compression software, successor of LZMA.";
|
||||
homepage = "https://tukaani.org/xz";
|
||||
license = [
|
||||
lib.licences.gpl2Plus
|
||||
lib.licenses.lgpl21Plus
|
||||
];
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.passthrough // {
|
||||
settings = {
|
||||
derivation = package.package;
|
||||
};
|
||||
};
|
||||
|
||||
hooks = package.hooks;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{ config, global }:
|
||||
|
||||
let
|
||||
inherit (global) lib packages builders mirrors;
|
||||
inherit (global.internal.packages) foundation;
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
meta = {
|
||||
description = "A general-purpose data compression software, successor of LZMA.";
|
||||
homepage = "https://tukaani.org/xz";
|
||||
license = [
|
||||
lib.licences.gpl2Plus
|
||||
lib.licenses.lgpl21Plus
|
||||
];
|
||||
};
|
||||
|
||||
platforms = [
|
||||
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "https://tukaani.org/xz/xz-${version}.tar.gz";
|
||||
sha256 = "HDguC8Lk4K9YOYqQPdYv/35RAXHS3keh6+BtFSjpt+k=";
|
||||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
};
|
||||
|
||||
host = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
unpack = ''
|
||||
# Unpack
|
||||
tar xzf ${config.src}
|
||||
cd xz-${version}
|
||||
'';
|
||||
|
||||
configure = ''
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${config.platform.build.triple} \
|
||||
--host=${config.platform.host.triple}
|
||||
'';
|
||||
|
||||
build = ''
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue