refactor: types.package renamed to types.derivation, add lib extend

This commit is contained in:
Jake Hamilton 2024-06-09 06:27:35 -07:00
parent d9fe1ff418
commit 284b8de0d5
Signed by: jakehamilton
GPG key ID: 9762169A1B35EA68
97 changed files with 344 additions and 176 deletions

View file

@ -11,4 +11,4 @@
]; ];
}; };
in in
result.config.exports.resolved result.config.exports.resolved.packages

View file

@ -3,7 +3,7 @@
"lib": { "lib": {
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-nJ4WxMYE8OFaW6EhJDULMaBaTtXiVtR/MhIvZ4BMqbU=", "narHash": "sha256-vaPypHCYtWP6e0APNsV3ttoW9D2PlL2WpMytd6LdOmk=",
"path": "../lib", "path": "../lib",
"type": "path" "type": "path"
}, },

View file

@ -10,7 +10,7 @@
in { in {
options.aux.foundation.builders.bash.boot = { options.aux.foundation.builders.bash.boot = {
build = lib.options.create { build = lib.options.create {
type = lib.types.function lib.types.package; type = lib.types.function lib.types.derivation;
description = "Builds a package using the kaem builder."; description = "Builds a package using the kaem builder.";
}; };
}; };

View file

@ -13,7 +13,7 @@ in {
options.aux.foundation.builders.bash = { options.aux.foundation.builders.bash = {
build = lib.options.create { build = lib.options.create {
type = lib.types.function lib.types.package; type = lib.types.function lib.types.derivation;
description = "Builds a package using the bash builder."; description = "Builds a package using the bash builder.";
}; };
}; };

View file

@ -8,7 +8,7 @@
in { in {
options.aux.foundation.builders.file.text = { options.aux.foundation.builders.file.text = {
build = lib.options.create { build = lib.options.create {
type = lib.types.function lib.types.package; type = lib.types.function lib.types.derivation;
description = "Builds a package using the text file builder."; description = "Builds a package using the text file builder.";
}; };
}; };

View file

@ -9,7 +9,7 @@
in { in {
options.aux.foundation.builders.kaem = { options.aux.foundation.builders.kaem = {
build = lib.options.create { build = lib.options.create {
type = lib.types.function lib.types.package; type = lib.types.function lib.types.derivation;
description = "Builds a package using the kaem builder."; description = "Builds a package using the kaem builder.";
}; };
}; };

View file

@ -6,7 +6,7 @@
in { in {
options.aux.foundation.builders.raw = { options.aux.foundation.builders.raw = {
build = lib.options.create { build = lib.options.create {
type = lib.types.function lib.types.package; type = lib.types.function lib.types.derivation;
description = "Builds a package using the raw builder."; description = "Builds a package using the raw builder.";
}; };
}; };

View file

@ -6,7 +6,7 @@
packages = lib.options.create { packages = lib.options.create {
default.value = {}; default.value = {};
type = lib.types.attrs.of lib.types.package; type = lib.types.attrs.of lib.types.derivation;
}; };
extras = lib.options.create { extras = lib.options.create {

View file

@ -40,7 +40,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for kaem."; description = "The package to use for kaem.";
}; };
}; };

View file

@ -48,7 +48,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for mescc-tools-extra."; description = "The package to use for mescc-tools-extra.";
}; };
}; };

View file

@ -134,7 +134,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for mescc-tools."; description = "The package to use for mescc-tools.";
}; };
}; };

View file

@ -46,7 +46,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for hex0."; description = "The package to use for hex0.";
}; };
@ -59,7 +59,7 @@ in {
}; };
executable = lib.options.create { executable = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The derivation to use to build hex0."; description = "The derivation to use to build hex0.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for hex1."; description = "The package to use for hex1.";
}; };
}; };

View file

@ -40,7 +40,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for hex2-0."; description = "The package to use for hex2-0.";
}; };
}; };

View file

@ -41,7 +41,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for catm."; description = "The package to use for catm.";
}; };
}; };

View file

@ -41,7 +41,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for M0."; description = "The package to use for M0.";
}; };
}; };

View file

@ -42,7 +42,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for cc_arch."; description = "The package to use for cc_arch.";
}; };
}; };

View file

@ -43,7 +43,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for M2."; description = "The package to use for M2.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for blood-elf."; description = "The package to use for blood-elf.";
}; };
}; };

View file

