mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] vcmi: fix build (#531930)
This commit is contained in:
commit
1849322e2d
1 changed files with 14 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
|||
SDL2_ttf,
|
||||
boost,
|
||||
cmake,
|
||||
gettext,
|
||||
fetchFromGitHub,
|
||||
ffmpeg,
|
||||
fuzzylite,
|
||||
|
|
@ -30,16 +31,27 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
pname = "vcmi";
|
||||
version = "1.7.4";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vcmi";
|
||||
repo = "vcmi";
|
||||
tag = finalAttrs.version;
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-uzdnRKF0xb2B2r6kTzk6OEDGBdOwcu9eGYsvv4ALCF0=";
|
||||
# Disable git background maintenance for the whole prefetch, including submodule clones.
|
||||
# Upstream nix-prefetch-git only disables it on the outer repo (NixOS/nixpkgs#524215), so
|
||||
# submodule clones can still race with their own maintenance and break `.git` cleanup.
|
||||
preFetch = ''
|
||||
export GIT_CONFIG_GLOBAL="$TMPDIR/gitconfig"
|
||||
printf '[maintenance]\n\tauto = false\n' > "$GIT_CONFIG_GLOBAL"
|
||||
'';
|
||||
hash = "sha256-iV1twkoOJyUsUkq17mdTYk1YvfmUtLHdtR3H77BoNJk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gettext # msgfmt
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
|
|
@ -98,13 +110,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgram = "${placeholder "out"}/bin/vcmiclient";
|
||||
versionCheckProgramArg = "--version";
|
||||
versionCheckKeepEnvironment = [
|
||||
"XDG_CACHE_HOME"
|
||||
"XDG_CONFIG_HOME"
|
||||
"XDG_DATA_HOME"
|
||||
];
|
||||
preVersionCheck = ''
|
||||
cd $(mktemp -d)
|
||||
export \
|
||||
XDG_CACHE_HOME="$TMPDIR" \
|
||||
XDG_CONFIG_HOME="$TMPDIR" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue