[RFC PATCH v2 04/10] vm-lib: add mesa drivers to VM

Alyssa Ross
2022-09-30T21:36:12Z

This is a dynamically-linked, Glibc version of Mesa. Dynamic linking
is basically required for GUI stuff, but maybe it would be better to
do this with Musl in the end. Not sure yet. It depends exactly what
this shared base VM will be used for — will applications run it
directly, or inside some other layer like Flatpak or Docker? How will
that interact with Mesa?

vm-lib/make-vm.nix | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vm-lib/make-vm.nix b/vm-lib/make-vm.nix
index 10646d3..20cdba4 100644
--- a/vm-lib/make-vm.nix
+++ b/vm-lib/make-vm.nix
@@ -29,9 +29,10 @@ runCommand "spectrum-vm-${name}" {
mkdir root
cd root
ln -s ${run} run
- comm -23 <(sort ${writeReferencesToFile run}) \
+ ln -s ${config.pkgs.mesa.drivers}/lib
+ comm -23 <(sort -u ${writeReferencesToFile run} ${writeReferencesToFile config.pkgs.mesa.drivers}) \
<(sort ${writeReferencesToFile basePackages}) |
- tar -cf ../run.tar --verbatim-files-from -T - run
+ tar -cf ../run.tar --verbatim-files-from -T - *
tar2ext4 -i ../run.tar -o "$out/data/${name}/blk/run.img"
e2label "$out/data/${name}/blk/run.img" ext

--
2.37.1