2012-12-25 11:26:53 +01:00
|
|
|
{ stdenv, fetchurl, freeglut, gtk2, gtkglext, libjpeg_turbo, libtheora, libXmu
|
2018-02-24 14:12:44 +01:00
|
|
|
, lua, libGLU_combined, pkgconfig, perl, autoreconfHook, glib, cairo
|
2013-06-18 12:44:07 +02:00
|
|
|
, pango, gdk_pixbuf, atk
|
2012-12-25 11:26:53 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
name = "celestia-1.6.1";
|
|
|
|
|
|
|
|
gcc46Patch = fetchurl {
|
|
|
|
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-gcc46.patch?h=packages/celestia";
|
2013-06-18 11:44:40 +02:00
|
|
|
sha256 = "0my7dpyh5wpz5df7bjhwb4db3ci2rn8ib1nkjv15fbp1g76bxfaz";
|
2012-12-25 11:26:53 +01:00
|
|
|
name = "celestia-1.6.1-gcc46.patch";
|
|
|
|
};
|
|
|
|
|
|
|
|
libpng15Patch = fetchurl {
|
|
|
|
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng15.patch?h=packages/celestia";
|
2013-06-18 11:44:40 +02:00
|
|
|
sha256 = "1jrmbwmvs9b6k2b2g4104q22v4vqi0wfpz6hmfhniaq34626jcms";
|
2012-12-25 11:26:53 +01:00
|
|
|
name = "celestia-1.6.1-libpng15.patch";
|
|
|
|
};
|
|
|
|
|
2013-06-18 11:51:11 +02:00
|
|
|
libpng16Patch = fetchurl {
|
|
|
|
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng16.patch?h=packages/celestia";
|
|
|
|
sha256 = "1q85prw4ci6d50lri8w1jm19pghxw96qizf5dl4g0j86rlhlkc8f";
|
|
|
|
name = "celestia-1.6.1-libpng16.patch";
|
|
|
|
};
|
|
|
|
|
2012-12-25 11:26:53 +01:00
|
|
|
linkingPatch = fetchurl {
|
|
|
|
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-linking.patch?h=packages/celestia";
|
2013-06-18 11:44:40 +02:00
|
|
|
sha256 = "1m8xyq26nm352828bp12c3b8f6m9bys9fwfxbfzqppllk7il2f24";
|
2012-12-25 11:26:53 +01:00
|
|
|
name = "celestia-1.6.1-linking.patch";
|
|
|
|
};
|
|
|
|
|
|
|
|
gcc47Patch = fetchurl {
|
|
|
|
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/gcc-4.7-fixes.diff?h=packages/celestia";
|
2013-06-18 11:44:40 +02:00
|
|
|
sha256 = "1na26c7pv9qfv8a981m1zvglhv05r3h8513xqjra91qhhzx8wr8n";
|
2012-12-25 11:26:53 +01:00
|
|
|
name = "gcc-4.7-fixes.diff";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/celestia/${name}.tar.gz";
|
|
|
|
sha256 = "1i1lvhbgllsh2z8i6jj4mvrjak4a7r69psvk7syw03s4p7670mfk";
|
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-02-24 14:12:44 +01:00
|
|
|
buildInputs = [ freeglut gtk2 gtkglext libjpeg_turbo libtheora libXmu libGLU_combined lua
|
2016-01-18 00:04:40 +01:00
|
|
|
perl autoreconfHook ];
|
2012-12-25 11:26:53 +01:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
patch -Np0 -i "${gcc46Patch}"
|
|
|
|
patch -Np0 -i "${libpng15Patch}"
|
2013-06-18 11:51:11 +02:00
|
|
|
patch -Np2 -i "${libpng16Patch}"
|
2012-12-25 11:26:53 +01:00
|
|
|
patch -Np1 -i "${linkingPatch}"
|
|
|
|
patch -Np1 -i "${gcc47Patch}"
|
|
|
|
'';
|
|
|
|
|
2016-01-18 00:04:40 +01:00
|
|
|
configureFlags = "--with-gtk --with-lua=${lua}";
|
|
|
|
CPPFLAGS = "-DNDEBUG";
|
|
|
|
CFLAGS = "-O2 -fsigned-char";
|
|
|
|
CXXFLAGS = "-O2 -fsigned-char";
|
2016-04-16 18:42:06 +02:00
|
|
|
GTK_CFLAGS = "-I${gtk2.dev}/include/gtk-2.0 -I${gtk2.out}/lib/gtk-2.0/include -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0 -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0 -I${atk.dev}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include";
|
2016-01-18 00:04:40 +01:00
|
|
|
GTK_LIBS = "-lgtk-x11-2.0 -lgtkglext-x11-1.0 -lcairo -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0";
|
|
|
|
|
2014-02-16 18:18:35 +01:00
|
|
|
installPhase = ''make MKDIR_P="mkdir -p" install'';
|
2014-01-05 10:42:55 +01:00
|
|
|
|
2012-12-25 11:26:53 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Free space simulation";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://www.shatters.net/celestia/;
|
2012-12-25 11:26:53 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-05-16 22:30:20 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.peti ];
|
2012-12-25 11:26:53 +01:00
|
|
|
};
|
|
|
|
}
|