@ -45,7 +45,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for M1-0."; description = "The package to use for M1-0.";
}; };
}; };

View file

@ -46,7 +46,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for hex2-1."; description = "The package to use for hex2-1.";
}; };
}; };

View file

@ -47,7 +47,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for M1."; description = "The package to use for M1.";
}; };
}; };

View file

@ -46,7 +46,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for hex2."; description = "The package to use for hex2.";
}; };
}; };

View file

@ -46,7 +46,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for kaem-unwrapped."; description = "The package to use for kaem-unwrapped.";
}; };
}; };

View file

@ -37,7 +37,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for bash-boot."; description = "The package to use for bash-boot.";
}; };
@ -47,7 +47,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -48,7 +48,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for bash."; description = "The package to use for bash.";
}; };
@ -58,7 +58,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for binutils."; description = "The package to use for binutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for bison."; description = "The package to use for bison.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for bzip2."; description = "The package to use for bzip2.";
}; };
@ -49,7 +49,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -10,7 +10,7 @@
in { in {
options.aux.foundation.stages.stage1.coreutils.boot = { options.aux.foundation.stages.stage1.coreutils.boot = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for coreutils-boot."; description = "The package to use for coreutils-boot.";
}; };
@ -20,7 +20,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -42,7 +42,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for coreutils."; description = "The package to use for coreutils.";
}; };
@ -52,7 +52,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for diffutils."; description = "The package to use for diffutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for findutils."; description = "The package to use for findutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.gawk.boot = { options.aux.foundation.stages.stage1.gawk.boot = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnutar-boot."; description = "The package to use for gnutar-boot.";
}; };
@ -21,7 +21,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -48,7 +48,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gawk."; description = "The package to use for gawk.";
}; };
@ -58,7 +58,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gcc."; description = "The package to use for gcc.";
}; };
@ -54,20 +54,20 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
cc = { cc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The cc source for the package."; description = "The cc source for the package.";
}; };
}; };
gmp = { gmp = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The gmp source for the package."; description = "The gmp source for the package.";
}; };
@ -79,7 +79,7 @@ in {
mpfr = { mpfr = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpfr source for the package."; description = "The mpfr source for the package.";
}; };
@ -91,7 +91,7 @@ in {
mpc = { mpc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpc source for the package."; description = "The mpc source for the package.";
}; };
@ -103,7 +103,7 @@ in {
isl = { isl = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The isl source for the package."; description = "The isl source for the package.";
}; };
version = lib.options.create { version = lib.options.create {

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.gcc.v46.cxx = { options.aux.foundation.stages.stage1.gcc.v46.cxx = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gcc-cxx."; description = "The package to use for gcc-cxx.";
}; };
@ -21,20 +21,20 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
cc = { cc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The cc source for the package."; description = "The cc source for the package.";
}; };
}; };
gmp = { gmp = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The gmp source for the package."; description = "The gmp source for the package.";
}; };
@ -46,7 +46,7 @@ in {
mpfr = { mpfr = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpfr source for the package."; description = "The mpfr source for the package.";
}; };
@ -58,7 +58,7 @@ in {
mpc = { mpc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpc source for the package."; description = "The mpc source for the package.";
}; };

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.gcc.v46 = { options.aux.foundation.stages.stage1.gcc.v46 = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gcc."; description = "The package to use for gcc.";
}; };
@ -21,20 +21,20 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
cc = { cc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The cc source for the package."; description = "The cc source for the package.";
}; };
}; };
gmp = { gmp = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The gmp source for the package."; description = "The gmp source for the package.";
}; };
@ -46,7 +46,7 @@ in {
mpfr = { mpfr = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpfr source for the package."; description = "The mpfr source for the package.";
}; };
@ -58,7 +58,7 @@ in {
mpc = { mpc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpc source for the package."; description = "The mpc source for the package.";
}; };

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.gcc.v8 = { options.aux.foundation.stages.stage1.gcc.v8 = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gcc."; description = "The package to use for gcc.";
}; };
@ -21,20 +21,20 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
cc = { cc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The cc source for the package."; description = "The cc source for the package.";
}; };
}; };
gmp = { gmp = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The gmp source for the package."; description = "The gmp source for the package.";
}; };
@ -46,7 +46,7 @@ in {
mpfr = { mpfr = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpfr source for the package."; description = "The mpfr source for the package.";
}; };
@ -58,7 +58,7 @@ in {
mpc = { mpc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpc source for the package."; description = "The mpc source for the package.";
}; };
@ -70,7 +70,7 @@ in {
isl = { isl = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The isl source for the package."; description = "The isl source for the package.";
}; };
version = lib.options.create { version = lib.options.create {

View file

@ -43,7 +43,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnugrep."; description = "The package to use for gnugrep.";
}; };
@ -53,7 +53,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnum4."; description = "The package to use for gnum4.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -10,7 +10,7 @@
in { in {
options.aux.foundation.stages.stage1.gnumake.boot = { options.aux.foundation.stages.stage1.gnumake.boot = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnumake."; description = "The package to use for gnumake.";
}; };
@ -20,7 +20,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -42,7 +42,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnumake."; description = "The package to use for gnumake.";
}; };
@ -52,7 +52,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -37,7 +37,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnupatch."; description = "The package to use for gnupatch.";
}; };
@ -47,7 +47,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -10,7 +10,7 @@
in { in {
options.aux.foundation.stages.stage1.gnused.boot = { options.aux.foundation.stages.stage1.gnused.boot = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnused-boot."; description = "The package to use for gnused-boot.";
}; };
@ -20,7 +20,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -48,7 +48,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnused."; description = "The package to use for gnused.";
}; };
@ -58,7 +58,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.gnutar.boot = { options.aux.foundation.stages.stage1.gnutar.boot = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnutar-boot."; description = "The package to use for gnutar-boot.";
}; };
@ -21,7 +21,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -49,7 +49,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnutar."; description = "The package to use for gnutar.";
}; };
@ -59,7 +59,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.gnutar.musl = { options.aux.foundation.stages.stage1.gnutar.musl = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnutar-musl."; description = "The package to use for gnutar-musl.";
}; };
@ -21,7 +21,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -37,7 +37,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gzip."; description = "The package to use for gzip.";
}; };
@ -47,7 +47,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -53,7 +53,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for heirloom."; description = "The package to use for heirloom.";
}; };
@ -63,7 +63,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -13,7 +13,7 @@
in { in {
options.aux.foundation.stages.stage1.heirloom.devtools = { options.aux.foundation.stages.stage1.heirloom.devtools = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for heirloom-devtools."; description = "The package to use for heirloom-devtools.";
}; };
@ -23,7 +23,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };

