idiosyn/package/wayland-headless/package.nix
Mikael Voss 113a96d3eb
wayland-headless: Disable checks to avoid dependency
shellcheck depends on GHC, which can be inconvenient.
2024-09-01 21:27:03 +02:00

37 lines
948 B
Nix

{ ... }: { stdenvNoCC, hostPlatform, lib, shellcheck-minimal, runtimeShell, cage }:
stdenvNoCC.mkDerivation (finalAttrs: {
name = "wayland-headless";
nativeInstallCheckInputs = lib.optionals
finalAttrs.doInstallCheck [ shellcheck-minimal ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
doInstallCheck = false;
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;
};
})