From f1711c8fbd3886ba331073b99c93aaa135274d63 Mon Sep 17 00:00:00 2001 From: gnidorah Date: Thu, 24 Aug 2017 09:33:28 +0300 Subject: [PATCH] openjk: init at 2017-08-11 --- pkgs/games/openjk/default.nix | 38 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/games/openjk/default.nix diff --git a/pkgs/games/openjk/default.nix b/pkgs/games/openjk/default.nix new file mode 100644 index 000000000000..dc6d3595416b --- /dev/null +++ b/pkgs/games/openjk/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, makeWrapper, cmake, libjpeg, zlib, libpng, mesa_noglu, SDL2 }: + +stdenv.mkDerivation rec { + name = "OpenJK-2017-08-11"; + + src = fetchFromGitHub { + owner = "JACoders"; + repo = "OpenJK"; + rev = "a0828f06e0181c62e110f2f78d30acb5036b4113"; + sha256 = "1wbb643z2nyhyirzzy3rz03wjqglwmsgnj7w5cl8167f9f9j9w0m"; + }; + + dontAddPrefix = true; + enableParallelBuilding = true; + + nativeBuildInputs = [ makeWrapper cmake ]; + buildInputs = [ libjpeg zlib libpng mesa_noglu SDL2 ]; + + preConfigure = '' + cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$out/opt") + ''; + + postInstall = '' + mkdir -p $out/bin + prefix=$out/opt/JediAcademy + makeWrapper $prefix/openjk.* $out/bin/jamp --run "cd $prefix" + makeWrapper $prefix/openjk_sp.* $out/bin/jasp --run "cd $prefix" + makeWrapper $prefix/openjkded.* $out/bin/openjkded --run "cd $prefix" + ''; + + meta = with stdenv.lib; { + description = "An open-source engine for Star Wars Jedi Academy game"; + homepage = https://github.com/JACoders/OpenJK; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ gnidorah ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8461b882995..6edb8a6ff704 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17388,6 +17388,8 @@ with pkgs; openclonk = callPackage ../games/openclonk { }; + openjk = callPackage ../games/openjk { }; + openmw = callPackage ../games/openmw { }; openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix {