mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
armagetronad: fix installCheckPhase on hydra
This commit is contained in:
parent
2506c28028
commit
204cb87e31
1 changed files with 16 additions and 11 deletions
|
@ -22,6 +22,7 @@
|
|||
, libxml2
|
||||
, protobuf
|
||||
, xvfb-run
|
||||
, gnugrep
|
||||
, dedicatedServer ? false
|
||||
}:
|
||||
|
||||
|
@ -54,22 +55,21 @@ let
|
|||
# https://gitlab.com/armagetronad/armagetronad/-/commits/trunk/?ref_type=heads
|
||||
${unstableVersionMajor} =
|
||||
let
|
||||
rev = "e7f41fd26363e7c6a72f0c673470ed06ab54ae08";
|
||||
hash = "sha256-Uxxk6L7WPxKYQ4CNxWwEtvbZjK8BqYNTuwwdleZ44Ro=";
|
||||
rev = "391a74625c1222dd180f069f1b61c3e069a3ba8c";
|
||||
hash = "sha256-fUY0dBj85k0QhnAoDzyBmmKmRh9oCYC6r6X4ukt7/L0=";
|
||||
in dedicatedServer: {
|
||||
version = "${unstableVersionMajor}-${builtins.substring 0 8 rev}";
|
||||
src = fetchArmagetron rev hash;
|
||||
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
|
||||
"${latestVersionMajor}-sty+ct+ap" =
|
||||
let
|
||||
rev = "a5bffe9dda2b43d330433f76f14eb374701f326a";
|
||||
hash = "sha256-cNABxfg3MSmbxU/R78QyPOMwXGqJEamaFOPNw5yhDGE=";
|
||||
rev = "5a17cc9fb6e1e27a358711afbd745ae54d4a8c60";
|
||||
hash = "sha256-111C1j/hSaASGcvYy3//TyHs4Z+3fuiOvCmtcWLdFd4=";
|
||||
in dedicatedServer: {
|
||||
version = "${latestVersionMajor}-sty+ct+ap-${builtins.substring 0 8 rev}";
|
||||
src = fetchArmagetron rev hash;
|
||||
|
@ -136,7 +136,9 @@ let
|
|||
nativeBuildInputs = [ autoconf automake gnum4 pkg-config which python3 ]
|
||||
++ (resolvedParams.extraNativeBuildInputs or []);
|
||||
|
||||
nativeInstallCheckInputs = resolvedParams.extraNativeInstallCheckInputs or [];
|
||||
nativeInstallCheckInputs = [ gnugrep ]
|
||||
++ lib.optional (!dedicatedServer) xvfb-run
|
||||
++ (resolvedParams.extraNativeInstallCheckInputs or []);
|
||||
|
||||
postInstall = lib.optionalString (!dedicatedServer) ''
|
||||
mkdir -p $out/share/{applications,icons/hicolor}
|
||||
|
@ -154,18 +156,21 @@ let
|
|||
else
|
||||
run="$bin"
|
||||
fi
|
||||
echo "Checking game info:" >&2
|
||||
version="$($run --version || true)"
|
||||
echo " - Version: $version" >&2
|
||||
prefix="$($run --prefix || true)"
|
||||
rubber="$($run --doc | grep -m1 CYCLE_RUBBER)"
|
||||
|
||||
echo "Version: $version" >&2
|
||||
echo "Prefix: $prefix" >&2
|
||||
echo "Docstring: $rubber" >&2
|
||||
echo " - Prefix: $prefix" >&2
|
||||
rubber="$(($run --doc || true) | grep -m1 CYCLE_RUBBER)"
|
||||
echo " - Docstring: $rubber" >&2
|
||||
|
||||
if [[ "$version" != *"${resolvedParams.version}"* ]] || \
|
||||
[ "$prefix" != "$out" ] || \
|
||||
[[ ! "$rubber" =~ ^CYCLE_RUBBER[[:space:]]+Niceness[[:space:]]factor ]]; then
|
||||
echo "Something didn't match. :-(" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "Everything is ok." >&2
|
||||
fi
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue