mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
armagetronad."0.4": fix installCheckPhase requiring an X server
This commit is contained in:
parent
24c913ddeb
commit
f744631376
1 changed files with 12 additions and 3 deletions
|
@ -21,6 +21,7 @@
|
|||
, libpng
|
||||
, libxml2
|
||||
, protobuf
|
||||
, xvfb-run
|
||||
, dedicatedServer ? false
|
||||
}:
|
||||
|
||||
|
@ -61,6 +62,7 @@ let
|
|||
extraBuildInputs = [ protobuf boost ]
|
||||
++ lib.optionals (!dedicatedServer) [ glew ftgl freetype SDL2 SDL2_image SDL2_mixer ];
|
||||
extraNativeBuildInputs = [ bison ];
|
||||
extraNativeInstallCheckInputs = lib.optionals (!dedicatedServer) [ xvfb-run ];
|
||||
};
|
||||
|
||||
# https://gitlab.com/armagetronad/armagetronad/-/commits/hack-0.2.8-sty+ct+ap/?ref_type=heads
|
||||
|
@ -134,6 +136,8 @@ let
|
|||
nativeBuildInputs = [ autoconf automake gnum4 pkg-config which python3 ]
|
||||
++ (resolvedParams.extraNativeBuildInputs or []);
|
||||
|
||||
nativeInstallCheckInputs = resolvedParams.extraNativeInstallCheckInputs or [];
|
||||
|
||||
postInstall = lib.optionalString (!dedicatedServer) ''
|
||||
mkdir -p $out/share/{applications,icons/hicolor}
|
||||
ln -s $out/share/games/armagetronad/desktop/armagetronad*.desktop $out/share/applications/
|
||||
|
@ -145,9 +149,14 @@ let
|
|||
installCheckPhase = ''
|
||||
export XDG_RUNTIME_DIR=/tmp
|
||||
bin="$out/bin/${mainProgram}"
|
||||
version="$("$bin" --version || true)"
|
||||
prefix="$("$bin" --prefix || true)"
|
||||
rubber="$("$bin" --doc | grep -m1 CYCLE_RUBBER)"
|
||||
if command -v xvfb-run &>/dev/null; then
|
||||
run="xvfb-run $bin"
|
||||
else
|
||||
run="$bin"
|
||||
fi
|
||||
version="$($run --version || true)"
|
||||
prefix="$($run --prefix || true)"
|
||||
rubber="$($run --doc | grep -m1 CYCLE_RUBBER)"
|
||||
|
||||
echo "Version: $version" >&2
|
||||
echo "Prefix: $prefix" >&2
|
||||
|
|
Loading…
Reference in a new issue