iortcw: init at 1.51c
This commit is contained in:
parent
790714af65
commit
61040fa997
3 changed files with 83 additions and 0 deletions
27
pkgs/games/iortcw/default.nix
Normal file
27
pkgs/games/iortcw/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ buildEnv, callPackage, makeWrapper }:
|
||||
|
||||
let
|
||||
sp = callPackage ./sp.nix {};
|
||||
mp = sp.overrideAttrs (oldAttrs: rec {
|
||||
sourceRoot = "source/MP";
|
||||
});
|
||||
in buildEnv {
|
||||
name = "iortcw";
|
||||
|
||||
paths = [ sp mp ];
|
||||
|
||||
pathsToLink = [ "/opt" ];
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
# so we can launch sp from mp game and vice versa
|
||||
postBuild = ''
|
||||
for i in `find -L $out/opt/iortcw -maxdepth 1 -type f -executable`; do
|
||||
makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = sp.meta // {
|
||||
description = "Game engine for Return to Castle Wolfenstein";
|
||||
};
|
||||
}
|
52
pkgs/games/iortcw/sp.nix
Normal file
52
pkgs/games/iortcw/sp.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ stdenv, fetchFromGitHub, opusfile, libogg, SDL2, openal, freetype
|
||||
, libjpeg, curl, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "iortcw-sp";
|
||||
version = "1.51c";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iortcw";
|
||||
repo = "iortcw";
|
||||
rev = version;
|
||||
sha256 = "0g5wgqb1gm34pd05dj2i8nj3qhsz0831p3m7bsgxpjcg9c00jpyw";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
sourceRoot = "source/SP";
|
||||
|
||||
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 ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-I${SDL2.dev}/include/SDL2"
|
||||
"-I${opusfile}/include/opus"
|
||||
];
|
||||
NIX_CFLAGS_LINK = [ "-lSDL2" ];
|
||||
|
||||
postInstall = ''
|
||||
for i in `find $out/opt/iortcw -maxdepth 1 -type f -executable`; do
|
||||
makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Single player version of game engine for Return to Castle Wolfenstein";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ gnidorah ];
|
||||
};
|
||||
}
|
|
@ -25224,6 +25224,10 @@ in
|
|||
|
||||
instead-launcher = callPackage ../games/instead-launcher { };
|
||||
|
||||
iortcw = callPackage ../games/iortcw { };
|
||||
# used as base package for iortcw forks
|
||||
iortcw_sp = callPackage ../games/iortcw/sp.nix { };
|
||||
|
||||
ivan = callPackage ../games/ivan { };
|
||||
|
||||
ja2-stracciatella = callPackage ../games/ja2-stracciatella { };
|
||||
|
|
Loading…
Reference in a new issue