nixpkgs-suyu/pkgs/games/minetest/default.nix

57 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, irrlicht, libpng, bzip2, curl, libogg, jsoncpp
, libjpeg, libXxf86vm, libGLU_combined, openal, libvorbis, xlibsWrapper, sqlite, luajit
, freetype, gettext, doxygen, ncurses, leveldb
}:
2013-01-04 11:39:11 +01:00
let
2018-01-28 04:07:28 +01:00
version = "0.4.16";
2013-01-04 11:39:11 +01:00
sources = {
src = fetchFromGitHub {
owner = "minetest";
repo = "minetest";
rev = "${version}";
2018-01-28 04:07:28 +01:00
sha256 = "048m8as01bw4pnwfxx04wfnyljxq7ivk88l214zi18prrrkfamj3";
2013-01-04 11:39:11 +01:00
};
data = fetchFromGitHub {
owner = "minetest";
repo = "minetest_game";
rev = "${version}";
2018-01-28 04:07:28 +01:00
sha256 = "0alikzyjvj9hd8s3dd6ghpz0y982w2j0yd2zgd7a047mxw21hrcn";
2013-01-04 11:39:11 +01:00
};
};
in stdenv.mkDerivation {
name = "minetest-${version}";
2013-06-25 09:17:34 +02:00
2013-01-04 11:39:11 +01:00
src = sources.src;
2013-06-25 09:17:34 +02:00
2013-01-04 11:39:11 +01:00
cmakeFlags = [
"-DENABLE_FREETYPE=1"
"-DENABLE_GETTEXT=1"
"-DENABLE_SYSTEM_JSONCPP=1"
2016-04-14 18:35:09 +02:00
"-DGETTEXT_INCLUDE_DIR=${gettext}/include/gettext"
"-DCURL_INCLUDE_DIR=${curl.dev}/include/curl"
2015-05-17 04:58:37 +02:00
"-DIRRLICHT_INCLUDE_DIR=${irrlicht}/include/irrlicht"
2013-01-04 11:39:11 +01:00
];
2013-06-25 09:17:34 +02:00
NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3
2013-01-04 11:39:11 +01:00
buildInputs = [
cmake irrlicht libpng bzip2 libjpeg curl libogg jsoncpp libXxf86vm libGLU_combined
openal libvorbis xlibsWrapper sqlite luajit freetype gettext doxygen ncurses
leveldb
2013-01-04 11:39:11 +01:00
];
2013-06-25 09:17:34 +02:00
2013-01-04 11:39:11 +01:00
postInstall = ''
mkdir -pv $out/share/minetest/games/minetest_game/
cp -rv ${sources.data}/* $out/share/minetest/games/minetest_game/
'';
2013-06-25 09:17:34 +02:00
2015-05-17 04:58:37 +02:00
meta = with stdenv.lib; {
homepage = http://minetest.net/;
description = "Infinite-world block sandbox game";
2015-05-17 04:58:37 +02:00
license = licenses.lgpl21Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ jgeerds c0dehero ];
2013-01-04 11:39:11 +01:00
};
}