2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, opusfile, libogg, SDL2, openal, freetype
|
2020-11-03 02:18:15 +00:00
|
|
|
, libjpeg, curl, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "iortcw-sp";
|
|
|
|
version = "1.51c";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iortcw";
|
|
|
|
repo = "iortcw";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0g5wgqb1gm34pd05dj2i8nj3qhsz0831p3m7bsgxpjcg9c00jpyw";
|
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/SP";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"USE_INTERNAL_LIBS=0"
|
|
|
|
"COPYDIR=${placeholder "out"}/opt/iortcw"
|
|
|
|
"USE_OPENAL_DLOPEN=0"
|
|
|
|
"USE_CURL_DLOPEN=0"
|
|
|
|
];
|
|
|
|
|
|
|
|
installTargets = [ "copyfiles" ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
opusfile libogg SDL2 freetype libjpeg openal curl
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2020-11-03 02:18:15 +00:00
|
|
|
"-I${SDL2.dev}/include/SDL2"
|
2022-10-21 18:38:19 +00:00
|
|
|
"-I${opusfile.dev}/include/opus"
|
2020-11-03 02:18:15 +00:00
|
|
|
];
|
|
|
|
NIX_CFLAGS_LINK = [ "-lSDL2" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in `find $out/opt/iortcw -maxdepth 1 -type f -executable`; do
|
2022-04-27 09:35:20 +00:00
|
|
|
makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw"
|
2020-11-03 02:18:15 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "Single player version of game engine for Return to Castle Wolfenstein";
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2024-01-13 08:15:51 +00:00
|
|
|
maintainers = with maintainers; [ rjpcasalino ];
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
}
|