refactor: make builders portable and extendable, make creating new package sets easy

This commit is contained in:
Jake Hamilton 2025-08-31 01:34:49 -07:00
parent 01db12d713
commit 1ae64357af
Signed by: jakehamilton
GPG key ID: 9762169A1B35EA68
77 changed files with 1361 additions and 645 deletions

View file

@ -2,36 +2,49 @@ let
pins = import ./npins;
lib = import pins.lib;
foundation = import pins.foundation {
system = "i686-linux";
};
result = lib.modules.run {
modules = [
./src/modules.nix
{
__file__ = ./default.nix;
recursiveLibModule = {
__file__ = ./default.nix;
options = {
lib = lib.options.create {
type = lib.types.attrs.any;
default.value = { };
description = "An attribute set of values to be added to `lib`.";
apply = value: lib.extend (final: prev: lib.attrs.mergeRecursive lib value);
};
options = {
lib = lib.options.create {
type = lib.types.attrs.any;
default.value = { };
description = "An attribute set of values to be added to `lib`.";
apply = value: lib.extend (final: prev: lib.attrs.mergeRecursive lib value);
};
internal.packages.foundation = lib.options.create {
type = lib.types.attrs.of lib.types.derivation;
};
};
internal.packages.foundation = lib.options.create {
type = lib.types.attrs.of lib.types.derivation;
};
};
config = {
internal.packages.foundation = foundation;
};
}
];
config = {
internal.packages.foundation = foundation;
};
};
new = module:
let
set = lib.modules.run {
modules = [
./src/builders
./src/lib
./src/mirrors
recursiveLibModule
] ++ lib.lists.from.any module;
};
in
set.config // {
inherit new;
inherit (set) extend;
};
in
result.config // {
extend = result.extend;
}
new [
./src/packages
]

View file

