2015-05-17 04:58:37 +02:00
|
|
|
{ stdenv, fetchgit, cmake, irrlicht, libpng, bzip2, curl, libogg, jsoncpp
|
2015-05-31 18:36:56 +02:00
|
|
|
, libjpeg, libXxf86vm, mesa, openal, libvorbis, x11, sqlite, luajit, freetype
|
|
|
|
, gettext
|
|
|
|
}:
|
2013-01-04 11:39:11 +01:00
|
|
|
|
|
|
|
let
|
2015-05-17 04:58:37 +02:00
|
|
|
version = "0.4.12";
|
2013-01-04 11:39:11 +01:00
|
|
|
sources = {
|
|
|
|
src = fetchgit {
|
2015-05-17 04:58:37 +02:00
|
|
|
url = "https://github.com/minetest/minetest.git";
|
|
|
|
rev = "7993a403f2c17a215e4895ba1848aaf69bb61980";
|
|
|
|
sha256 = "04v6fd9r9by8g47xbjzkhkgac5zpik01idngbbx2in4fxrg3ac7c";
|
2013-01-04 11:39:11 +01:00
|
|
|
};
|
|
|
|
data = fetchgit {
|
2015-05-17 04:58:37 +02:00
|
|
|
url = "https://github.com/minetest/minetest_game.git";
|
|
|
|
rev = "03c00a831d5c2fd37096449bee49557879068af1";
|
|
|
|
sha256 = "1qqhlfz296rmi3mmlvq1rwv7hq5w964w1scry095xaih7y11ycmk";
|
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 = [
|
2015-05-31 18:36:56 +02:00
|
|
|
"-DENABLE_FREETYPE=1"
|
|
|
|
"-DENABLE_GETTEXT=1"
|
|
|
|
"-DCURL_INCLUDE_DIR=${curl}/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
|
|
|
|
2013-01-04 11:39:11 +01:00
|
|
|
buildInputs = [
|
2015-05-31 18:36:56 +02:00
|
|
|
cmake irrlicht libpng bzip2 libjpeg curl libogg jsoncpp libXxf86vm mesa
|
|
|
|
openal libvorbis x11 sqlite luajit freetype gettext
|
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/;
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Infinite-world block sandbox game";
|
2015-05-17 04:58:37 +02:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
2015-05-17 22:47:36 +02:00
|
|
|
maintainers = with maintainers; [ jgeerds c0dehero ];
|
2013-01-04 11:39:11 +01:00
|
|
|
};
|
|
|
|
}
|