vcmi: 1.6.8 -> 1.7.0 (#474005)

This commit is contained in:
Azat Bahawi
2025-12-27 18:41:17 +00:00
committed by GitHub
2 changed files with 94 additions and 33 deletions
+47
View File
@@ -0,0 +1,47 @@
{
cmake,
fetchurl,
lib,
libpng,
ninja,
stdenv,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libsquish";
version = "1.15";
src = fetchurl {
url = "mirror://sourceforge/project/libsquish/libsquish-${finalAttrs.version}.tgz";
hash = "sha256-YoeW7rpgiGYYOmHQgNRpZ8ndpnI7wKPsUjJMhdIUcmk=";
};
sourceRoot = ".";
nativeBuildInputs = [
cmake
ninja
];
buildInputs = [
libpng
zlib
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
];
meta = {
description = "Library for compressing images with the DXT/S3TC standard";
longDescription = ''
The libSquish library compresses images with the DXT standard (also known
as S3TC). This standard is mainly used by OpenGL and DirectX for the lossy
compression of RGBA textures.
'';
homepage = "https://libsquish.sourceforge.io";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.azahi ];
platforms = lib.platforms.all;
};
})
+47 -33
View File
@@ -1,40 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_ttf,
boost,
cmake,
fetchFromGitHub,
ffmpeg,
fuzzylite,
innoextract,
lib,
libsquish,
luajit,
minizip,
ninja,
onetbb,
onnxruntime,
pkg-config,
python3,
onetbb,
qt6,
stdenv,
unshield,
versionCheckHook,
xz,
zlib,
testers,
vcmi,
libsForQt5,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vcmi";
version = "1.6.8";
version = "1.7.0";
src = fetchFromGitHub {
owner = "vcmi";
repo = "vcmi";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-k6tkylNXEzU+zzYoFWtx+AkoHQzAwbBxPB2DVevsryw=";
hash = "sha256-wwPlsXJd34OYfLdCkCl6PdboEo+9/ZPQWgmSxn88W+k=";
};
nativeBuildInputs = [
@@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
ninja
pkg-config
python3
libsForQt5.wrapQtAppsHook
qt6.wrapQtAppsHook
];
buildInputs = [
@@ -53,27 +53,28 @@ stdenv.mkDerivation (finalAttrs: {
boost
ffmpeg
fuzzylite
libsquish
luajit
minizip
libsForQt5.qtbase
libsForQt5.qttools
onetbb
onnxruntime
qt6.qtbase
qt6.qttools
xz
zlib
];
cmakeFlags = [
"-DENABLE_LUA:BOOL=ON"
"-DENABLE_ERM:BOOL=ON"
"-DENABLE_GOLDMASTER:BOOL=ON"
"-DENABLE_PCH:BOOL=OFF"
"-DENABLE_TEST:BOOL=OFF" # Tests require HOMM3 data files.
"-DFORCE_BUNDLED_MINIZIP:BOOL=OFF"
"-DFORCE_BUNDLED_FL:BOOL=OFF"
"-DCMAKE_INSTALL_RPATH:STRING=$out/lib/vcmi"
"-DCMAKE_INSTALL_BINDIR:STRING=bin"
"-DCMAKE_INSTALL_LIBDIR:STRING=lib"
"-DCMAKE_INSTALL_DATAROOTDIR:STRING=share"
(lib.cmakeBool "ENABLE_CLIENT" true)
(lib.cmakeBool "ENABLE_LUA" true)
(lib.cmakeBool "ENABLE_ERM" true)
(lib.cmakeBool "ENABLE_GOLDMASTER" true)
(lib.cmakeBool "ENABLE_TEST" false) # Requires nonfree data files.
(lib.cmakeBool "ENABLE_PCH" false)
(lib.cmakeFeature "CMAKE_INSTALL_RPATH" "$out/lib/vcmi")
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
(lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "share")
];
postFixup = ''
@@ -87,23 +88,36 @@ stdenv.mkDerivation (finalAttrs: {
}"
'';
passthru.tests.version = testers.testVersion {
package = vcmi;
command = ''
XDG_DATA_HOME="$TMPDIR" XDG_CACHE_HOME="$TMPDIR" XDG_CONFIG_HOME="$TMPDIR" \
vcmiclient --version
'';
};
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/vcmiclient";
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [
"XDG_CACHE_HOME"
"XDG_CONFIG_HOME"
"XDG_DATA_HOME"
];
preVersionCheck = ''
export \
XDG_CACHE_HOME="$TMPDIR" \
XDG_CONFIG_HOME="$TMPDIR" \
XDG_DATA_HOME="$TMPDIR"
'';
meta = {
description = "Open-source engine for Heroes of Might and Magic III";
longDescription = ''
VCMI is an open-source engine for Heroes of Might and Magic III, offering
new and extended possibilities. To use VCMI, you need to own the original
data files.
'';
homepage = "https://vcmi.eu";
changelog = "https://github.com/vcmi/vcmi/blob/${finalAttrs.src.rev}/ChangeLog.md";
changelog = "https://vcmi.eu/ChangeLog";
license = with lib.licenses; [
gpl2Plus
cc-by-sa-40
];
maintainers = with lib.maintainers; [ azahi ];
maintainers = [ lib.maintainers.azahi ];
platforms = lib.platforms.linux;
mainProgram = "vcmilauncher";
};