@ -8,134 +8,142 @@ let
pretty = lib.generators.pretty { };
in
{
config.builders = {
basic = {
executable = "${foundation.stage2-bash}/bin/bash";
config.builders.basic = {
build =
package:
let
system = package.platform.build;
build =
package:
let
system = package.platform.build;
dependencies = lib.packages.dependencies.collect package;
dependencies = lib.packages.dependencies.collect package;
context = lib.packages.context.create package dependencies { };
context = lib.packages.context.create dependencies { };
hooks = lib.packages.hooks.create dependencies context;
hooks = lib.packages.hooks.create dependencies context;
resolvePhases = phases: if builtins.isFunction phases then phases context else phases;
resolvePhases = phases:
if builtins.isFunction phases then
phases context
else
phases;
phasesWithHooks =
let
all = lib.lists.flatten [
hooks.build.build
hooks.build.host
hooks.build.target
hooks.host.host
hooks.host.target
hooks.target.target
];
in
builtins.foldl' (
final: defaults: lib.dag.apply.defaults final (resolvePhases defaults)
) (resolvePhases package.phases) all;
phasesWithHooks =
let
all = lib.lists.flatten [
hooks.build.build
hooks.build.host
hooks.build.target
hooks.host.host
hooks.host.target
hooks.target.target
];
in
builtins.foldl' (final: defaults: lib.dag.apply.defaults final (resolvePhases defaults)) (resolvePhases package.phases) all;
phases = lib.dag.apply.defaults phasesWithHooks {
unpack = lib.dag.entry.before [ "patch" ] "";
phases = lib.dag.apply.defaults phasesWithHooks {
unpack = lib.dag.entry.before [ "patch" ] "";
patch = lib.dag.entry.between [ "unpack" ] [ "configure" ] "";
patch = lib.dag.entry.between [ "unpack" ] [ "configure" ] "";
configure = lib.dag.entry.between [ "patch" ] [ "build" ] "";
configure = lib.dag.entry.between [ "patch" ] [ "build" ] "";
build = lib.dag.entry.between [ "configure" ] [ "install" ] "";
build = lib.dag.entry.between [ "configure" ] [ "install" ] "";
install = lib.dag.entry.after [ "build" ] "";
};
install = lib.dag.entry.after [ "build" ] "";
};
sorted = lib.dag.sort.topological phases;
sorted = lib.dag.sort.topological phases;
script = lib.strings.concatMapSep "\n" (entry: entry.value) sorted.result;
script = lib.strings.concatMapSep "\n" (entry: entry.value) sorted.result;
built = builtins.derivation (
package.env
// {
inherit (package) name;
inherit script system;
passAsFile = [ "script" ];
SHELL = cfg.executable;
PATH =
let
bins = lib.paths.bin (
(lib.packages.dependencies.get dependencies.build.build)
++ (lib.packages.dependencies.get dependencies.build.host)
++ (lib.packages.dependencies.get dependencies.build.target)
++ (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 ":" (
[ bins ]
++ (lib.lists.when (package.env ? PATH) [ package.env.PATH ])
);
builder = cfg.executable;
args = [
"-e"
(builtins.toFile "bash-builder.sh" ''
export CONFIG_SHELL=$SHELL
# Normalize the NIX_BUILD_CORES variable. The value might be 0, which
# means that we're supposed to try and auto-detect the number of
# available CPU cores at run-time.
NIX_BUILD_CORES="''${NIX_BUILD_CORES:-1}"
if ((NIX_BUILD_CORES <= 0)); then
guess=$(nproc 2>/dev/null || true)
((NIX_BUILD_CORES = guess <= 0 ? 1 : guess))
fi
export NIX_BUILD_CORES
bash -eux $scriptPath
'')
];
}
);
result = built // {
inherit package;
inherit (package) meta extend;
extras = package.extras // {
inherit context;
phases = builtins.listToAttrs sorted.result;
};
};
in
if sorted ? result then
result
executable = if system == "i686-linux" then
"${foundation.stage2-bash}/bin/bash"
else
builtins.throw ''
${pretty phases}
"${(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "i686-linux" system system).package}/bin/bash";
[Aux Tidepool] Phases for `${lib.options.getIdentifier [ "packages" package.namespace package.id "versions" package.version ]}` have a cycle.
Review the phases printed above and resolve the cycle to proceed.
built = builtins.derivation (
package.env
// {
inherit (package) name;
inherit script system;
TIP: This can happen when you have two of the same dependency added as different dependencies
such as `build.build` and `build.host`.
'';
};
passAsFile = [ "script" ];
SHELL = executable;
PATH =
let
bins = lib.paths.bin (
(lib.packages.dependencies.get dependencies.build.build)
++ (lib.packages.dependencies.get dependencies.build.host)
++ (lib.packages.dependencies.get dependencies.build.target)
++ (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 ":" (
[ bins ] ++ (lib.lists.when (package.env ? PATH) [ package.env.PATH ])
);
builder = executable;
args = [
"-e"
(builtins.toFile "bash-builder.sh" ''
export CONFIG_SHELL=$SHELL
# Normalize the NIX_BUILD_CORES variable. The value might be 0, which
# means that we're supposed to try and auto-detect the number of
# available CPU cores at run-time.
NIX_BUILD_CORES="''${NIX_BUILD_CORES:-1}"
if ((NIX_BUILD_CORES <= 0)); then
guess=$(nproc 2>/dev/null || true)
((NIX_BUILD_CORES = guess <= 0 ? 1 : guess))
fi
export NIX_BUILD_CORES
bash -eux $scriptPath
'')
];
}
);
result = built // {
inherit package;
inherit (package) meta extend;
extras = package.extras // {
inherit context;
phases = builtins.listToAttrs sorted.result;
};
};
in
if sorted ? result then
result
else
builtins.throw ''
${pretty phases}
[Aux Tidepool] Phases for `${
lib.options.getIdentifier [
"packages"
package.namespace
package.id
"versions"
package.version
]
}` have a cycle.
Review the phases printed above and resolve the cycle to proceed.
TIP: This can happen when you have two of the same dependency added as different dependencies
such as `build.build` and `build.host`.
'';
};
}

View file

@ -6,17 +6,22 @@ let
inherit (config.internal.packages) foundation;
in
{
config.builders.passthrough = {
settings = {
derivation = lib.options.create {
config.builders.passthrough = { config }: {
options = {
settings.derivation = lib.options.create {
description = "The derivation to use for the package.";
type = lib.types.derivation;
};
};
build = package:
package.builder.settings.derivation // {
inherit package;
inherit (package) meta extend extras;
};
config = {
build =
package:
package.builder.settings.derivation
// {
inherit package;
inherit (package) meta extend extras;
};
};
};
}

View file

@ -2,13 +2,11 @@
{
config = {
lib.fp = {
foldl = f: default: items:
foldl =
f: default: items:
let
process = index:
if index < 0 then
default
else
f (process (index - 1)) (builtins.elemAt items index);
process =
index: if index < 0 then default else f (process (index - 1)) (builtins.elemAt items index);
in
process (builtins.length items - 1);
};

View file

@ -14,8 +14,9 @@ in
in
builtins.map (dependency: dependency.package) available;
build = build': host': target':
builtins.mapAttrs (name: dep: dep.packages.${build'}.${host'}.${target'});
build =
build: host: target:
builtins.mapAttrs (name: dep: dep.packages.${build}.${host}.${target});
collect =
package:
@ -79,7 +80,7 @@ in
context = {
create =
collected: ctx:
package: collected: ctx:
let
process =
path:
@ -91,10 +92,10 @@ in
global = global.config;
};
prefix = [ "<package>" ];
prefix = package.__module__.args.dynamic.meta.prefix ++ [ "<context ${builtins.concatStringsSep path}>" ];
modules = (builtins.map (context: { config = context; }) contexts) ++ [
{
freeform = lib.types.raw;
freeform = lib.types.any;
options = config.packages.context.options // {
target = lib.options.create {
@ -115,7 +116,7 @@ in
description = "The collected dependencies.";
writable = false;
default.value = collected;
type = lib.types.raw;
type = lib.types.dependencies;
};
};
@ -152,10 +153,6 @@ in
];
};
target = {
only = process [
"target"
"only"
];
target = process [
"target"
"target"
@ -172,15 +169,9 @@ in
path:
let
dependencies = lib.attrs.selectOrThrow path collected;
hooks = builtins.map
(
dependency:
if builtins.isFunction dependency.hooks then
dependency.hooks ctx
else
dependency.hooks
)
dependencies;
hooks = builtins.map (
dependency: if builtins.isFunction dependency.hooks then dependency.hooks ctx else dependency.hooks
) dependencies;
in
hooks;
in
@ -271,18 +262,15 @@ in
else
built;
in
builtins.addErrorContext "📦 [Aux Tidepool] while building package `${identifier}` for platform build=${buildSystem.double}, host=${hostSystem.double}, target=${targetSystem.double}."
result;
builtins.addErrorContext "📦 [Aux Tidepool] while building package `${identifier}` for platform build=${buildSystem.double}, host=${hostSystem.double}, target=${targetSystem.double}." result;
supports = alias: build: host: target:
supports =
alias: build: host: target:
let
package = lib.packages.resolve alias;
matches = builtins.filter
(platform:
platform.build == build &&
platform.host == host &&
platform.target == target)
package.platforms;
matches = builtins.filter (
platform: platform.build == build && platform.host == host && platform.target == target
) package.platforms;
in
{
compatible =

View file

@ -25,8 +25,7 @@ let
lib.attrs.match patterns;
getDoubles =
predicate:
builtins.map lib.systems.into.double (builtins.filter predicate lib.systems.doubles.all);
predicate: builtins.map lib.systems.into.double (builtins.filter predicate lib.systems.doubles.all);
in
{
config = {
@ -1051,26 +1050,18 @@ in
a: b:
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.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.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.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
@ -1130,8 +1121,7 @@ in
# 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

View file

@ -56,35 +56,200 @@ in
in
lib.types.either type (lib.types.list.of type);
context = lib.types.submodule {
options = global.config.packages.context.options;
};
platform =
lib.types.coerce lib.types.string lib.systems.withBuildInfo
lib.systems.types.platformWithBuildInfo;
builder = lib.types.submodule ({ config, name }: {
freeform = lib.types.raw;
# builder = lib.types.submodules.portable {
# name = "Builder";
# module = (
# { config, name ? "builder" }:
# {
# freeform = lib.types.any;
#
# options = {
# name = lib.options.create {
# description = "The name of the builder.";
# type = lib.types.string;
# default = lib.attrs.when (name != "builder") {
# value = name;
# };
# writable = false;
# };
#
# build = lib.options.create {
# description = "The build function which takes a package definition and creates a derivation.";
# type = lib.types.function lib.types.artifact;
# };
#
# settings = lib.options.create {
# description = "The settings for the builder.";
# type = lib.types.submodule ({ config }: {});
# default.value = { };
# };
# };
# }
# );
# };
builder =
let
normalize =
value:
if builtins.isNull value then
{ }
else if builtins.isPath value then
{ includes = [ value ]; }
else if builtins.isFunction value || builtins.isList value then
value
else if value ? __modules__ then
value.__modules__
else
{ config = value; };
options = {
name = lib.options.create {
description = "The name of the builder.";
type = lib.types.string;
default = lib.attrs.when (name != "builder") {
value = name;
initial = lib.types.create {
name = "BuilderConfig";
description = "configuration for a builder";
check =
value:
builtins.isFunction value
|| builtins.isAttrs value
|| builtins.isList value
|| builtins.isNull value
|| builtins.isPath value;
merge =
location: definitions:
let
normalized = builtins.map (definition: lib.lists.from.any (normalize definition.value)) definitions;
in
builtins.concatLists normalized;
};
transform =
location: value:
let
modules = lib.lists.from.any (normalize value);
result = lib.modules.run {
prefix = location;
args = {
global = global.config;
};
modules = modules ++ [
submodule
{ config.__modules__ = modules; }
];
};
in
result.config;
final = lib.types.raw // {
merge =
location: definitions:
let
modules = builtins.concatMap (
definition: lib.lists.from.any (normalize definition.value)
) definitions;
result = lib.modules.run {
prefix = location;
args = {
global = global.config;
};
modules = modules ++ [
submodule
{ config.__modules__ = modules; }
];
};
in
result.config;
};
submodule = { config, meta, name ? "builder" }: {
options = {
__modules__ = lib.options.create {
description = "User specified modules for the builder definition.";
type = lib.types.list.of (initial // { merge = lib.options.merge.one; });
internal = true;
default.value = [ ];
};
extend = lib.options.create {
description = "Extend the package definition.";
type = lib.types.function lib.types.raw;
default.value =
module:
let
normalized =
if builtins.isList module then
module
else if builtins.isFunction module || module ? config then
[ module ]
else
[
{
config = module;
}
];
modules = config.__modules__ ++ normalized;
result = lib.modules.run {
prefix = meta.prefix;
args = {
global = global.config;
};
modules = [
submodule
{ config.__modules__ = modules; }
]
++ modules;
};
in
result.config;
};
name = lib.options.create {
description = "The name of the builder.";
type = lib.types.string;
default = lib.attrs.when (name != "builder") {
value = name;
};
writable = false;
};
build = lib.options.create {
description = "The build function which takes a package definition and creates a derivation.";
type = lib.types.function lib.types.artifact;
};
settings = lib.options.create {
description = "The settings for the builder.";
type = lib.types.submodule ({ config }: {});
default.value = { };
};
};
writable = false;
};
build = lib.options.create {
description = "The build function which takes a package definition and creates a derivation.";
type = lib.types.function lib.types.artifact;
type = (lib.types.coerceWithLocation initial transform final) // {
name = "Builder";
description = "a builder";
};
settings = lib.options.create {
description = "The settings for the builder.";
type = lib.types.attrs.of lib.types.option;
default.value = { };
in
type // {
children = type.children // {
inherit submodule;
};
};
};
});
aliases =
let
@ -104,39 +269,38 @@ in
initial = lib.types.create {
name = "PackageConfig";
description = "configuration for a package";
check = value:
builtins.isFunction value || builtins.isAttrs value || builtins.isList value || builtins.isNull value || builtins.isPath value;
check =
value:
builtins.isFunction value
|| builtins.isAttrs value
|| builtins.isList value
|| builtins.isNull value
|| builtins.isPath value;
};
transform =
value:
let
result = builtins.mapAttrs
(
namespace: aliases:
builtins.mapAttrs
(
id: alias:
alias
// {
versions = builtins.mapAttrs
(version: package: {
__modules__ = (lib.lists.from.any (normalize package)) ++ [
{
config = {
id = lib.modules.overrides.default id;
version = lib.modules.overrides.default version;
namespace = lib.modules.overrides.default namespace;
};
}
];
})
alias.versions;
}
)
aliases
)
value;
result = builtins.mapAttrs (
namespace: aliases:
builtins.mapAttrs (
id: alias:
alias
// {
versions = builtins.mapAttrs (version: package: {
__modules__ = (lib.lists.from.any (normalize package)) ++ [
{
config = {
id = lib.modules.overrides.default id;
version = lib.modules.overrides.default version;
namespace = lib.modules.overrides.default namespace;
};
}
];
}) alias.versions;
}
) aliases
) value;
in
result;
@ -177,24 +341,26 @@ in
};
in
lib.types.nullish (
lib.types.withCheck
base
(value:
value ? package
&& builtins.isAttrs value.package
&& value ? meta
&& builtins.isAttrs value.meta
&& value ? extend
&& builtins.isFunction value.extend
&& value ? extras
&& builtins.isAttrs value.extras
)
lib.types.withCheck base (
value:
value ? package
&& builtins.isAttrs value.package
&& value ? meta
&& builtins.isAttrs value.meta
&& value ? extend
&& builtins.isFunction value.extend
&& value ? extras
&& builtins.isAttrs value.extras
)
);
dependencies =
build: host: target:
let
entries = lib.types.raw;
type = lib.types.withCheck lib.types.raw lib.types.package.children.final.check;
entries = type // {
name = "Dependency";
description = "a package dependency";
};
in
lib.types.attrs.of entries;
@ -210,8 +376,8 @@ in
let
default = config.${global.config.preferences.packages.version};
in
default.extend
or (builtins.throw "Package \"${name}\" does not have a ${global.config.preferences.packages.version} release.");
default.extend
or (builtins.throw "Package \"${name}\" does not have a ${global.config.preferences.packages.version} release.");
};
stable = lib.options.create {
@ -223,7 +389,8 @@ in
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 {
@ -253,8 +420,13 @@ in
initial = lib.types.create {
name = "PackageConfig";
description = "configuration for a package";
check = value:
builtins.isFunction value || builtins.isAttrs value || builtins.isList value || builtins.isNull value || builtins.isPath value;
check =
value:
builtins.isFunction value
|| builtins.isAttrs value
|| builtins.isList value
|| builtins.isNull value
|| builtins.isPath value;
merge =
location: definitions:
let
@ -287,11 +459,9 @@ in
merge =
location: definitions:
let
modules = builtins.concatMap
(
definition: lib.lists.from.any (normalize definition.value)
)
definitions;
modules = builtins.concatMap (
definition: lib.lists.from.any (normalize definition.value)
) definitions;
result = lib.modules.run {
prefix = location;
@ -316,19 +486,19 @@ in
build = {
build = lib.options.create {
description = "Dependencies which are created in the build environment and are executed in the build environment.";
type = lib.types.dependencies build build build;
type = lib.types.dependencies;
default.value = { };
};
host = lib.options.create {
description = "Dependencies which are created in the build environment and are executed in the host environment.";
type = lib.types.dependencies build build host;
type = lib.types.dependencies;
default.value = { };
};
target = lib.options.create {
description = "Dependencies which are created in the build environment and are executed in the target environment.";
type = lib.types.dependencies build build target;
type = lib.types.dependencies;
default.value = { };
};
};
@ -336,13 +506,13 @@ in
host = {
host = lib.options.create {
description = "Dependencies which are executed in the host environment.";
type = lib.types.dependencies build host host;
type = lib.types.dependencies;
default.value = { };
};
target = lib.options.create {
description = "Dependencies which are executed in the host environment which produces code for the target environment.";
type = lib.types.dependencies build host target;
type = lib.types.dependencies;
default.value = { };
};
};
@ -350,7 +520,7 @@ in
target = {
target = lib.options.create {
description = "Dependencies which are executed in the target environment.";
type = lib.types.dependencies build target target;
type = lib.types.dependencies;
default.value = { };
};
};
@ -358,10 +528,9 @@ in
};
submodule =
{ config
, meta
, name
,
{
config,
meta,
}:
let
build = config.platform.build;
@ -377,6 +546,14 @@ in
default.value = [ ];
};
__toString = lib.options.create {
description = "The derivation of the package as a string.";
type = lib.types.string;
internal = true;
writable = false;
default.value = builtins.toString config.package;
};
extend = lib.options.create {
description = "Extend the package definition.";
type = lib.types.function lib.types.raw;
@ -417,6 +594,7 @@ in
extendTemporarily = lib.options.create {
description = "Extend the package definition.";
type = lib.types.function lib.types.raw;
internal = true;
default.value =
module:
let
@ -456,8 +634,13 @@ in
++ normalized;
};
in
result.config // {
inherit (config) extend extendTemporarily packages;
result.config
// {
inherit (config)
extend
extendTemporarily
packages
;
};
};
@ -539,25 +722,29 @@ in
default.value = [ ];
};
platform = {
build = lib.options.create {
description = "The build platform for the package.";
type = lib.types.string;
default.value = "x86_64-linux";
};
platform =
let
initial = builtins.head config.platforms;
in
{
build = lib.options.create {
description = "The build platform for the package.";
type = lib.types.string;
default.value = initial.build or "x86_64-linux";
};
host = lib.options.create {
description = "The host platform for the package.";
type = lib.types.string;
default.value = "x86_64-linux";
};
host = lib.options.create {
description = "The host platform for the package.";
type = lib.types.string;
default.value = initial.host or "x86_64-linux";
};
target = lib.options.create {
description = "The target platform for the package.";
type = lib.types.string;
default.value = "x86_64-linux";
target = lib.options.create {
description = "The target platform for the package.";
type = lib.types.string;
default.value = initial.target or "x86_64-linux";
};
};
};
name = lib.options.create {
description = "The name of the package.";
@ -588,83 +775,87 @@ in
builder = lib.options.create {
description = "The builder for the package.";
type =
let
initial =
lib.types.withCheck
lib.types.raw
(value:
let
builder = global.config.builders.${value.name} or null;
in
if builder == null then
builtins.throw "Builder `${
lib.options.getIdentifier [
"builders"
value.name
]
}` for `${
lib.options.getIdentifier [
"packages"
config.namespace
config.id
"versions"
config.version
]
}` is used but not defined."
else
value ? name &&
value ? build
);
transform = value:
if value ? settings.__type__ then
value // {
settings = { };
}
else
value;
final = lib.types.withCheck
lib.types.raw
(value:
let
builder = global.config.builders.${value.name} or null;
results = lib.attrs.mapToList
(name: option:
if option.type.check value.settings.${name} then
true
else
builtins.throw "The option `${
lib.options.getIdentifier [
"packages"
config.namespace
config.id
"versions"
config.version
"builder"
"settings"
name
]
}` is not of type ${option.type.description}."
)
builder.settings;
checked = builtins.foldl' (acc: result: builtins.seq result acc) true results;
in
if value ? settings.__type__ then
false
else
checked
);
coerced = lib.types.coerce initial transform final;
in
coerced;
type = lib.types.builder;
};
# builder = lib.options.create {
# description = "The builder for the package.";
# type =
# let
# initial = lib.types.withCheck lib.types.raw (
# value:
# let
# builder = global.config.builders.${value.name} or null;
# in
# if builder == null then
# builtins.throw "Builder `${
# lib.options.getIdentifier [
# "builders"
# value.name
# ]
# }` for `${
# lib.options.getIdentifier [
# "packages"
# config.namespace
# config.id
# "versions"
# config.version
# ]
# }` is used but not defined."
# else
# value ? name && value ? build
# );
#
# transform =
# value:
# if value ? settings.__type__ then
# value
# // {
# settings = { };
# }
# else
# value;
#
# final = lib.types.withCheck lib.types.raw (
# value:
# let
# builder = global.config.builders.${value.name} or null;
# results = lib.attrs.mapToList (
# name: option:
# if option.type.check value.settings.${name} then
# true
# else
# builtins.throw "The option `${
# lib.options.getIdentifier [
# "packages"
# config.namespace
# config.id
# "versions"
# config.version
# "builder"
# "settings"
# name
# ]
# }` is not of type ${option.type.description}."
# ) builder.settings;
# checked = builtins.foldl' (acc: result: builtins.seq result acc) true results;
# in
# if value ? settings.__type__ then false else checked
# );
#
# coerced = lib.types.coerce initial transform final;
# in
# coerced;
# };
src = lib.options.create {
description = "The source for the package.";
type = lib.types.nullish (lib.types.one [ lib.types.derivation lib.types.path ]);
type = lib.types.nullish (
lib.types.one [
lib.types.derivation
lib.types.path
]
);
default.value = null;
};
@ -677,34 +868,34 @@ in
package = lib.options.create {
description = "The built derivation.";
type = lib.types.derivation;
default.value =
config.builder.build config;
default.value = config.builder.build config;
};
packages = lib.options.create {
description = "The built derivations for all platforms.";
type = lib.types.raw;
writable = false;
default.value =
lib.attrs.generate lib.systems.doubles.all (build:
lib.attrs.generate lib.systems.doubles.all (host:
lib.attrs.generate lib.systems.doubles.all (target:
lib.packages.build config build host target
)
)
);
default.value = lib.attrs.generate lib.systems.doubles.all (
build:
lib.attrs.generate lib.systems.doubles.all (
host:
lib.attrs.generate lib.systems.doubles.all (target: lib.packages.build config build host target)
)
);
};
phases = lib.options.create {
description = "The phases for the package.";
type = lib.types.either (lib.types.dag.of lib.types.string) (lib.types.function lib.types.dag.of lib.types.string);
type = lib.types.either (lib.types.dag.of lib.types.string) (
lib.types.function lib.types.dag.of lib.types.string
);
default.value = { };
};
context = lib.options.create {
description = "The context information that the package provides.";
type = lib.types.attrs.of lib.types.raw;
default.value = { };
type = lib.types.context;
};
hooks = lib.options.create {
@ -723,21 +914,20 @@ 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: {
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;
};
};
};
};
};

View file

@ -1,8 +0,0 @@
{
includes = [
./builders
./lib
./mirrors
./packages
];
}

View file

@ -10,9 +10,21 @@ in
{
config = {
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -14,9 +14,21 @@ in
config = {
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
custom = true;

View file

@ -14,10 +14,26 @@ in
config = {
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "i686-linux"; target = "x86_64-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "i686-linux";
target = "x86_64-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
custom = true;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
@ -13,10 +14,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-bash;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnupatch.versions."2.7-stage1".extend {
@ -22,10 +27,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -22,7 +27,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "Tools for manipulating binaries (linker, assembler, etc.)";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-binutils;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.binutils.versions."2.41-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
platform = {
@ -16,8 +21,7 @@ let
isBootstrapped = isBuildBootstrapped && isHostBootstrapped;
isCross =
platform.build.double != platform.host.double
&& platform.host.double == platform.target.double;
platform.build.double != platform.host.double && platform.host.double == platform.target.double;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -25,31 +29,33 @@ let
../patches/2.41-deterministic.patch
];
configureFlags = lib.lists.when (!isCross) [
"LDFLAGS=--static"
] ++ [
"--prefix=${builtins.placeholder "out"}"
"--build=${platform.build.triple}"
"--host=${platform.host.triple}"
"--target=${platform.target.triple}"
configureFlags =
lib.lists.when (!isCross) [
"LDFLAGS=--static"
]
++ [
"--prefix=${builtins.placeholder "out"}"
"--build=${platform.build.triple}"
"--host=${platform.host.triple}"
"--target=${platform.target.triple}"
"--with-sysroot=/"
"--enable-deterministic-archives"
# depends on bison
"--disable-gprofng"
"--with-sysroot=/"
"--enable-deterministic-archives"
# depends on bison
"--disable-gprofng"
# Turn on --enable-new-dtags by default to make the linker set
# RUNPATH instead of RPATH on binaries. This is important because
# RUNPATH can be overridden using LD_LIBRARY_PATH at runtime.
"--enable-new-dtags"
# Turn on --enable-new-dtags by default to make the linker set
# RUNPATH instead of RPATH on binaries. This is important because
# RUNPATH can be overridden using LD_LIBRARY_PATH at runtime.
"--enable-new-dtags"
# By default binutils searches $libdir for libraries. This brings in
# libbfd and libopcodes into a default visibility. Drop default lib
# path to force users to declare their use of these libraries.
"--with-lib-path=:"
# By default binutils searches $libdir for libraries. This brings in
# libbfd and libopcodes into a default visibility. Drop default lib
# path to force users to declare their use of these libraries.
"--with-lib-path=:"
"--disable-multilib"
];
"--disable-multilib"
];
in
{
config = {
@ -60,9 +66,21 @@ in
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "i686-linux"; target = "x86_64-linux"; }
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "i686-linux";
target = "x86_64-linux";
}
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "Yacc-compatible parser generator.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-bison;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.bison.versions."3.8.2-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "Tiny versions of common UNIX utilities in a single small executable.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-busybox;
};

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "High-quality data compression program.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-bzip2;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.bzip2.versions."1.0.8-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -12,9 +17,9 @@ let
target = lib.systems.withBuildInfo config.platform.target;
};
prefix = lib.strings.when
(platform.build.triple != platform.host.triple)
"${platform.host.triple}-";
prefix = lib.strings.when (
platform.build.triple != platform.host.triple
) "${platform.host.triple}-";
in
{
config = {
@ -25,7 +30,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "The GNU Core Utilities";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-coreutils;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.coreutils.versions."9.4-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -12,9 +17,9 @@ let
target = lib.systems.withBuildInfo config.platform.target;
};
prefix = lib.strings.when
(platform.build.triple != platform.host.triple)
"${platform.host.triple}-";
prefix = lib.strings.when (
platform.build.triple != platform.host.triple
) "${platform.host.triple}-";
configureFlags = [
"--prefix=${builtins.placeholder "out"}"
@ -32,7 +37,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "Commands for showing the differences between files (diff, cmp, etc.).";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-diffutils;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.diffutils.versions."3.10-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU Find Utilities, the basic directory searching utilities of the GNU operating system.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-findutils;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.findutils.versions."4.9.0-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU implementation of the Awk programming language.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gawk;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gawk.versions."5.2.2-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -1,9 +1,15 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU Compiler Collection.";
@ -12,10 +18,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gcc;
};

View file

@ -2,7 +2,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -13,9 +18,9 @@ let
target = lib.systems.withBuildInfo config.platform.target;
};
prefix = lib.strings.when
(platform.build.triple != platform.target.triple)
"${platform.target.triple}-";
prefix = lib.strings.when (
platform.build.triple != platform.target.triple
) "${platform.target.triple}-";
patches = [
../patches/libstdc++-target.patch
@ -114,7 +119,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -2,7 +2,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage2" config.version;
@ -13,9 +18,9 @@ let
target = lib.systems.withBuildInfo config.platform.target;
};
prefix = lib.strings.when
(platform.build.triple != platform.target.triple)
"${platform.target.triple}-";
prefix = lib.strings.when (
platform.build.triple != platform.target.triple
) "${platform.target.triple}-";
patches = [
../patches/libstdc++-target.patch
@ -24,9 +29,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker"
"-Wl,${config.deps.target.target.glibc.package}/lib/ld-linux${
lib.strings.when
(platform.target.isx86 && platform.target.is64bit)
"-x86-64"
lib.strings.when (platform.target.isx86 && platform.target.is64bit) "-x86-64"
}.so.2"
"-B${config.deps.target.target.glibc.package}/lib"
];
@ -114,7 +117,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -2,7 +2,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gcc.versions."13.2.0-stage3".extend {
@ -22,10 +27,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -2,7 +2,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage3" config.version;
@ -13,9 +18,9 @@ let
target = lib.systems.withBuildInfo config.platform.target;
};
prefix = lib.strings.when
(platform.build.triple != platform.target.triple)
"${platform.target.triple}-";
prefix = lib.strings.when (
platform.build.triple != platform.target.triple
) "${platform.target.triple}-";
patches = [
../patches/libstdc++-target.patch
@ -24,10 +29,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker"
"-Wl,${config.deps.host.host.glibc.package}/lib/ld-linux${
lib.strings.when (
platform.target.isx86
&& platform.target.is64bit
) "-x86-64"
lib.strings.when (platform.target.isx86 && platform.target.is64bit) "-x86-64"
}.so.2"
"-B${config.deps.host.host.glibc.package}/lib"
];
@ -115,7 +117,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;
@ -251,5 +257,9 @@ in
make -j $NIX_BUILD_CORES install
'';
};
context = {
a = true;
};
};
}

View file

@ -2,7 +2,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage4" config.version;
@ -20,10 +25,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker"
"-Wl,${config.deps.host.host.glibc.package}/lib/ld-linux${
lib.strings.when (
platform.target.isx86
&& platform.target.is64bit
) "-x86-64"
lib.strings.when (platform.target.isx86 && platform.target.is64bit) "-x86-64"
}.so.2"
"-B${config.deps.host.host.glibc.package}/lib"
];
@ -107,7 +109,11 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;
@ -183,11 +189,7 @@ in
};
env = {
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${
"${config.deps.host.host.glibc.package}/lib/ld-linux${
lib.strings.when (platform.target.isx86 && platform.target.is64bit) "-x86-64"
}.so.2"
}";
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${"${config.deps.host.host.glibc.package}/lib/ld-linux${lib.strings.when (platform.target.isx86 && platform.target.is64bit) "-x86-64"}.so.2"}";
LIBRARY_PATH = "${config.deps.host.host.glibc.package}/lib";
};

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "The GNU C Library.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-glibc;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.glibc.versions."2.38-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU implementation of the Unix grep command.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gnugrep;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnugrep.versions."3.11-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU M4, a macro processor.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-gnum4;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnum4.versions."1.4.19-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;
@ -31,7 +40,6 @@ in
sha256 = "Y67eXG0zttmxNRHNC+LKwEby5w/QoHqpVzoEqCeDr5Y=";
};
deps = {
build = {
build = {

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "A tool to control the generation of non-source files from sources.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gnumake;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnumake.versions."4.4.1-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -26,7 +31,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU Patch, a program to apply differences to files.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gnupatch;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnupatch.versions."2.7-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU sed, a batch stream editor.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gnused;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnused.versions."4.9-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;
@ -31,7 +40,6 @@ in
sha256 = "biJrcy4c1zlGStaGK9Ghq6QteYKSLaelNRljHSSXUYE=";
};
deps = {
build = {
build = {

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU implementation of the `tar` archiver.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gnutar;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gnutar.versions."1.35-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "GNU zip compression program.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-gzip;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.gzip.versions."1.13-stage1".extend {
@ -21,10 +26,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -21,7 +26,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "Header files and scripts for the Linux kernel.";
@ -11,10 +12,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-linux-headers;
};

View file

@ -20,10 +20,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -20,7 +20,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -13,10 +13,14 @@ in
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-musl;
};

View file

@ -19,8 +19,16 @@ in
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{ build = "i686-linux"; host = "i686-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
{
build = "i686-linux";
host = "i686-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;
@ -40,12 +48,14 @@ in
gnused
gnugrep
gnutar
gzip;
gzip
;
};
host = {
inherit (packages.foundation)
bash;
bash
;
};
};
};

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "A small utility to modify the dynamic linker and RPATH of ELF executables.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage2-patchelf;
};

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "A high-level dynamically-typed programming language.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-python;
};

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "A general-purpose data compression software, successor of LZMA.";
@ -15,10 +16,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-xz;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
package = packages.foundation.xz.versions."5.4.3-stage1".extend {
@ -24,10 +29,14 @@ in
};
platforms = [
{ build = "x86_64-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "x86_64-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = package.package;
};

View file

@ -1,7 +1,12 @@
{ config, global }:
let
inherit (global) lib packages builders mirrors;
inherit (global)
lib
packages
builders
mirrors
;
inherit (global.internal.packages) foundation;
version = lib.strings.removeSuffix "-stage1" config.version;
@ -24,7 +29,11 @@ in
};
platforms = [
{ build = "i686-linux"; host = "x86_64-linux"; target = "x86_64-linux"; }
{
build = "i686-linux";
host = "x86_64-linux";
target = "x86_64-linux";
}
];
builder = builders.basic;

View file

@ -3,7 +3,8 @@
let
inherit (global) lib packages builders;
inherit (global.internal.packages) foundation;
in {
in
{
config = {
meta = {
description = "Lossless data-compression library.";
@ -12,10 +13,14 @@ in {
};
platforms = [
{ build = "i686-linux"; host = "i686-linux"; target = "i686-linux"; }
{
build = "i686-linux";
host = "i686-linux";
target = "i686-linux";
}
];
builder = builders.passthrough // {
builder = builders.passthrough.extend {
settings = {
derivation = foundation.stage1-zlib;
};