View file

@ -32,7 +32,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for linux-headers."; description = "The package to use for linux-headers.";
}; };
@ -42,7 +42,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for ln-boot."; description = "The package to use for ln-boot.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the mes compiler."; description = "The package to use for the mes compiler.";
}; };
}; };

View file

@ -15,7 +15,7 @@ in {
options.aux.foundation.stages.stage1.mes = { options.aux.foundation.stages.stage1.mes = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };

View file

@ -37,7 +37,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for mes-libc."; description = "The package to use for mes-libc.";
}; };
}; };

View file

@ -39,12 +39,12 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for mes libs."; description = "The package to use for mes libs.";
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };

View file

@ -11,7 +11,7 @@
in { in {
options.aux.foundation.stages.stage1.musl.boot = { options.aux.foundation.stages.stage1.musl.boot = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for musl-boot."; description = "The package to use for musl-boot.";
}; };
@ -21,7 +21,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -43,7 +43,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for musl."; description = "The package to use for musl.";
}; };
@ -53,7 +53,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -40,12 +40,12 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for nyacc."; description = "The package to use for nyacc.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for python."; description = "The package to use for python.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -42,14 +42,14 @@ in {
compiler = { compiler = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the tinycc-boot compiler."; description = "The package to use for the tinycc-boot compiler.";
}; };
}; };
libs = { libs = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the tinycc-boot libs."; description = "The package to use for the tinycc-boot libs.";
}; };
}; };

View file

@ -15,14 +15,14 @@ in {
options.aux.foundation.stages.stage1.tinycc.mes = { options.aux.foundation.stages.stage1.tinycc.mes = {
compiler = { compiler = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the tinycc-mes compiler."; description = "The package to use for the tinycc-mes compiler.";
}; };
}; };
libs = { libs = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the tinycc-mes libs."; description = "The package to use for the tinycc-mes libs.";
}; };
}; };

View file

@ -15,14 +15,14 @@ in {
options.aux.foundation.stages.stage1.tinycc.musl = { options.aux.foundation.stages.stage1.tinycc.musl = {
compiler = { compiler = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the tinycc-musl compiler."; description = "The package to use for the tinycc-musl compiler.";
}; };
}; };
libs = { libs = {
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for the tinycc-musl libs."; description = "The package to use for the tinycc-musl libs.";
}; };
}; };

