2021-02-05 17:12:51 +00:00
|
|
|
{lib, stdenv, fetchurl, fetchpatch, pkg-config, freetype, pango, libpng, libtiff
|
2020-04-24 23:36:52 +00:00
|
|
|
, giflib, libjpeg, netpbm}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xplanet";
|
|
|
|
version = "1.3.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/xplanet/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ freetype pango libpng libtiff giflib libjpeg netpbm ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "giflib6.patch";
|
2021-07-14 22:03:04 +00:00
|
|
|
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/ce6f25eb369dc011161613894f01fd0a6ae85a09/trunk/giflib6.patch";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "173l0xkqq0v2bpaff7hhwc7y2aw5cclqw8988k1nalhyfbrjb8bl";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "xplanet-c++11.patch";
|
2021-07-14 22:03:04 +00:00
|
|
|
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/ce6f25eb369dc011161613894f01fd0a6ae85a09/trunk/xplanet-c++11.patch";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0vldai78ixw49bxch774pps6pq4sp0p33qvkvxywcz7p8kzpg8q2";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Renders an image of the earth or other planets into the X root window";
|
|
|
|
homepage = "http://xplanet.sourceforge.net";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ lassulus sander ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|