2021-01-15 04:31:39 +00:00
|
|
|
{ lib, stdenv, fetchurl, libGLU, libGL, SDL, SDL_mixer, SDL_image, SDL_ttf }:
|
2010-08-24 20:36:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
# pf5234 (a developer?) at freenode #egoboo told me that I better use 2.7.3 until
|
|
|
|
# they fix more, because it even has at least one bugs less than 2.7.4.
|
|
|
|
# 2.8.0 does not start properly on linux
|
|
|
|
# They just starting making that 2.8.0 work on linux.
|
2021-08-12 21:28:38 +01:00
|
|
|
pname = "egoboo";
|
|
|
|
version = "2.7.3";
|
2010-08-24 20:36:42 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 21:28:38 +01:00
|
|
|
url = "mirror://sourceforge/egoboo/egoboo-${version}.tar.gz";
|
2010-08-24 20:36:42 +01:00
|
|
|
sha256 = "18cjgp9kakrsa90jcb4cl8hhh9k57mi5d1sy5ijjpd3p7zl647hd";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd source
|
|
|
|
make -C enet all
|
|
|
|
# The target 'all' has trouble
|
|
|
|
make -C game -f Makefile.unix egoboo
|
|
|
|
'';
|
|
|
|
|
|
|
|
# The user will need to have all the files in '.' to run egoboo, with
|
|
|
|
# writeable controls.txt and setup.txt
|
|
|
|
installPhase = ''
|
2021-08-12 21:28:38 +01:00
|
|
|
mkdir -p $out/share/egoboo-${version}
|
|
|
|
cp -v game/egoboo $out/share/egoboo-${version}
|
2010-08-24 20:36:42 +01:00
|
|
|
cd ..
|
2021-08-12 21:28:38 +01:00
|
|
|
cp -v -Rd controls.txt setup.txt players modules basicdat $out/share/egoboo-${version}
|
2010-08-24 20:36:42 +01:00
|
|
|
'';
|
|
|
|
|
2019-11-10 16:44:34 +00:00
|
|
|
buildInputs = [ libGLU libGL SDL SDL_mixer SDL_image SDL_ttf ];
|
2010-08-24 20:36:42 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
This big commented thing may be needed for versions 2.8.0 or beyond
|
|
|
|
I keep it here for future updates.
|
|
|
|
|
|
|
|
# Some files have to go to $HOME, but we put them in the 'shared'.
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's,''${HOME}/.''${PROJ_NAME},''${PREFIX}/share/games/''${PROJ_NAME},g' Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlags=PREFIX=$out
|
|
|
|
'';
|
|
|
|
*/
|
|
|
|
|
2022-05-14 09:54:30 +01:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: mad.o:(.bss+0x233800): multiple definition of `tile_dict'; camera.o:(.bss+0x140): first defined here
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-05-14 09:54:30 +01:00
|
|
|
|
2019-10-30 01:29:30 +00:00
|
|
|
NIX_LDFLAGS = "-lm";
|
2019-01-04 19:33:50 +00:00
|
|
|
|
2010-08-24 20:36:42 +01:00
|
|
|
meta = {
|
|
|
|
description = "3D dungeon crawling adventure";
|
|
|
|
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://egoboo.sourceforge.net/";
|
2021-01-15 04:31:39 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2010-08-24 20:36:42 +01:00
|
|
|
|
|
|
|
# I take it out of hydra as it does not work as well as I'd like
|
2022-06-23 01:10:30 +01:00
|
|
|
# maintainers = [ ];
|
2021-01-15 04:31:39 +00:00
|
|
|
# platforms = lib.platforms.all;
|
2010-08-24 20:36:42 +01:00
|
|
|
};
|
|
|
|
}
|