2024-08-30 21:46:37 +02:00
|
|
|
{ ... }: { stdenvNoCC, hostPlatform, lib, shellcheck-minimal, runtimeShell, cage }:
|
2024-08-23 09:18:16 +02:00
|
|
|
|
2024-08-30 21:46:37 +02:00
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
2024-08-23 09:18:16 +02:00
|
|
|
name = "wayland-headless";
|
|
|
|
|
2024-08-30 21:46:37 +02:00
|
|
|
nativeInstallCheckInputs = lib.optionals
|
|
|
|
finalAttrs.doInstallCheck [ shellcheck-minimal ];
|
2024-08-23 09:18:16 +02:00
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
2024-08-30 21:46:37 +02:00
|
|
|
doInstallCheck = !hostPlatform.isRiscV64;
|
2024-08-23 09:18:16 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
|
|
|
|
substitute ${./wl-run.sh} "$out/bin/wl-run" \
|
|
|
|
--subst-var-by runtimeShell ${lib.escapeShellArg runtimeShell} \
|
|
|
|
--subst-var-by cage ${lib.escapeShellArg cage}
|
|
|
|
|
|
|
|
substitute ${./xvfb-run.sh} "$out/bin/xvfb-run" \
|
|
|
|
--subst-var-by runtimeShell ${lib.escapeShellArg runtimeShell} \
|
|
|
|
--subst-var out
|
|
|
|
|
|
|
|
chmod +x "$out/bin/"{wl-run,xvfb-run}
|
|
|
|
'';
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
shellcheck "$out/bin/"{wl-run,xvfb-run}
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
inherit (cage.meta) platforms;
|
|
|
|
};
|
2024-08-30 21:46:37 +02:00
|
|
|
})
|