From 284b8de0d5eec94b82ab2410b6fd1286ab300c9b Mon Sep 17 00:00:00 2001 From: Jake Hamilton Date: Sun, 9 Jun 2024 06:27:35 -0700 Subject: [PATCH] refactor: types.package renamed to types.derivation, add lib extend --- foundation/default.nix | 2 +- foundation/flake.lock | 2 +- foundation/src/builders/bash/boot.nix | 2 +- foundation/src/builders/bash/default.nix | 2 +- foundation/src/builders/file/text/default.nix | 2 +- foundation/src/builders/kaem/default.nix | 2 +- foundation/src/builders/raw/default.nix | 2 +- foundation/src/exports/default.nix | 2 +- foundation/src/stages/stage0/kaem/default.nix | 2 +- .../stage0/mescc-tools-extra/default.nix | 2 +- .../src/stages/stage0/mescc-tools/default.nix | 2 +- .../src/stages/stage0/phases/phase00.nix | 4 +- .../src/stages/stage0/phases/phase01.nix | 2 +- .../src/stages/stage0/phases/phase02.nix | 2 +- .../src/stages/stage0/phases/phase03.nix | 2 +- .../src/stages/stage0/phases/phase04.nix | 2 +- .../src/stages/stage0/phases/phase05.nix | 2 +- .../src/stages/stage0/phases/phase06.nix | 2 +- .../src/stages/stage0/phases/phase07.nix | 2 +- .../src/stages/stage0/phases/phase08.nix | 2 +- .../src/stages/stage0/phases/phase09.nix | 2 +- .../src/stages/stage0/phases/phase10.nix | 2 +- .../src/stages/stage0/phases/phase11.nix | 2 +- .../src/stages/stage0/phases/phase12.nix | 2 +- foundation/src/stages/stage1/bash/boot.nix | 4 +- foundation/src/stages/stage1/bash/default.nix | 4 +- .../src/stages/stage1/binutils/default.nix | 4 +- .../src/stages/stage1/bison/default.nix | 4 +- .../src/stages/stage1/bzip2/default.nix | 4 +- .../src/stages/stage1/coreutils/boot.nix | 4 +- .../src/stages/stage1/coreutils/default.nix | 4 +- .../src/stages/stage1/diffutils/default.nix | 4 +- .../src/stages/stage1/findutils/default.nix | 4 +- foundation/src/stages/stage1/gawk/boot.nix | 4 +- foundation/src/stages/stage1/gawk/default.nix | 4 +- foundation/src/stages/stage1/gcc/default.nix | 14 ++--- foundation/src/stages/stage1/gcc/v4.6.cxx.nix | 12 ++-- foundation/src/stages/stage1/gcc/v4.6.nix | 12 ++-- foundation/src/stages/stage1/gcc/v8.nix | 14 ++--- .../src/stages/stage1/gnugrep/default.nix | 4 +- .../src/stages/stage1/gnum4/default.nix | 4 +- foundation/src/stages/stage1/gnumake/boot.nix | 4 +- .../src/stages/stage1/gnumake/default.nix | 4 +- .../src/stages/stage1/gnupatch/default.nix | 4 +- foundation/src/stages/stage1/gnused/boot.nix | 4 +- .../src/stages/stage1/gnused/default.nix | 4 +- foundation/src/stages/stage1/gnutar/boot.nix | 4 +- .../src/stages/stage1/gnutar/default.nix | 4 +- foundation/src/stages/stage1/gnutar/musl.nix | 4 +- foundation/src/stages/stage1/gzip/default.nix | 4 +- .../src/stages/stage1/heirloom/default.nix | 4 +- .../src/stages/stage1/heirloom/devtools.nix | 4 +- .../stages/stage1/linux-headers/default.nix | 4 +- .../src/stages/stage1/ln-boot/default.nix | 2 +- foundation/src/stages/stage1/mes/compiler.nix | 2 +- foundation/src/stages/stage1/mes/default.nix | 2 +- foundation/src/stages/stage1/mes/libc.nix | 2 +- foundation/src/stages/stage1/mes/libs.nix | 4 +- foundation/src/stages/stage1/musl/boot.nix | 4 +- foundation/src/stages/stage1/musl/default.nix | 4 +- .../src/stages/stage1/nyacc/default.nix | 4 +- .../src/stages/stage1/python/default.nix | 4 +- foundation/src/stages/stage1/tinycc/boot.nix | 4 +- foundation/src/stages/stage1/tinycc/mes.nix | 4 +- foundation/src/stages/stage1/tinycc/musl.nix | 4 +- foundation/src/stages/stage1/xz/default.nix | 4 +- foundation/src/stages/stage1/zlib/default.nix | 4 +- foundation/src/stages/stage2/bash/default.nix | 4 +- .../src/stages/stage2/binutils/default.nix | 4 +- .../src/stages/stage2/busybox/default.nix | 4 +- .../src/stages/stage2/bzip2/default.nix | 4 +- .../src/stages/stage2/coreutils/default.nix | 4 +- .../src/stages/stage2/diffutils/default.nix | 4 +- .../src/stages/stage2/findutils/default.nix | 4 +- foundation/src/stages/stage2/gawk/default.nix | 4 +- foundation/src/stages/stage2/gcc/default.nix | 14 ++--- .../src/stages/stage2/glibc/default.nix | 4 +- .../src/stages/stage2/gnugrep/default.nix | 4 +- .../src/stages/stage2/gnumake/default.nix | 4 +- .../src/stages/stage2/gnupatch/default.nix | 4 +- .../src/stages/stage2/gnused/default.nix | 4 +- .../src/stages/stage2/gnutar/default.nix | 4 +- foundation/src/stages/stage2/gzip/default.nix | 4 +- .../src/stages/stage2/patchelf/default.nix | 4 +- lib/default.test.nix | 1 + lib/src/default.nix | 2 +- lib/src/default.test.nix | 18 ++++++ lib/src/packages/default.nix | 4 +- lib/src/paths/default.nix | 8 +-- lib/src/points/default.nix | 22 +++++++ lib/src/points/default.test.nix | 59 ++++++++++++++++++- lib/src/types/default.nix | 8 +-- potluck/default.nix | 29 +++++++++ potluck/flake.nix | 20 +++++++ potluck/src/exports/default.nix | 5 ++ potluck/src/exports/packages.nix | 15 +++++ potluck/src/modules.nix | 1 + 97 files changed, 344 insertions(+), 176 deletions(-) create mode 100644 lib/src/default.test.nix create mode 100644 potluck/default.nix create mode 100644 potluck/flake.nix create mode 100644 potluck/src/exports/default.nix create mode 100644 potluck/src/exports/packages.nix create mode 100644 potluck/src/modules.nix diff --git a/foundation/default.nix b/foundation/default.nix index 8cede2c..3b7fd95 100644 --- a/foundation/default.nix +++ b/foundation/default.nix @@ -11,4 +11,4 @@ ]; }; in - result.config.exports.resolved + result.config.exports.resolved.packages diff --git a/foundation/flake.lock b/foundation/flake.lock index 3c51a07..9bd4432 100644 --- a/foundation/flake.lock +++ b/foundation/flake.lock @@ -3,7 +3,7 @@ "lib": { "locked": { "lastModified": 1, - "narHash": "sha256-nJ4WxMYE8OFaW6EhJDULMaBaTtXiVtR/MhIvZ4BMqbU=", + "narHash": "sha256-vaPypHCYtWP6e0APNsV3ttoW9D2PlL2WpMytd6LdOmk=", "path": "../lib", "type": "path" }, diff --git a/foundation/src/builders/bash/boot.nix b/foundation/src/builders/bash/boot.nix index 9cac662..64ab2cc 100644 --- a/foundation/src/builders/bash/boot.nix +++ b/foundation/src/builders/bash/boot.nix @@ -10,7 +10,7 @@ in { options.aux.foundation.builders.bash.boot = { 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."; }; }; diff --git a/foundation/src/builders/bash/default.nix b/foundation/src/builders/bash/default.nix index 023d58d..0e8ad46 100644 --- a/foundation/src/builders/bash/default.nix +++ b/foundation/src/builders/bash/default.nix @@ -13,7 +13,7 @@ in { options.aux.foundation.builders.bash = { 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."; }; }; diff --git a/foundation/src/builders/file/text/default.nix b/foundation/src/builders/file/text/default.nix index 3cfcdd6..fc25291 100644 --- a/foundation/src/builders/file/text/default.nix +++ b/foundation/src/builders/file/text/default.nix @@ -8,7 +8,7 @@ in { options.aux.foundation.builders.file.text = { 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."; }; }; diff --git a/foundation/src/builders/kaem/default.nix b/foundation/src/builders/kaem/default.nix index 17396cb..a003c50 100644 --- a/foundation/src/builders/kaem/default.nix +++ b/foundation/src/builders/kaem/default.nix @@ -9,7 +9,7 @@ in { options.aux.foundation.builders.kaem = { 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."; }; }; diff --git a/foundation/src/builders/raw/default.nix b/foundation/src/builders/raw/default.nix index c1542bc..5ea699b 100644 --- a/foundation/src/builders/raw/default.nix +++ b/foundation/src/builders/raw/default.nix @@ -6,7 +6,7 @@ in { options.aux.foundation.builders.raw = { 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."; }; }; diff --git a/foundation/src/exports/default.nix b/foundation/src/exports/default.nix index 9093897..aaabffd 100644 --- a/foundation/src/exports/default.nix +++ b/foundation/src/exports/default.nix @@ -6,7 +6,7 @@ packages = lib.options.create { default.value = {}; - type = lib.types.attrs.of lib.types.package; + type = lib.types.attrs.of lib.types.derivation; }; extras = lib.options.create { diff --git a/foundation/src/stages/stage0/kaem/default.nix b/foundation/src/stages/stage0/kaem/default.nix index c74debf..3328fff 100644 --- a/foundation/src/stages/stage0/kaem/default.nix +++ b/foundation/src/stages/stage0/kaem/default.nix @@ -40,7 +40,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for kaem."; }; }; diff --git a/foundation/src/stages/stage0/mescc-tools-extra/default.nix b/foundation/src/stages/stage0/mescc-tools-extra/default.nix index 5d1ed72..0785636 100644 --- a/foundation/src/stages/stage0/mescc-tools-extra/default.nix +++ b/foundation/src/stages/stage0/mescc-tools-extra/default.nix @@ -48,7 +48,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for mescc-tools-extra."; }; }; diff --git a/foundation/src/stages/stage0/mescc-tools/default.nix b/foundation/src/stages/stage0/mescc-tools/default.nix index 89135b2..1855b95 100644 --- a/foundation/src/stages/stage0/mescc-tools/default.nix +++ b/foundation/src/stages/stage0/mescc-tools/default.nix @@ -134,7 +134,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for mescc-tools."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase00.nix b/foundation/src/stages/stage0/phases/phase00.nix index 47ecb4c..effb534 100644 --- a/foundation/src/stages/stage0/phases/phase00.nix +++ b/foundation/src/stages/stage0/phases/phase00.nix @@ -46,7 +46,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for hex0."; }; @@ -59,7 +59,7 @@ in { }; executable = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The derivation to use to build hex0."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase01.nix b/foundation/src/stages/stage0/phases/phase01.nix index 1cd4ed9..e820985 100644 --- a/foundation/src/stages/stage0/phases/phase01.nix +++ b/foundation/src/stages/stage0/phases/phase01.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for hex1."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase02.nix b/foundation/src/stages/stage0/phases/phase02.nix index 5bcc381..3735002 100644 --- a/foundation/src/stages/stage0/phases/phase02.nix +++ b/foundation/src/stages/stage0/phases/phase02.nix @@ -40,7 +40,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for hex2-0."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase03.nix b/foundation/src/stages/stage0/phases/phase03.nix index 4419595..bc7c345 100644 --- a/foundation/src/stages/stage0/phases/phase03.nix +++ b/foundation/src/stages/stage0/phases/phase03.nix @@ -41,7 +41,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for catm."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase04.nix b/foundation/src/stages/stage0/phases/phase04.nix index 0dc6bad..eea5e29 100644 --- a/foundation/src/stages/stage0/phases/phase04.nix +++ b/foundation/src/stages/stage0/phases/phase04.nix @@ -41,7 +41,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for M0."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase05.nix b/foundation/src/stages/stage0/phases/phase05.nix index fc659e0..84c4548 100644 --- a/foundation/src/stages/stage0/phases/phase05.nix +++ b/foundation/src/stages/stage0/phases/phase05.nix @@ -42,7 +42,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for cc_arch."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase06.nix b/foundation/src/stages/stage0/phases/phase06.nix index a85cf22..2ff8954 100644 --- a/foundation/src/stages/stage0/phases/phase06.nix +++ b/foundation/src/stages/stage0/phases/phase06.nix @@ -43,7 +43,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for M2."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase07.nix b/foundation/src/stages/stage0/phases/phase07.nix index e321e85..dafba6a 100644 --- a/foundation/src/stages/stage0/phases/phase07.nix +++ b/foundation/src/stages/stage0/phases/phase07.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for blood-elf."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase08.nix b/foundation/src/stages/stage0/phases/phase08.nix index 1a9d643..ac1d888 100644 --- a/foundation/src/stages/stage0/phases/phase08.nix +++ b/foundation/src/stages/stage0/phases/phase08.nix @@ -45,7 +45,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for M1-0."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase09.nix b/foundation/src/stages/stage0/phases/phase09.nix index ca9e5f3..000fb72 100644 --- a/foundation/src/stages/stage0/phases/phase09.nix +++ b/foundation/src/stages/stage0/phases/phase09.nix @@ -46,7 +46,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for hex2-1."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase10.nix b/foundation/src/stages/stage0/phases/phase10.nix index eef435d..567713d 100644 --- a/foundation/src/stages/stage0/phases/phase10.nix +++ b/foundation/src/stages/stage0/phases/phase10.nix @@ -47,7 +47,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for M1."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase11.nix b/foundation/src/stages/stage0/phases/phase11.nix index 3684531..9c5ef9f 100644 --- a/foundation/src/stages/stage0/phases/phase11.nix +++ b/foundation/src/stages/stage0/phases/phase11.nix @@ -46,7 +46,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for hex2."; }; }; diff --git a/foundation/src/stages/stage0/phases/phase12.nix b/foundation/src/stages/stage0/phases/phase12.nix index d05128b..f241d84 100644 --- a/foundation/src/stages/stage0/phases/phase12.nix +++ b/foundation/src/stages/stage0/phases/phase12.nix @@ -46,7 +46,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for kaem-unwrapped."; }; }; diff --git a/foundation/src/stages/stage1/bash/boot.nix b/foundation/src/stages/stage1/bash/boot.nix index 882b8f5..97d6bcf 100644 --- a/foundation/src/stages/stage1/bash/boot.nix +++ b/foundation/src/stages/stage1/bash/boot.nix @@ -37,7 +37,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for bash-boot."; }; @@ -47,7 +47,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/bash/default.nix b/foundation/src/stages/stage1/bash/default.nix index cb09b3e..28c924f 100644 --- a/foundation/src/stages/stage1/bash/default.nix +++ b/foundation/src/stages/stage1/bash/default.nix @@ -48,7 +48,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for bash."; }; @@ -58,7 +58,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/binutils/default.nix b/foundation/src/stages/stage1/binutils/default.nix index baf1564..3a762ec 100644 --- a/foundation/src/stages/stage1/binutils/default.nix +++ b/foundation/src/stages/stage1/binutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for binutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/bison/default.nix b/foundation/src/stages/stage1/bison/default.nix index a822da4..2428414 100644 --- a/foundation/src/stages/stage1/bison/default.nix +++ b/foundation/src/stages/stage1/bison/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for bison."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/bzip2/default.nix b/foundation/src/stages/stage1/bzip2/default.nix index ffb9908..54edfad 100644 --- a/foundation/src/stages/stage1/bzip2/default.nix +++ b/foundation/src/stages/stage1/bzip2/default.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for bzip2."; }; @@ -49,7 +49,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/coreutils/boot.nix b/foundation/src/stages/stage1/coreutils/boot.nix index f4e5d1e..ce92ba0 100644 --- a/foundation/src/stages/stage1/coreutils/boot.nix +++ b/foundation/src/stages/stage1/coreutils/boot.nix @@ -10,7 +10,7 @@ in { options.aux.foundation.stages.stage1.coreutils.boot = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for coreutils-boot."; }; @@ -20,7 +20,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/coreutils/default.nix b/foundation/src/stages/stage1/coreutils/default.nix index 030f270..ab108e3 100644 --- a/foundation/src/stages/stage1/coreutils/default.nix +++ b/foundation/src/stages/stage1/coreutils/default.nix @@ -42,7 +42,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for coreutils."; }; @@ -52,7 +52,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/diffutils/default.nix b/foundation/src/stages/stage1/diffutils/default.nix index abddc47..d5b3233 100644 --- a/foundation/src/stages/stage1/diffutils/default.nix +++ b/foundation/src/stages/stage1/diffutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for diffutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/findutils/default.nix b/foundation/src/stages/stage1/findutils/default.nix index 55b79db..e639eee 100644 --- a/foundation/src/stages/stage1/findutils/default.nix +++ b/foundation/src/stages/stage1/findutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for findutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gawk/boot.nix b/foundation/src/stages/stage1/gawk/boot.nix index d59b39a..fd5dc4e 100644 --- a/foundation/src/stages/stage1/gawk/boot.nix +++ b/foundation/src/stages/stage1/gawk/boot.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.gawk.boot = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnutar-boot."; }; @@ -21,7 +21,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gawk/default.nix b/foundation/src/stages/stage1/gawk/default.nix index 8c01309..99190d8 100644 --- a/foundation/src/stages/stage1/gawk/default.nix +++ b/foundation/src/stages/stage1/gawk/default.nix @@ -48,7 +48,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gawk."; }; @@ -58,7 +58,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gcc/default.nix b/foundation/src/stages/stage1/gcc/default.nix index 4f8c29e..01d8791 100644 --- a/foundation/src/stages/stage1/gcc/default.nix +++ b/foundation/src/stages/stage1/gcc/default.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gcc."; }; @@ -54,20 +54,20 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; cc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The cc source for the package."; }; }; gmp = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The gmp source for the package."; }; @@ -79,7 +79,7 @@ in { mpfr = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpfr source for the package."; }; @@ -91,7 +91,7 @@ in { mpc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpc source for the package."; }; @@ -103,7 +103,7 @@ in { isl = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The isl source for the package."; }; version = lib.options.create { diff --git a/foundation/src/stages/stage1/gcc/v4.6.cxx.nix b/foundation/src/stages/stage1/gcc/v4.6.cxx.nix index bf49988..c09886f 100644 --- a/foundation/src/stages/stage1/gcc/v4.6.cxx.nix +++ b/foundation/src/stages/stage1/gcc/v4.6.cxx.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.gcc.v46.cxx = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gcc-cxx."; }; @@ -21,20 +21,20 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; cc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The cc source for the package."; }; }; gmp = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The gmp source for the package."; }; @@ -46,7 +46,7 @@ in { mpfr = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpfr source for the package."; }; @@ -58,7 +58,7 @@ in { mpc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpc source for the package."; }; diff --git a/foundation/src/stages/stage1/gcc/v4.6.nix b/foundation/src/stages/stage1/gcc/v4.6.nix index 96ff1a9..c1f0840 100644 --- a/foundation/src/stages/stage1/gcc/v4.6.nix +++ b/foundation/src/stages/stage1/gcc/v4.6.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.gcc.v46 = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gcc."; }; @@ -21,20 +21,20 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; cc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The cc source for the package."; }; }; gmp = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The gmp source for the package."; }; @@ -46,7 +46,7 @@ in { mpfr = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpfr source for the package."; }; @@ -58,7 +58,7 @@ in { mpc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpc source for the package."; }; diff --git a/foundation/src/stages/stage1/gcc/v8.nix b/foundation/src/stages/stage1/gcc/v8.nix index ae551b9..0e9c263 100644 --- a/foundation/src/stages/stage1/gcc/v8.nix +++ b/foundation/src/stages/stage1/gcc/v8.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.gcc.v8 = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gcc."; }; @@ -21,20 +21,20 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; cc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The cc source for the package."; }; }; gmp = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The gmp source for the package."; }; @@ -46,7 +46,7 @@ in { mpfr = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpfr source for the package."; }; @@ -58,7 +58,7 @@ in { mpc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpc source for the package."; }; @@ -70,7 +70,7 @@ in { isl = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The isl source for the package."; }; version = lib.options.create { diff --git a/foundation/src/stages/stage1/gnugrep/default.nix b/foundation/src/stages/stage1/gnugrep/default.nix index 63e61b0..36416d4 100644 --- a/foundation/src/stages/stage1/gnugrep/default.nix +++ b/foundation/src/stages/stage1/gnugrep/default.nix @@ -43,7 +43,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnugrep."; }; @@ -53,7 +53,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnum4/default.nix b/foundation/src/stages/stage1/gnum4/default.nix index 5b924b6..55c973d 100644 --- a/foundation/src/stages/stage1/gnum4/default.nix +++ b/foundation/src/stages/stage1/gnum4/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnum4."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnumake/boot.nix b/foundation/src/stages/stage1/gnumake/boot.nix index 119da1d..59dc2c1 100644 --- a/foundation/src/stages/stage1/gnumake/boot.nix +++ b/foundation/src/stages/stage1/gnumake/boot.nix @@ -10,7 +10,7 @@ in { options.aux.foundation.stages.stage1.gnumake.boot = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnumake."; }; @@ -20,7 +20,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnumake/default.nix b/foundation/src/stages/stage1/gnumake/default.nix index 9cb30b8..7af82c7 100644 --- a/foundation/src/stages/stage1/gnumake/default.nix +++ b/foundation/src/stages/stage1/gnumake/default.nix @@ -42,7 +42,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnumake."; }; @@ -52,7 +52,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnupatch/default.nix b/foundation/src/stages/stage1/gnupatch/default.nix index 0d0b07f..7e80937 100644 --- a/foundation/src/stages/stage1/gnupatch/default.nix +++ b/foundation/src/stages/stage1/gnupatch/default.nix @@ -37,7 +37,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnupatch."; }; @@ -47,7 +47,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnused/boot.nix b/foundation/src/stages/stage1/gnused/boot.nix index 4dbdfa4..f40fc35 100644 --- a/foundation/src/stages/stage1/gnused/boot.nix +++ b/foundation/src/stages/stage1/gnused/boot.nix @@ -10,7 +10,7 @@ in { options.aux.foundation.stages.stage1.gnused.boot = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnused-boot."; }; @@ -20,7 +20,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnused/default.nix b/foundation/src/stages/stage1/gnused/default.nix index 524a531..a2e1850 100644 --- a/foundation/src/stages/stage1/gnused/default.nix +++ b/foundation/src/stages/stage1/gnused/default.nix @@ -48,7 +48,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnused."; }; @@ -58,7 +58,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnutar/boot.nix b/foundation/src/stages/stage1/gnutar/boot.nix index 47efba0..c72ac7f 100644 --- a/foundation/src/stages/stage1/gnutar/boot.nix +++ b/foundation/src/stages/stage1/gnutar/boot.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.gnutar.boot = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnutar-boot."; }; @@ -21,7 +21,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnutar/default.nix b/foundation/src/stages/stage1/gnutar/default.nix index 4579bf9..55129bd 100644 --- a/foundation/src/stages/stage1/gnutar/default.nix +++ b/foundation/src/stages/stage1/gnutar/default.nix @@ -49,7 +49,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnutar."; }; @@ -59,7 +59,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gnutar/musl.nix b/foundation/src/stages/stage1/gnutar/musl.nix index 0a4127f..af5389a 100644 --- a/foundation/src/stages/stage1/gnutar/musl.nix +++ b/foundation/src/stages/stage1/gnutar/musl.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.gnutar.musl = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnutar-musl."; }; @@ -21,7 +21,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/gzip/default.nix b/foundation/src/stages/stage1/gzip/default.nix index e460eb2..87cc2a7 100644 --- a/foundation/src/stages/stage1/gzip/default.nix +++ b/foundation/src/stages/stage1/gzip/default.nix @@ -37,7 +37,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gzip."; }; @@ -47,7 +47,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/heirloom/default.nix b/foundation/src/stages/stage1/heirloom/default.nix index bd76f9a..57bb742 100644 --- a/foundation/src/stages/stage1/heirloom/default.nix +++ b/foundation/src/stages/stage1/heirloom/default.nix @@ -53,7 +53,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for heirloom."; }; @@ -63,7 +63,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/heirloom/devtools.nix b/foundation/src/stages/stage1/heirloom/devtools.nix index fbfd5ab..affce51 100644 --- a/foundation/src/stages/stage1/heirloom/devtools.nix +++ b/foundation/src/stages/stage1/heirloom/devtools.nix @@ -13,7 +13,7 @@ in { options.aux.foundation.stages.stage1.heirloom.devtools = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for heirloom-devtools."; }; @@ -23,7 +23,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; diff --git a/foundation/src/stages/stage1/linux-headers/default.nix b/foundation/src/stages/stage1/linux-headers/default.nix index f9643a6..fc496fe 100644 --- a/foundation/src/stages/stage1/linux-headers/default.nix +++ b/foundation/src/stages/stage1/linux-headers/default.nix @@ -32,7 +32,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for linux-headers."; }; @@ -42,7 +42,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/ln-boot/default.nix b/foundation/src/stages/stage1/ln-boot/default.nix index f4365c1..833cba3 100644 --- a/foundation/src/stages/stage1/ln-boot/default.nix +++ b/foundation/src/stages/stage1/ln-boot/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for ln-boot."; }; }; diff --git a/foundation/src/stages/stage1/mes/compiler.nix b/foundation/src/stages/stage1/mes/compiler.nix index a45445e..a6e8974 100644 --- a/foundation/src/stages/stage1/mes/compiler.nix +++ b/foundation/src/stages/stage1/mes/compiler.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the mes compiler."; }; }; diff --git a/foundation/src/stages/stage1/mes/default.nix b/foundation/src/stages/stage1/mes/default.nix index 91b9cfc..38a8f87 100644 --- a/foundation/src/stages/stage1/mes/default.nix +++ b/foundation/src/stages/stage1/mes/default.nix @@ -15,7 +15,7 @@ in { options.aux.foundation.stages.stage1.mes = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; diff --git a/foundation/src/stages/stage1/mes/libc.nix b/foundation/src/stages/stage1/mes/libc.nix index b86f571..ecf2fd6 100644 --- a/foundation/src/stages/stage1/mes/libc.nix +++ b/foundation/src/stages/stage1/mes/libc.nix @@ -37,7 +37,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for mes-libc."; }; }; diff --git a/foundation/src/stages/stage1/mes/libs.nix b/foundation/src/stages/stage1/mes/libs.nix index 36ed899..3154f93 100644 --- a/foundation/src/stages/stage1/mes/libs.nix +++ b/foundation/src/stages/stage1/mes/libs.nix @@ -39,12 +39,12 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for mes libs."; }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; diff --git a/foundation/src/stages/stage1/musl/boot.nix b/foundation/src/stages/stage1/musl/boot.nix index 1bdf2c3..ad8892d 100644 --- a/foundation/src/stages/stage1/musl/boot.nix +++ b/foundation/src/stages/stage1/musl/boot.nix @@ -11,7 +11,7 @@ in { options.aux.foundation.stages.stage1.musl.boot = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for musl-boot."; }; @@ -21,7 +21,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/musl/default.nix b/foundation/src/stages/stage1/musl/default.nix index 2e6e47c..3b36ff5 100644 --- a/foundation/src/stages/stage1/musl/default.nix +++ b/foundation/src/stages/stage1/musl/default.nix @@ -43,7 +43,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for musl."; }; @@ -53,7 +53,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/nyacc/default.nix b/foundation/src/stages/stage1/nyacc/default.nix index eaeb935..64d8b2f 100644 --- a/foundation/src/stages/stage1/nyacc/default.nix +++ b/foundation/src/stages/stage1/nyacc/default.nix @@ -40,12 +40,12 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for nyacc."; }; }; diff --git a/foundation/src/stages/stage1/python/default.nix b/foundation/src/stages/stage1/python/default.nix index d4feb48..9297b03 100644 --- a/foundation/src/stages/stage1/python/default.nix +++ b/foundation/src/stages/stage1/python/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for python."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/tinycc/boot.nix b/foundation/src/stages/stage1/tinycc/boot.nix index a80bdf2..e1979e3 100644 --- a/foundation/src/stages/stage1/tinycc/boot.nix +++ b/foundation/src/stages/stage1/tinycc/boot.nix @@ -42,14 +42,14 @@ in { compiler = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the tinycc-boot compiler."; }; }; libs = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the tinycc-boot libs."; }; }; diff --git a/foundation/src/stages/stage1/tinycc/mes.nix b/foundation/src/stages/stage1/tinycc/mes.nix index 4f377db..2f298af 100644 --- a/foundation/src/stages/stage1/tinycc/mes.nix +++ b/foundation/src/stages/stage1/tinycc/mes.nix @@ -15,14 +15,14 @@ in { options.aux.foundation.stages.stage1.tinycc.mes = { compiler = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the tinycc-mes compiler."; }; }; libs = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the tinycc-mes libs."; }; }; diff --git a/foundation/src/stages/stage1/tinycc/musl.nix b/foundation/src/stages/stage1/tinycc/musl.nix index e8822a7..6c894a6 100644 --- a/foundation/src/stages/stage1/tinycc/musl.nix +++ b/foundation/src/stages/stage1/tinycc/musl.nix @@ -15,14 +15,14 @@ in { options.aux.foundation.stages.stage1.tinycc.musl = { compiler = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the tinycc-musl compiler."; }; }; libs = { package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for the tinycc-musl libs."; }; }; diff --git a/foundation/src/stages/stage1/xz/default.nix b/foundation/src/stages/stage1/xz/default.nix index 38782f0..3857a63 100644 --- a/foundation/src/stages/stage1/xz/default.nix +++ b/foundation/src/stages/stage1/xz/default.nix @@ -41,7 +41,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for xz."; }; @@ -51,7 +51,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage1/zlib/default.nix b/foundation/src/stages/stage1/zlib/default.nix index f943946..39c5a04 100644 --- a/foundation/src/stages/stage1/zlib/default.nix +++ b/foundation/src/stages/stage1/zlib/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for zlib."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/bash/default.nix b/foundation/src/stages/stage2/bash/default.nix index ee3bb5a..1000f5a 100644 --- a/foundation/src/stages/stage2/bash/default.nix +++ b/foundation/src/stages/stage2/bash/default.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for bash."; }; @@ -54,7 +54,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/binutils/default.nix b/foundation/src/stages/stage2/binutils/default.nix index d205159..95248c0 100644 --- a/foundation/src/stages/stage2/binutils/default.nix +++ b/foundation/src/stages/stage2/binutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for binutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/busybox/default.nix b/foundation/src/stages/stage2/busybox/default.nix index fc9a642..bdef1f2 100644 --- a/foundation/src/stages/stage2/busybox/default.nix +++ b/foundation/src/stages/stage2/busybox/default.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for busybox."; }; @@ -49,7 +49,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/bzip2/default.nix b/foundation/src/stages/stage2/bzip2/default.nix index f287bed..ba1ab7b 100644 --- a/foundation/src/stages/stage2/bzip2/default.nix +++ b/foundation/src/stages/stage2/bzip2/default.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for bzip2."; }; @@ -49,7 +49,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/coreutils/default.nix b/foundation/src/stages/stage2/coreutils/default.nix index c87a792..7b541dd 100644 --- a/foundation/src/stages/stage2/coreutils/default.nix +++ b/foundation/src/stages/stage2/coreutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for coreutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/diffutils/default.nix b/foundation/src/stages/stage2/diffutils/default.nix index c4fc7b7..9044ef6 100644 --- a/foundation/src/stages/stage2/diffutils/default.nix +++ b/foundation/src/stages/stage2/diffutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for diffutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/findutils/default.nix b/foundation/src/stages/stage2/findutils/default.nix index 3c4564e..9ed6023 100644 --- a/foundation/src/stages/stage2/findutils/default.nix +++ b/foundation/src/stages/stage2/findutils/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for findutils."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gawk/default.nix b/foundation/src/stages/stage2/gawk/default.nix index 770f42d..12ddffe 100644 --- a/foundation/src/stages/stage2/gawk/default.nix +++ b/foundation/src/stages/stage2/gawk/default.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gawk."; }; @@ -54,7 +54,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gcc/default.nix b/foundation/src/stages/stage2/gcc/default.nix index 3f4702c..c661b05 100644 --- a/foundation/src/stages/stage2/gcc/default.nix +++ b/foundation/src/stages/stage2/gcc/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gcc."; }; @@ -48,20 +48,20 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; cc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The cc source for the package."; }; }; gmp = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The gmp source for the package."; }; @@ -73,7 +73,7 @@ in { mpfr = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpfr source for the package."; }; @@ -85,7 +85,7 @@ in { mpc = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The mpc source for the package."; }; @@ -97,7 +97,7 @@ in { isl = { src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The isl source for the package."; }; version = lib.options.create { diff --git a/foundation/src/stages/stage2/glibc/default.nix b/foundation/src/stages/stage2/glibc/default.nix index b3834ac..3764344 100644 --- a/foundation/src/stages/stage2/glibc/default.nix +++ b/foundation/src/stages/stage2/glibc/default.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for glibc."; }; @@ -49,7 +49,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gnugrep/default.nix b/foundation/src/stages/stage2/gnugrep/default.nix index cd48175..c0fd716 100644 --- a/foundation/src/stages/stage2/gnugrep/default.nix +++ b/foundation/src/stages/stage2/gnugrep/default.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnugrep."; }; @@ -54,7 +54,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gnumake/default.nix b/foundation/src/stages/stage2/gnumake/default.nix index e0a10e9..f0ce734 100644 --- a/foundation/src/stages/stage2/gnumake/default.nix +++ b/foundation/src/stages/stage2/gnumake/default.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnumake."; }; @@ -49,7 +49,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gnupatch/default.nix b/foundation/src/stages/stage2/gnupatch/default.nix index 610c21e..f763054 100644 --- a/foundation/src/stages/stage2/gnupatch/default.nix +++ b/foundation/src/stages/stage2/gnupatch/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnupatch."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gnused/default.nix b/foundation/src/stages/stage2/gnused/default.nix index 4eceacc..f6fa2ff 100644 --- a/foundation/src/stages/stage2/gnused/default.nix +++ b/foundation/src/stages/stage2/gnused/default.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnused."; }; @@ -54,7 +54,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gnutar/default.nix b/foundation/src/stages/stage2/gnutar/default.nix index c37d56e..d914545 100644 --- a/foundation/src/stages/stage2/gnutar/default.nix +++ b/foundation/src/stages/stage2/gnutar/default.nix @@ -44,7 +44,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gnutar."; }; @@ -54,7 +54,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/gzip/default.nix b/foundation/src/stages/stage2/gzip/default.nix index dae1de8..349e094 100644 --- a/foundation/src/stages/stage2/gzip/default.nix +++ b/foundation/src/stages/stage2/gzip/default.nix @@ -38,7 +38,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for gzip."; }; @@ -48,7 +48,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/foundation/src/stages/stage2/patchelf/default.nix b/foundation/src/stages/stage2/patchelf/default.nix index 13cfc16..40c9fbe 100644 --- a/foundation/src/stages/stage2/patchelf/default.nix +++ b/foundation/src/stages/stage2/patchelf/default.nix @@ -39,7 +39,7 @@ in { }; package = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "The package to use for patchelf."; }; @@ -49,7 +49,7 @@ in { }; src = lib.options.create { - type = lib.types.package; + type = lib.types.derivation; description = "Source for the package."; }; }; diff --git a/lib/default.test.nix b/lib/default.test.nix index 9b7861e..a715d06 100644 --- a/lib/default.test.nix +++ b/lib/default.test.nix @@ -4,6 +4,7 @@ let root = ./.; files = [ + ./src/default.test.nix ./src/attrs/default.test.nix ./src/bools/default.test.nix ./src/errors/default.test.nix diff --git a/lib/src/default.nix b/lib/src/default.nix index c3ea1db..a92b2d9 100644 --- a/lib/src/default.nix +++ b/lib/src/default.nix @@ -74,4 +74,4 @@ let builtins.foldl' merge {} libs ); in - lib + lib.points.withExtend (lib.fp.const lib) diff --git a/lib/src/default.test.nix b/lib/src/default.test.nix new file mode 100644 index 0000000..c405ea2 --- /dev/null +++ b/lib/src/default.test.nix @@ -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; + }; +} diff --git a/lib/src/packages/default.nix b/lib/src/packages/default.nix index b944244..a1513d0 100644 --- a/lib/src/packages/default.nix +++ b/lib/src/packages/default.nix @@ -46,9 +46,9 @@ lib: { ] value; - ## Get an output of a package. + ## Get an output of a derivation. ## - ## @type String -> Package -> String + ## @type String -> Derivation -> String getOutput = output: package: if ! package ? outputSpecified || !package.outputSpecified then package.${output} or package.out or package diff --git a/lib/src/paths/default.nix b/lib/src/paths/default.nix index c8ff14c..8f3800d 100644 --- a/lib/src/paths/default.nix +++ b/lib/src/paths/default.nix @@ -44,7 +44,7 @@ lib: { ## Create a search path from a list of packages. ## - ## @type String -> [Package] -> String + ## @type String -> [Derivation] -> String searchFromOutput = output: target: packages: lib.paths.search target @@ -52,17 +52,17 @@ lib: { ## Create a search path for the binary output of a package. ## - ## @type [Package] -> String + ## @type [Derivation] -> String bin = lib.paths.searchFromOutput "bin" "bin"; ## Create a search path for the library output of a package. ## - ## @type [Package] -> String + ## @type [Derivation] -> String lib = lib.paths.searchFromOutput "lib" "lib"; ## Create a search path for the include output of a package. ## - ## @type [Package] -> String + ## @type [Derivation] -> String include = lib.paths.searchFromOutput "dev" "include"; }; } diff --git a/lib/src/points/default.nix b/lib/src/points/default.nix index 153fc4b..bc967aa 100644 --- a/lib/src/points/default.nix +++ b/lib/src/points/default.nix @@ -26,5 +26,27 @@ lib: { }; in 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; }; } diff --git a/lib/src/points/default.test.nix b/lib/src/points/default.test.nix index 00ebf8d..79597c1 100644 --- a/lib/src/points/default.test.nix +++ b/lib/src/points/default.test.nix @@ -1,3 +1,60 @@ let 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; + }; +} diff --git a/lib/src/types/default.nix b/lib/src/types/default.nix index 60fefc0..e8c151d 100644 --- a/lib/src/types/default.nix +++ b/lib/src/types/default.nix @@ -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 - package = lib.types.create { - name = "Package"; - description = "package"; + derivation = lib.types.create { + name = "Derivation"; + description = "derivation"; check = value: lib.packages.isDerivation value || lib.paths.validate.store value; merge = location: definitions: let merged = lib.options.merge.one location definitions; diff --git a/potluck/default.nix b/potluck/default.nix new file mode 100644 index 0000000..6843b25 --- /dev/null +++ b/potluck/default.nix @@ -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 diff --git a/potluck/flake.nix b/potluck/flake.nix new file mode 100644 index 0000000..c35d334 --- /dev/null +++ b/potluck/flake.nix @@ -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; +} diff --git a/potluck/src/exports/default.nix b/potluck/src/exports/default.nix new file mode 100644 index 0000000..e4b93c8 --- /dev/null +++ b/potluck/src/exports/default.nix @@ -0,0 +1,5 @@ +{ + includes = [ + ./packages.nix + ]; +} diff --git a/potluck/src/exports/packages.nix b/potluck/src/exports/packages.nix new file mode 100644 index 0000000..0081a2f --- /dev/null +++ b/potluck/src/exports/packages.nix @@ -0,0 +1,15 @@ +{ + config, + lib, +}: let +in { + options = { + exports.packages = lib.options.create { + default.value = {}; + }; + + exported.packages = lib.options.create { + default.value = {}; + }; + }; +} diff --git a/potluck/src/modules.nix b/potluck/src/modules.nix new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/potluck/src/modules.nix @@ -0,0 +1 @@ +[]