View file

@ -41,7 +41,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for xz."; description = "The package to use for xz.";
}; };
@ -51,7 +51,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for zlib."; description = "The package to use for zlib.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for bash."; description = "The package to use for bash.";
}; };
@ -54,7 +54,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for binutils."; description = "The package to use for binutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for busybox."; description = "The package to use for busybox.";
}; };
@ -49,7 +49,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for bzip2."; description = "The package to use for bzip2.";
}; };
@ -49,7 +49,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for coreutils."; description = "The package to use for coreutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for diffutils."; description = "The package to use for diffutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for findutils."; description = "The package to use for findutils.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gawk."; description = "The package to use for gawk.";
}; };
@ -54,7 +54,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gcc."; description = "The package to use for gcc.";
}; };
@ -48,20 +48,20 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
cc = { cc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The cc source for the package."; description = "The cc source for the package.";
}; };
}; };
gmp = { gmp = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The gmp source for the package."; description = "The gmp source for the package.";
}; };
@ -73,7 +73,7 @@ in {
mpfr = { mpfr = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpfr source for the package."; description = "The mpfr source for the package.";
}; };
@ -85,7 +85,7 @@ in {
mpc = { mpc = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The mpc source for the package."; description = "The mpc source for the package.";
}; };
@ -97,7 +97,7 @@ in {
isl = { isl = {
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The isl source for the package."; description = "The isl source for the package.";
}; };
version = lib.options.create { version = lib.options.create {

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for glibc."; description = "The package to use for glibc.";
}; };
@ -49,7 +49,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnugrep."; description = "The package to use for gnugrep.";
}; };
@ -54,7 +54,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnumake."; description = "The package to use for gnumake.";
}; };
@ -49,7 +49,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnupatch."; description = "The package to use for gnupatch.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnused."; description = "The package to use for gnused.";
}; };
@ -54,7 +54,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -44,7 +44,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gnutar."; description = "The package to use for gnutar.";
}; };
@ -54,7 +54,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -38,7 +38,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for gzip."; description = "The package to use for gzip.";
}; };
@ -48,7 +48,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -39,7 +39,7 @@ in {
}; };
package = lib.options.create { package = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "The package to use for patchelf."; description = "The package to use for patchelf.";
}; };
@ -49,7 +49,7 @@ in {
}; };
src = lib.options.create { src = lib.options.create {
type = lib.types.package; type = lib.types.derivation;
description = "Source for the package."; description = "Source for the package.";
}; };
}; };

View file

@ -4,6 +4,7 @@ let
root = ./.; root = ./.;
files = [ files = [
./src/default.test.nix
./src/attrs/default.test.nix ./src/attrs/default.test.nix
./src/bools/default.test.nix ./src/bools/default.test.nix
./src/errors/default.test.nix ./src/errors/default.test.nix

View file

@ -74,4 +74,4 @@ let
builtins.foldl' merge {} libs builtins.foldl' merge {} libs
); );
in in
lib lib.points.withExtend (lib.fp.const lib)

18
lib/src/default.test.nix Normal file
View file

@ -0,0 +1,18 @@
let
lib = import ./../default.nix;
in {
"extend" = {
"lib is extensible" = let
result = lib.extend (final: prev: prev // {
__injected__ = true;
fp = prev.fp // {
__injected__ = true;
};
});
in
result ? __injected__
&& result.fp ? __injected__
&& result.fp ? const;
};
}

View file

@ -46,9 +46,9 @@ lib: {
] ]
value; value;
## Get an output of a package. ## Get an output of a derivation.
## ##
## @type String -> Package -> String ## @type String -> Derivation -> String
getOutput = output: package: getOutput = output: package:
if ! package ? outputSpecified || !package.outputSpecified if ! package ? outputSpecified || !package.outputSpecified
then package.${output} or package.out or package then package.${output} or package.out or package

View file

@ -44,7 +44,7 @@ lib: {
## Create a search path from a list of packages. ## Create a search path from a list of packages.
## ##
## @type String -> [Package] -> String ## @type String -> [Derivation] -> String
searchFromOutput = output: target: packages: searchFromOutput = output: target: packages:
lib.paths.search lib.paths.search
target target
@ -52,17 +52,17 @@ lib: {
## Create a search path for the binary output of a package. ## Create a search path for the binary output of a package.
## ##
## @type [Package] -> String ## @type [Derivation] -> String
bin = lib.paths.searchFromOutput "bin" "bin"; bin = lib.paths.searchFromOutput "bin" "bin";
## Create a search path for the library output of a package. ## Create a search path for the library output of a package.
## ##
## @type [Package] -> String ## @type [Derivation] -> String
lib = lib.paths.searchFromOutput "lib" "lib"; lib = lib.paths.searchFromOutput "lib" "lib";
## Create a search path for the include output of a package. ## Create a search path for the include output of a package.
## ##
## @type [Package] -> String ## @type [Derivation] -> String
include = lib.paths.searchFromOutput "dev" "include"; include = lib.paths.searchFromOutput "dev" "include";
}; };
} }

View file

@ -26,5 +26,27 @@ lib: {
}; };
in in
x; x;
## Extend a function's output with an additional function. This is the basis for
## features like overlays.
##
## @type (a -> b -> c) -> (a -> b) -> a -> b & c
extends = g: f: self: let
previous = f self;
next = g self previous;
in
previous // next;
## Add an `extend` method to the result of a function.
##
## @type (a -> b) -> b & { extend :: (a -> b -> c) -> b & c }
withExtend = f: let
create = self:
(f self)
// {
extend = g: lib.points.withExtend (lib.points.extends g f);
};
in
lib.points.fix' create;
}; };
} }

View file

@ -1,3 +1,60 @@
let let
lib = import ./../default.nix; lib = import ./../default.nix;
in {} in {
"fix" = {
"calculates a fixed point" = let
expected = {
original = 0;
calculated = 1;
};
actual = lib.points.fix (
self: {
original = 0;
calculated = self.original + 1;
}
);
in
actual == expected;
};
"fix'" = {
"allows unfixing a fixed point" = let
expected = {
original = 0;
calculated = 6;
};
result = lib.points.fix' (
self: {
original = 0;
calculated = self.original + 1;
}
);
actual = result.__unfix__ {
original = 5;
};
in
actual == expected;
};
"extends" = {
"overlays two functions' return values" = let
first = self: previous: {
z = 3;
};
second = self: {
y = 2;
};
expected = {
y = 2;
z = 3;
};
actual = lib.points.extends first second {
x = 1;
};
in
actual == expected;
};
}

View file

@ -533,12 +533,12 @@ lib: {
}; };
}; };
## A type that allows a package (derivation or store path). ## A type that allows a derivation (or store path).
## ##
## @type Attrs ## @type Attrs
package = lib.types.create { derivation = lib.types.create {
name = "Package"; name = "Derivation";
description = "package"; description = "derivation";
check = value: lib.packages.isDerivation value || lib.paths.validate.store value; check = value: lib.packages.isDerivation value || lib.paths.validate.store value;
merge = location: definitions: let merge = location: definitions: let
merged = lib.options.merge.one location definitions; merged = lib.options.merge.one location definitions;

29
potluck/default.nix Normal file
View file

@ -0,0 +1,29 @@
{
lib ? import ./../lib,
foundation ? import ./../foundation {system = "i686-linux";},
}: let
modules = import ./src/modules.nix;
result = lib.modules.run {
modules =
modules
++ [
{
__file__ = ./default.nix;
options.aux.packages.foundation = {
raw = lib.options.create {
type = lib.types.attrs.of lib.types.package;
internal = true;
description = "The foundational packages used to construct the larger package set.";
};
};
config.aux.packages.foundation = {
raw = foundation;
};
}
];
};
in
result.config.exported

20
potluck/flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
inputs = {
lib = {
url = "path:../lib";
};
foundation = {
url = "path:../foundation";
inputs.lib.follows = "lib";
};
};
outputs = inputs: let
exports = import ./default.nix {
lib = inputs.lib.lib;
foundation = inputs.foundation.packages.i686-linux;
};
in
exports;
}

View file

@ -0,0 +1,5 @@
{
includes = [
./packages.nix
];
}

View file

@ -0,0 +1,15 @@
{
config,
lib,
}: let
in {
options = {
exports.packages = lib.options.create {
default.value = {};
};
exported.packages = lib.options.create {
default.value = {};
};
};
}

1
potluck/src/modules.nix Normal file
View file

@ -0,0 +1 @@
[]