nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/default.nix
John Ericson 23f849f49d minimal-boostrap.mes: Separate compiler and libs
This matches tinycc, and what is generally done in Nixpkgs.
2023-05-14 19:27:15 -04:00

38 lines
1.1 KiB
Nix

{ lib
, config
, buildPlatform
, hostPlatform
}:
lib.makeScope
# Prevent using top-level attrs to protect against introducing dependency on
# non-bootstrap packages by mistake. Any top-level inputs must be explicitly
# declared here.
(extra: lib.callPackageWith ({ inherit lib config buildPlatform hostPlatform; } // extra))
(self: with self; {
gnupatch = callPackage ./gnupatch { tinycc = tinycc-mes; };
gnumake = callPackage ./gnumake { tinycc = tinycc-mes; };
ln-boot = callPackage ./ln-boot { };
mes = callPackage ./mes { };
mes-libc = callPackage ./mes/libc.nix { };
stage0-posix = callPackage ./stage0-posix { };
inherit (self.stage0-posix) kaem m2libc mescc-tools mescc-tools-extra;
tinycc-bootstrappable = callPackage ./tinycc/bootstrappable.nix { };
tinycc-mes = callPackage ./tinycc/mes.nix { };
inherit (callPackage ./utils.nix { }) fetchurl derivationWithMeta writeTextFile writeText;
test = kaem.runCommand "minimal-bootstrap-test" {} ''
echo ${mes.compiler.tests.get-version}
echo ${tinycc-mes.compiler.tests.chain}
mkdir ''${out}
'';
})