muvm: simplify wrapper code

This commit is contained in:
Jasi
2025-12-20 20:52:58 -05:00
parent 4067b99a99
commit d1a0237f78
+14 -12
View File
@@ -24,24 +24,26 @@ let
coreutils
];
text = ''
if [[ ! -f /etc/NIXOS ]]; then exit; fi
ln -s /run/muvm-host/run/current-system /run/current-system
# Only create the symlink if that path exists on the host and is a directory.
if [[ -d /run/muvm-host/run/opengl-driver ]]; then ln -s /run/muvm-host/run/opengl-driver /run/opengl-driver; fi
if [[ -f /etc/NIXOS ]]; then
ln -s /run/muvm-host/run/current-system /run/current-system
if [[ -d /run/muvm-host/run/opengl-driver ]]; then
ln -s /run/muvm-host/run/opengl-driver /run/opengl-driver
fi
fi
'';
};
binPath = [
dhcpcd
passt
(placeholder "out")
]
++ lib.optionals stdenv.hostPlatform.isAarch64 [ fex ];
wrapArgs = lib.escapeShellArgs [
"--prefix"
"PATH"
":"
(lib.makeBinPath binPath)
(lib.makeBinPath (
[
dhcpcd
passt
(placeholder "out")
]
++ lib.optionals stdenv.hostPlatform.isAarch64 [ fex ]
))
"--add-flags"
"--execute-pre=${lib.getExe initScript}"
];