mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
f9fdf2d402
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{ lib, 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 ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
"-I${SDL2.dev}/include/SDL2"
|
|
"-I${opusfile.dev}/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` --chdir "$out/opt/iortcw"
|
|
done
|
|
'';
|
|
|
|
meta = with 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; [ ];
|
|
};
|
|
}
|