openmw: 0.48.0 -> 0.49.0 (#422562)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
boost,
|
||||
libxml2,
|
||||
minizip,
|
||||
readline,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "collada-dom";
|
||||
version = "2.5.1";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Gepetto";
|
||||
repo = "collada-dom";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-DYdqrwRIrVq0BQqZB0vtZzADteJGVaJtFC5kC/cD250=";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/include/*/* $out/include
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
libxml2
|
||||
minizip
|
||||
readline
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "API that provides a C++ object representation of a COLLADA XML instance document";
|
||||
longDescription = "This is a fork of [rdiankov/collada-dom](https://github.com/rdiankov/collada-dom) which has been unmaintained for six years.";
|
||||
homepage = "https://github.com/Gepetto/collada-dom";
|
||||
changelog = "https://github.com/Gepetto/collada-dom/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
sigmasquadron
|
||||
marius851000
|
||||
];
|
||||
platforms = lib.platforms.all;
|
||||
|
||||
# Fails to build.
|
||||
badPlatforms = lib.platforms.darwin;
|
||||
};
|
||||
})
|
||||
@@ -1,20 +0,0 @@
|
||||
diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake
|
||||
index 7e279c986..b33f097c0 100644
|
||||
--- a/CMake/Utils/MyGUIConfigTargets.cmake
|
||||
+++ b/CMake/Utils/MyGUIConfigTargets.cmake
|
||||
@@ -418,15 +418,6 @@ function(mygui_config_lib PROJECTNAME)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
# add GCC visibility flags to shared library build
|
||||
set_target_properties(${PROJECTNAME} PROPERTIES COMPILE_FLAGS "${MYGUI_GCC_VISIBILITY_FLAGS}")
|
||||
- if (APPLE)
|
||||
- # deal with Mac OS X's framework system
|
||||
- set_target_properties(${PROJECTNAME} PROPERTIES FRAMEWORK TRUE)
|
||||
- set_target_properties(${PROJECTNAME} PROPERTIES PUBLIC_HEADER "${${PROJECTNAME}_HEADERS}")
|
||||
- set_target_properties(${PROJECTNAME} PROPERTIES OUTPUT_NAME ${PROJECTNAME})
|
||||
- set_target_properties(${PROJECTNAME} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
- set_target_properties(${PROJECTNAME} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
|
||||
- set_target_properties(${PROJECTNAME} PROPERTIES INSTALL_NAME_DIR "@executable_path/../lib")
|
||||
- endif (APPLE)
|
||||
endif ()
|
||||
endif (MYGUI_STATIC)
|
||||
mygui_install_target(${PROJECTNAME} "")
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
boost,
|
||||
@@ -18,19 +19,26 @@
|
||||
let
|
||||
renderSystem = if withOgre then "3" else "4";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mygui";
|
||||
version = "3.4.2";
|
||||
version = "3.4.3";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MyGUI";
|
||||
repo = "mygui";
|
||||
rev = "MyGUI${version}";
|
||||
hash = "sha256-yBV0ImOFJlqBPqqOjXYe4SFO2liSGZCEwvehED5Ubj4=";
|
||||
tag = "MyGUI${finalAttrs.version}";
|
||||
hash = "sha256-qif9trHgtWpYiDVXY3cjRsXypjjjgStX8tSWCnXhXlk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./disable-framework.patch
|
||||
(fetchpatch {
|
||||
name = "darwin-mygui-framework-fix.patch";
|
||||
url = "https://gitlab.com/OpenMW/openmw-dep/-/raw/ade30e6e98c051ac2a505f6984518f5f41fa87a5/macos/mygui.patch";
|
||||
sha256 = "sha256-Tk+O4TFgPZOqWAY4c0Q69bZfvIB34wN9e7h0tXhLULU=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -57,15 +65,21 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Tools are disabled due to compilation failures.
|
||||
cmakeFlags = [
|
||||
"-DMYGUI_BUILD_TOOLS=OFF"
|
||||
"-DMYGUI_BUILD_DEMOS=OFF"
|
||||
"-DMYGUI_RENDERSYSTEM=${renderSystem}"
|
||||
(lib.cmakeBool "MYGUI_BUILD_DEMOS" false)
|
||||
(lib.cmakeBool "MYGUI_BUILD_TOOLS" false)
|
||||
(lib.cmakeBool "MYGUI_DONT_USE_OBSOLETE" true)
|
||||
(lib.cmakeFeature "MYGUI_RENDERSYSTEM" renderSystem)
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "http://mygui.info/";
|
||||
changelog = "https://github.com/MyGUI/mygui/releases/tag/MyGUI${finalAttrs.version}";
|
||||
description = "Library for creating GUIs for games and 3D applications";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with lib.maintainers; [ sigmasquadron ];
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
|
||||
# error: implicit instantiation of undefined template 'std::char_traits'
|
||||
badPlatforms = lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
fetchpatch,
|
||||
|
||||
SDL2,
|
||||
boost,
|
||||
bullet,
|
||||
cmake,
|
||||
collada-dom,
|
||||
ffmpeg,
|
||||
libXt,
|
||||
lua,
|
||||
luajit,
|
||||
lz4,
|
||||
mygui,
|
||||
openal,
|
||||
openscenegraph,
|
||||
pkg-config,
|
||||
qt6Packages,
|
||||
recastnavigation,
|
||||
unshield,
|
||||
yaml-cpp,
|
||||
|
||||
GLPreference ? "GLVND",
|
||||
}:
|
||||
let
|
||||
inherit (stdenv.hostPlatform) isDarwin isLinux isAarch64;
|
||||
isAarch64Linux = isLinux && isAarch64;
|
||||
in
|
||||
assert lib.assertOneOf "GLPreference" GLPreference [
|
||||
"GLVND"
|
||||
"LEGACY"
|
||||
];
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "openmw";
|
||||
version = "0.49.0";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
osg' = (openscenegraph.override { colladaSupport = true; }).overrideAttrs (oldAttrs: {
|
||||
patches = (oldAttrs.patches or [ ]) ++ [
|
||||
(fetchpatch {
|
||||
# Darwin: Without this patch, OSG won't build osgdb_png.so, which is required by OpenMW.
|
||||
name = "darwin-osg-plugins-fix.patch";
|
||||
url = "https://gitlab.com/OpenMW/openmw-dep/-/raw/1305497c009dc0e7a6a70fe14f0a2f92b96cbcb4/macos/osg.patch";
|
||||
hash = "sha256-G8Y+fnR6FRGxECWrei/Ixch3A3PkRfH6b5q9iawsSCY=";
|
||||
})
|
||||
];
|
||||
cmakeFlags =
|
||||
(oldAttrs.cmakeFlags or [ ])
|
||||
++ [
|
||||
"-Wno-dev"
|
||||
(lib.cmakeFeature "OpenGL_GL_PREFERENCE" GLPreference)
|
||||
(lib.cmakeBool "BUILD_OSG_PLUGINS_BY_DEFAULT" false)
|
||||
(lib.cmakeBool "BUILD_OSG_DEPRECATED_SERIALIZERS" false)
|
||||
]
|
||||
++ (map (plugin: lib.cmakeBool "BUILD_OSG_PLUGIN_${plugin}" true) [
|
||||
"BMP"
|
||||
"DAE"
|
||||
"DDS"
|
||||
"FREETYPE"
|
||||
"JPEG"
|
||||
"OSG"
|
||||
"PNG"
|
||||
"TGA"
|
||||
]);
|
||||
});
|
||||
|
||||
bullet' = bullet.overrideAttrs (oldAttrs: {
|
||||
cmakeFlags = (oldAttrs.cmakeFlags or [ ]) ++ [
|
||||
"-Wno-dev"
|
||||
(lib.cmakeFeature "OpenGL_GL_PREFERENCE" GLPreference)
|
||||
(lib.cmakeBool "USE_DOUBLE_PRECISION" true)
|
||||
(lib.cmakeBool "BULLET2_MULTITHREADING" true)
|
||||
];
|
||||
});
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "OpenMW";
|
||||
repo = "openmw";
|
||||
tag = "openmw-${finalAttrs.version}";
|
||||
hash = "sha256-Eyjn3jPpo0d7XENg0Ea/3MN60lZBSUAMkz1UtTiIP80=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed '1i#include <memory>' -i components/myguiplatform/myguidatamanager.cpp # gcc12
|
||||
''
|
||||
# Don't fix Darwin app bundle
|
||||
+ lib.optionalString isDarwin ''
|
||||
sed -i '/fixup_bundle/d' CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
]
|
||||
++ (with qt6Packages; [
|
||||
wrapQtAppsHook
|
||||
]);
|
||||
|
||||
# If not set, OSG plugin .so files become shell scripts on Darwin.
|
||||
dontWrapQtApps = isDarwin;
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
boost
|
||||
collada-dom
|
||||
ffmpeg
|
||||
libXt
|
||||
(if isAarch64Linux then lua else luajit)
|
||||
lz4
|
||||
mygui
|
||||
openal
|
||||
recastnavigation
|
||||
unshield
|
||||
yaml-cpp
|
||||
]
|
||||
++ (with qt6Packages; [
|
||||
qttools
|
||||
])
|
||||
++ (with finalAttrs; [
|
||||
bullet'
|
||||
osg'
|
||||
]);
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "OpenGL_GL_PREFERENCE" GLPreference)
|
||||
(lib.cmakeBool "USE_LUAJIT" (!isAarch64Linux))
|
||||
(lib.cmakeBool "OPENMW_USE_SYSTEM_RECASTNAVIGATION" true)
|
||||
(lib.cmakeBool "OPENMW_OSX_DEPLOYMENT" isDarwin)
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Unofficial open source engine reimplementation of the game Morrowind";
|
||||
changelog = "https://gitlab.com/OpenMW/openmw/-/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
||||
homepage = "https://openmw.org";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
marius851000
|
||||
sigmasquadron
|
||||
];
|
||||
platforms = with lib.platforms; linux ++ darwin ++ windows;
|
||||
# Nixpkgs' NT infrastructure is currently incapable of building this.
|
||||
badPlatforms = lib.platforms.windows;
|
||||
};
|
||||
})
|
||||
@@ -32,7 +32,7 @@
|
||||
curlSupport ? true,
|
||||
curl,
|
||||
colladaSupport ? false,
|
||||
opencollada,
|
||||
collada-dom,
|
||||
opencascadeSupport ? false,
|
||||
opencascade-occt,
|
||||
ffmpegSupport ? false,
|
||||
@@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional gdalSupport gdal
|
||||
++ lib.optional curlSupport curl
|
||||
++ lib.optionals colladaSupport [
|
||||
opencollada
|
||||
collada-dom
|
||||
pcre
|
||||
]
|
||||
++ lib.optional opencascadeSupport opencascade-occt
|
||||
@@ -115,6 +115,8 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optionals withExamples [ fltk ]
|
||||
++ lib.optional (restSupport || colladaSupport) boost;
|
||||
|
||||
env = lib.optionalAttrs colladaSupport { COLLADA_DIR = collada-dom; };
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "opencascade-api-patch";
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
From 59f8403616e8db6dcf8f3489c44b61524044fe64 Mon Sep 17 00:00:00 2001
|
||||
From: Fernando Rodrigues <alpha@sigmasquadron.net>
|
||||
Date: Thu, 2 Jan 2025 04:28:42 +0000
|
||||
Subject: [PATCH] Function inclusion fixes for GCC 14
|
||||
|
||||
This patch includes <algorithm> in bsa_file.cpp and <list> in
|
||||
charactermanager.hpp to prevent a build failure with GCC 14.
|
||||
|
||||
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
|
||||
---
|
||||
apps/openmw/mwstate/charactermanager.hpp | 1 +
|
||||
components/bsa/bsa_file.cpp | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/apps/openmw/mwstate/charactermanager.hpp b/apps/openmw/mwstate/charactermanager.hpp
|
||||
index 8b3f2b8f8f..fac73b3d44 100644
|
||||
--- a/apps/openmw/mwstate/charactermanager.hpp
|
||||
+++ b/apps/openmw/mwstate/charactermanager.hpp
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include "character.hpp"
|
||||
+#include <list>
|
||||
|
||||
namespace MWState
|
||||
{
|
||||
diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp
|
||||
index 4f795ec0d4..38e97b267b 100644
|
||||
--- a/components/bsa/bsa_file.cpp
|
||||
+++ b/components/bsa/bsa_file.cpp
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <components/files/constrainedfilestream.hpp>
|
||||
|
||||
+#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
--
|
||||
2.47.0
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
wrapQtAppsHook,
|
||||
SDL2,
|
||||
boost,
|
||||
bullet,
|
||||
# Please unpin this on the next OpenMW release.
|
||||
ffmpeg_6,
|
||||
libXt,
|
||||
luajit,
|
||||
lz4,
|
||||
mygui,
|
||||
openal,
|
||||
openscenegraph,
|
||||
recastnavigation,
|
||||
unshield,
|
||||
yaml-cpp,
|
||||
}:
|
||||
|
||||
let
|
||||
GL = "GLVND"; # or "LEGACY";
|
||||
|
||||
osg' = (openscenegraph.override { colladaSupport = true; }).overrideDerivation (old: {
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Darwin: Without this patch, OSG won't build osgdb_png.so, which is required by OpenMW.
|
||||
name = "darwin-osg-plugins-fix.patch";
|
||||
url = "https://gitlab.com/OpenMW/openmw-dep/-/raw/0abe3c9c3858211028d881d7706813d606335f72/macos/osg.patch";
|
||||
sha256 = "sha256-/CLRZofZHot8juH78VG1/qhTHPhy5DoPMN+oH8hC58U=";
|
||||
})
|
||||
];
|
||||
cmakeFlags =
|
||||
(old.cmakeFlags or [ ])
|
||||
++ [
|
||||
"-Wno-dev"
|
||||
"-DOpenGL_GL_PREFERENCE=${GL}"
|
||||
"-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
|
||||
"-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
|
||||
]
|
||||
++ (map (e: "-DBUILD_OSG_PLUGIN_${e}=1") [
|
||||
"BMP"
|
||||
"DAE"
|
||||
"DDS"
|
||||
"FREETYPE"
|
||||
"JPEG"
|
||||
"OSG"
|
||||
"PNG"
|
||||
"TGA"
|
||||
]);
|
||||
});
|
||||
|
||||
bullet' = bullet.overrideDerivation (old: {
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
|
||||
"-Wno-dev"
|
||||
"-DOpenGL_GL_PREFERENCE=${GL}"
|
||||
"-DUSE_DOUBLE_PRECISION=ON"
|
||||
"-DBULLET2_MULTITHREADING=ON"
|
||||
];
|
||||
});
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmw";
|
||||
version = "0.48.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "OpenMW";
|
||||
repo = "openmw";
|
||||
rev = "${pname}-${version}";
|
||||
hash = "sha256-zkjVt3GfQZsFXl2Ht3lCuQtDMYQWxhdFO4aGSb3rsyo=";
|
||||
};
|
||||
|
||||
patches = [ ./0001-function-inclusion-fixes-for-gcc14.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed '1i#include <memory>' -i components/myguiplatform/myguidatamanager.cpp # gcc12
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Don't fix Darwin app bundle
|
||||
sed -i '/fixup_bundle/d' CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
# If not set, OSG plugin .so files become shell scripts on Darwin.
|
||||
dontWrapQtApps = stdenv.hostPlatform.isDarwin;
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
boost
|
||||
bullet'
|
||||
ffmpeg_6
|
||||
libXt
|
||||
luajit
|
||||
lz4
|
||||
mygui
|
||||
openal
|
||||
osg'
|
||||
recastnavigation
|
||||
unshield
|
||||
yaml-cpp
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DOpenGL_GL_PREFERENCE=${GL}"
|
||||
"-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=1"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"-DOPENMW_OSX_DEPLOYMENT=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Unofficial open source engine reimplementation of the game Morrowind";
|
||||
homepage = "https://openmw.org";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [
|
||||
marius851000
|
||||
];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/apps/openmw/mwstate/charactermanager.hpp b/apps/openmw/mwstate/charactermanager.hpp
|
||||
index 2daf734..b77d2a8 100644
|
||||
--- a/apps/openmw/mwstate/charactermanager.hpp
|
||||
+++ b/apps/openmw/mwstate/charactermanager.hpp
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GAME_STATE_CHARACTERMANAGER_H
|
||||
#define GAME_STATE_CHARACTERMANAGER_H
|
||||
|
||||
+#include <list>
|
||||
+
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include "character.hpp"
|
||||
diff --git a/components/vfs/filesystemarchive.cpp b/components/vfs/filesystemarchive.cpp
|
||||
index 6eef4b9..608323e 100644
|
||||
--- a/components/vfs/filesystemarchive.cpp
|
||||
+++ b/components/vfs/filesystemarchive.cpp
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "filesystemarchive.hpp"
|
||||
|
||||
+#include <algorithm>
|
||||
+
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
@@ -1,179 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
openmw,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
luajit,
|
||||
makeWrapper,
|
||||
symlinkJoin,
|
||||
}:
|
||||
|
||||
# revisions are taken from https://github.com/GrimKriegor/TES3MP-deploy
|
||||
|
||||
let
|
||||
# raknet could also be split into dev and lib outputs
|
||||
raknet = stdenv.mkDerivation {
|
||||
pname = "raknet";
|
||||
version = "unstable-2020-01-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TES3MP";
|
||||
repo = "CrabNet";
|
||||
# usually fixed:
|
||||
# https://github.com/GrimKriegor/TES3MP-deploy/blob/d2a4a5d3acb64b16d9b8ca85906780aeea8d311b/tes3mp-deploy.sh#L589
|
||||
rev = "19e66190e83f53bcdcbcd6513238ed2e54878a21";
|
||||
sha256 = "WIaJkSQnoOm9T7GoAwmWl7fNg79coIo/ILUsWcbH+lA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# gcc-13 build fix:
|
||||
# https://github.com/TES3MP/CrabNet/pull/18
|
||||
(fetchpatch {
|
||||
name = "gcc-13.patch";
|
||||
url = "https://github.com/TES3MP/CrabNet/commit/3ec9a338a7cefd5cc751c9d29095cafa4c73be20.patch";
|
||||
hash = "sha256-zE87icjX9GSnApgKQXj0K4IjlrReV/upFLjVgNYkNfM=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCRABNET_ENABLE_DLL=OFF"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm555 lib/libRakNetLibStatic.a $out/lib/libRakNetLibStatic.a
|
||||
'';
|
||||
};
|
||||
|
||||
coreScripts = stdenv.mkDerivation {
|
||||
pname = "corescripts";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TES3MP";
|
||||
repo = "CoreScripts";
|
||||
# usually latest in stable branch (e.g. 0.7.1)
|
||||
rev = "6ae0a2a5d16171de3764817a7f8b1067ecde3def";
|
||||
sha256 = "8j/Sr9IRMNFPEVfFzdb42PckHS3KW7FH7x7rRxIh5gY=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
dir=$out/share/openmw-tes3mp
|
||||
mkdir -p $dir
|
||||
cp -r $src $dir/CoreScripts
|
||||
'';
|
||||
};
|
||||
|
||||
# build an unwrapped version so we don't have to rebuild it all over again in
|
||||
# case the scripts or wrapper scripts change.
|
||||
unwrapped = openmw.overrideAttrs (oldAttrs: rec {
|
||||
pname = "openmw-tes3mp-unwrapped";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TES3MP";
|
||||
repo = "TES3MP";
|
||||
# usually latest in stable branch (e.g. 0.7.1)
|
||||
rev = "68954091c54d0596037c4fb54d2812313b7582a1";
|
||||
sha256 = "8/bV4sw7Q8l8bDTHGQ0t4owf6J6h9q468JFx4KegY5o=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ makeWrapper ];
|
||||
|
||||
buildInputs = oldAttrs.buildInputs ++ [ luajit ];
|
||||
|
||||
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
||||
"-DBUILD_OPENCS=OFF"
|
||||
"-DRakNet_INCLUDES=${raknet.src}/include"
|
||||
"-DRakNet_LIBRARY_RELEASE=${raknet}/lib/libRakNetLibStatic.a"
|
||||
"-DRakNet_LIBRARY_DEBUG=${raknet}/lib/libRakNetLibStatic.a"
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace components/process/processinvoker.cpp \
|
||||
--replace "\"./\"" "\"$out/bin/\""
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# glibc-2.34 support
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.com/OpenMW/openmw/-/commit/98a7d90ee258ceef9c70b0b2955d0458ec46f048.patch";
|
||||
hash = "sha256-RhbIGeE6GyqnipisiMTwWjcFnIiR055hUPL8IkjPgZw=";
|
||||
})
|
||||
|
||||
# gcc-13 build fix:
|
||||
# https://github.com/TES3MP/TES3MP/pull/674
|
||||
(fetchpatch {
|
||||
name = "gcc-13.patch";
|
||||
url = "https://github.com/TES3MP/TES3MP/commit/7921f71a79e96f817a2009100e5105a7948b3fe2.patch";
|
||||
hash = "sha256-mpxuOSPA2xixgBeYXsxutEUI7VJL5PxAeZgaNU7YkJQ=";
|
||||
})
|
||||
|
||||
# https://github.com/TES3MP/openmw-tes3mp/issues/552
|
||||
./tes3mp.patch
|
||||
|
||||
# https://github.com/TES3MP/TES3MP/pull/691
|
||||
./tes3mp-gcc14-fix.patch
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-fpermissive";
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace files/version.in \
|
||||
--subst-var-by OPENMW_VERSION_COMMITHASH ${src.rev}
|
||||
'';
|
||||
|
||||
# move everything that we wrap out of the way
|
||||
postInstall = ''
|
||||
mkdir -p $out/libexec
|
||||
mv $out/bin/tes3mp-* $out/libexec
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multiplayer for TES3:Morrowind based on OpenMW";
|
||||
homepage = "https://tes3mp.com/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
tes3mp-server-run = ''
|
||||
config="''${XDG_CONFIG_HOME:-''$HOME/.config}"/openmw
|
||||
data="''${XDG_DATA_HOME:-''$HOME/.local/share}"/openmw
|
||||
if [[ ! -f "$config"/tes3mp-server.cfg && ! -d "$data"/server ]]; then
|
||||
mkdir -p "$config"
|
||||
echo [Plugins] > "$config"/tes3mp-server.cfg
|
||||
echo "home = $data/server" >> "$config"/tes3mp-server.cfg
|
||||
mkdir -p "$data"
|
||||
cp -r ${coreScripts}/share/openmw-tes3mp/CoreScripts "$data"/server
|
||||
chmod -R u+w "$data"/server
|
||||
fi
|
||||
'';
|
||||
|
||||
in
|
||||
symlinkJoin {
|
||||
name = "openmw-tes3mp-${unwrapped.version}";
|
||||
inherit (unwrapped) version meta;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
paths = [ unwrapped ];
|
||||
|
||||
postBuild = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
makeWrapper ${unwrapped}/libexec/tes3mp-browser $out/bin/tes3mp-browser \
|
||||
--chdir "$out/bin"
|
||||
|
||||
makeWrapper ${unwrapped}/libexec/tes3mp-server $out/bin/tes3mp-server \
|
||||
--run '${tes3mp-server-run}' \
|
||||
--chdir "$out/bin"
|
||||
'';
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/apps/openmw-mp/Script/Types.hpp b/apps/openmw-mp/Script/Types.hpp
|
||||
index be365cfb8..204dcdc7b 100644
|
||||
--- a/apps/openmw-mp/Script/Types.hpp
|
||||
+++ b/apps/openmw-mp/Script/Types.hpp
|
||||
@@ -105,7 +105,7 @@ struct ScriptFunctionPointer : public ScriptIdentity
|
||||
void *addr;
|
||||
#if (!defined(__clang__) && defined(__GNUC__))
|
||||
template<typename R, typename... Types>
|
||||
- constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr((void*)(addr)) {}
|
||||
+ constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}
|
||||
#else
|
||||
template<typename R, typename... Types>
|
||||
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}
|
||||
@@ -633,7 +633,6 @@ mapAliases {
|
||||
code-browser-gtk = throw "'code-browser-gtk' has been removed, as it was broken since 22.11"; # Added 2025-08-22
|
||||
code-browser-gtk2 = throw "'code-browser-gtk2' has been removed, as it was broken since 22.11"; # Added 2025-08-22
|
||||
code-browser-qt = throw "'code-browser-qt' has been removed, as it was broken since 22.11"; # Added 2025-08-22
|
||||
collada-dom = opencollada; # added 2024-02-21
|
||||
collada2gltf = throw "collada2gltf has been removed from Nixpkgs, as it has been unmaintained upstream for 5 years and does not build with supported GCC versions"; # Addd 2025-08-08
|
||||
colloid-kde = throw "'colloid-kde' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20
|
||||
colorpicker = throw "'colorpicker' has been removed due to lack of maintenance upstream. Consider using 'xcolor', 'gcolor3', 'eyedropper' or 'gpick' instead"; # Added 2024-10-19
|
||||
@@ -1829,6 +1828,7 @@ mapAliases {
|
||||
openlens = throw "Lens Closed its source code, package obsolete/stale - consider lens as replacement"; # Added 2024-09-04
|
||||
openlp = throw "openlp has been removed for now because the outdated version depended on insecure and removed packages and it needs help to upgrade and maintain it; see https://github.com/NixOS/nixpkgs/pull/314882"; # Added 2024-07-29
|
||||
openmpt123 = throw "'openmpt123' has been renamed to/replaced by 'libopenmpt'"; # Converted to throw 2024-10-17
|
||||
openmw-tes3mp = throw "'openmw-tes3mp' has been removed due to lack of maintenance upstream"; # Added 2025-08-30
|
||||
opensmtpd-extras = throw "opensmtpd-extras has been removed in favor of separate opensmtpd-table-* packages"; # Added 2025-01-26
|
||||
openssl_3_0 = openssl_3; # Added 2022-06-27
|
||||
opensycl = lib.warnOnInstantiate "'opensycl' has been renamed to 'adaptivecpp'" adaptivecpp; # Added 2024-12-04
|
||||
|
||||
@@ -14052,10 +14052,6 @@ with pkgs;
|
||||
|
||||
openloco = pkgsi686Linux.callPackage ../games/openloco { };
|
||||
|
||||
openmw = libsForQt5.callPackage ../games/openmw { };
|
||||
|
||||
openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix { };
|
||||
|
||||
openraPackages_2019 = import ../games/openra_2019 {
|
||||
inherit lib;
|
||||
pkgs = pkgs.__splicedPackages;
|
||||
|
||||
Reference in New Issue
Block a user