nixpkgs/pkgs
Daniel Perry fb9bcc72fd openmw: add darwin support
The OpenMW codebase already has Darwin build support within it, so porting
it over to nixpkgs was something I wanted to try out.

Issues encountered, in order:

A few dependencies in nixpkgs were missing Darwin support. Details of those
changes are in their respective commits.

After the dependencies were building, the build first failed with a missing
reference to VideoDecodeAcceleration, which was easily dealt with.

Then the build succeeded! Job's done, success! Except OpenMW.app was nowhere
to be found in the result folder. OpenMW-CS.app, however, was produced and
appeared to be running correctly (though I will admit I didn't test it very
much as I'm not very familiar).

Going through OpenMW's CMakeLists.txt showed that a CMake define was needed,
`OPENMW_OSX_DEPLOYMENT=ON`. This is what enables OpenMW.app to be built.

Once the define was added, the build began to fail with missing plugins to
OpenSceneGraph. Looking into that showed that OSG doesn't build certain plugins
on Darwin due to the fact that their functionality is replicated by built-
in system libraries. To save space, these libraries are not built on Darwin.

OpenMW, however, requires these libraries to exist. I was familiar with the
process of building OpenMW on Darwin already, due to having built it locally
ahead of time, so I remembered that the OpenMW folks have a separate repository
with Mac-specific patches. One of those patches is to OpenSceneGraph for this
exact issue, which is now applied here.

The next error was caused by `fixup_bundle` running from the OpenMW CMakeLists.txt,
which appears to be broken in Darwin under Nix. Searching nixpkgs shows that others
have worked around the issue by removing the call to `fixup_bundle` completely.

At this point, the build passed and OpenMW.app was created and was executable!
After the intro video played, it was clear that something wasn't working though.
Every texture was completely pink, navigating the main menu was impossible. Looking
at the console output showed that OpenSceneGraph was attempting to load dds
textures, but the plugin for doing so could not be loaded. I looked at the plugin
with `file` which showed the file was actually a bash script. It was setting
some QT environment variables before calling the real plugin executable. I
resolved this issue with setting `dontWrapQtApps`, as everything seems to work
without it (even the QT-based apps like the Construction Set).
2023-03-12 18:48:50 -04:00
..
applications Merge pull request #220575 from r-ryantm/auto-update/dunst 2023-03-12 02:22:22 +04:00
build-support fetchpatch: add decode test 2023-03-11 21:39:29 +00:00
common-updater
data Merge pull request #220132 from r-ryantm/auto-update/charis-sil 2023-03-11 19:45:14 +02:00
desktops
development recastnavigation: fix for darwin build break 2023-03-11 19:03:33 -05:00
games openmw: add darwin support 2023-03-12 18:48:50 -04:00
misc cups-filters: fix build with qpdf >= 11.3.0 2023-03-11 10:23:11 +03:00
os-specific Merge pull request #220653 from yu-re-ka/alpine-git-revisions 2023-03-11 21:07:25 +02:00
pkgs-lib
servers Merge pull request #218126 from mweinelt/kea-dhcp-ddns-test 2023-03-11 22:58:53 +00:00
shells fishPlugins.autopair: add figsoda as a maintainer 2023-03-10 13:11:08 -05:00
stdenv Merge pull request #188334 from amjoseph-nixpkgs/pr/bootstrapFiles/mips64n32 2023-03-09 21:21:15 -05:00
test texlive: add test for lualatex fonts 2023-03-08 23:37:01 +01:00
tools unshield: add darwin to platforms 2023-03-11 19:07:34 -05:00
top-level openmw: add darwin support 2023-03-12 18:48:50 -04:00