Try to save a gcroot will build dependencies

This commit is contained in:
Rodrigo Arias 2024-09-18 11:41:20 +02:00
parent a397ede43d
commit 9daa796b10

View File

@ -100,6 +100,16 @@
nixosconf = self.nixosConfigurations.lagarto-ox; nixosconf = self.nixosConfigurations.lagarto-ox;
syspkgs = nixosconf.pkgs; syspkgs = nixosconf.pkgs;
build = nixosconf.config.system.build; build = nixosconf.config.system.build;
buildRoots = savePkgs:
let
pkgs = syspkgs;
buildInner = { package, attr }: pkgs.linkFarmFromDrvs "${package.name}.${attr}" package.${attr};
in pkgs.linkFarmFromDrvs "top-level" (pkgs.lib.mapCartesianProduct buildInner {
package = savePkgs;
attr = [ "buildInputs" "nativeBuildInputs" ];
});
in syspkgs.mkShell { in syspkgs.mkShell {
pname = "lagarto-ox-shell"; pname = "lagarto-ox-shell";
TOPLEVEL = build.toplevel; TOPLEVEL = build.toplevel;
@ -110,6 +120,7 @@
UBOOT_ENV = syspkgs.uboot-env; UBOOT_ENV = syspkgs.uboot-env;
BITSTREAM = syspkgs.bitstream; BITSTREAM = syspkgs.bitstream;
BOOTROM = syspkgs.bootrom; BOOTROM = syspkgs.bootrom;
GCROOT = buildRoots [ build.toplevel build.kernel ];
shellHook = '' shellHook = ''
echo "Here are the current system pieces:" echo "Here are the current system pieces:"
echo " TOPLEVEL = $TOPLEVEL" echo " TOPLEVEL = $TOPLEVEL"
@ -120,6 +131,7 @@
echo " UBOOT_ENV = $UBOOT_ENV" echo " UBOOT_ENV = $UBOOT_ENV"
echo " BITSTREAM = $BITSTREAM" echo " BITSTREAM = $BITSTREAM"
echo " BOOTROM = $BOOTROM" echo " BOOTROM = $BOOTROM"
echo " GCROOT = $GCROOT"
''; '';
}; };