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