Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions pkgs/by-name/co/collada-dom/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
libxml2,
minizip,
readline,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "collada-dom";
version = "2.5.1";

__structuredAttrs = true;
Comment thread
SigmaSquadron marked this conversation as resolved.
Outdated
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
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
];
nim65s
];

Since I maintain that fork, it would be better for me to get the right notifications about issues :)

platforms = lib.platforms.all;

# Fails to build.
badPlatforms = lib.platforms.darwin;
};
})
20 changes: 0 additions & 20 deletions pkgs/by-name/my/mygui/disable-framework.patch

This file was deleted.

38 changes: 26 additions & 12 deletions pkgs/by-name/my/mygui/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
boost,
Expand All @@ -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 = [
Expand All @@ -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;
};
}
})
149 changes: 149 additions & 0 deletions pkgs/by-name/op/openmw/package.nix
Original file line number Diff line number Diff line change
@@ -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;
};
})
6 changes: 4 additions & 2 deletions pkgs/by-name/op/openscenegraph/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
curlSupport ? true,
curl,
colladaSupport ? false,
opencollada,
collada-dom,
opencascadeSupport ? false,
opencascade-occt,
ffmpegSupport ? false,
Expand Down Expand Up @@ -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
Expand All @@ -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";
Expand Down
41 changes: 0 additions & 41 deletions pkgs/games/openmw/0001-function-inclusion-fixes-for-gcc14.patch

This file was deleted.

Loading
Loading