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