diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix new file mode 100644 index 000000000000..fd2a2f18f39d --- /dev/null +++ b/pkgs/games/openlierox/default.nix @@ -0,0 +1,56 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.57beta8" a; + buildInputs = with a; [ + libX11 xproto gd SDL SDL_image SDL_mixer zlib libxml2 + pkgconfig + ]; + +in +rec { + src = fetchurl { + url = "http://downloads.sourceforge.net/project/openlierox/openlierox/OpenLieroX%200.57%20Beta8/OpenLieroX_0.57_beta8.src.tar.bz2"; + sha256 = "1a3p03bi5v2mca7323mrckab9wsj83fjfcr6akrh9a6nlljcdn8d"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doInstall"]; + + setParams = a.noDepEntry ('' + export SYSTEM_DATA_DIR="$out/share" + export BIN_DIR="$out/bin" + export DOC_DIR="$out/share/doc" + export PIXMAP_DIR="$out/share/pixmap" + + export HAWKNL_BUILTIN=1 + export LIBZIP_BUILTIN=1 + export X11=1 + export DEBUG=1 + ''); + + doBuild=a.fullDepEntry ('' + sed -re 's/ -1/ 255 /g' -i *.sh + + source functions.sh + export INCLUDE_PATH=$(echo $NIX_CFLAGS_COMPILE | grep_param -I) + + bash compile.sh + '') ["doUnpack" "addInputs" "setParams"]; + + doInstall = a.fullDepEntry ('' + ensureDir $BIN_DIR $SYSTEM_DATA_DIR $DOC_DIR $PIXMAP_DIR + bash install.sh + '') ["doBuild" "addInputs" "setParams" "defEnsureDir"]; + + name = "openlierox-" + version; + meta = { + description = "Real-time game with Worms-like shooting"; + maintainers = [ + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b5311a825880..8c534ea35f5a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3853,6 +3853,12 @@ let inherit fetchurl stdenv openssl cyrus_sasl db4 groff; }; + openlierox = builderDefsPackage ../games/openlierox { + inherit (xlibs) libX11 xproto; + inherit gd SDL SDL_image SDL_mixer zlib libxml2 + pkgconfig; + }; + openssl = import ../development/libraries/openssl { fetchurl = fetchurlBoot; inherit stdenv perl;