uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchurl, jre, makeWrapper, unzip }:
stdenv.mkDerivation rec {
pname = "astrolabe-generator";
version = "3.3";
src = fetchurl {
url = "https://github.com/wymarc/astrolabe-generator/releases/download/v${version}/AstrolabeGenerator-${version}.zip";
sha256 = "141gfmrqa1mf2qas87qig4phym9fg9gbrcfl2idzd5gi91824dn9";
};
buildInputs = [ jre ];
nativeBuildInputs = [ makeWrapper unzip ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/{bin,share/java}
cp AstrolabeGenerator-${version}.jar $out/share/java
makeWrapper ${jre}/bin/java $out/bin/AstrolabeGenerator \
--add-flags "-jar $out/share/java/AstrolabeGenerator-${version}.jar"
'';
meta = with lib;{
homepage = "https://www.astrolabeproject.com";
description = "A Java-based tool for generating EPS files for constructing astrolabes and related tools";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl3;
maintainers = [ ];
mainProgram = "AstrolabeGenerator";
platforms = platforms.all;
};
}

View file

@ -0,0 +1,64 @@
{ lib, stdenv, fetchzip, fetchurl, xorg
, withBigAtlas ? true
, withEphemeris ? true
, withMoonsEphemeris ? true
}:
stdenv.mkDerivation rec {
pname = "astrolog";
version = "7.30";
src = fetchzip {
url = "http://www.astrolog.org/ftp/ast73src.zip";
sha256 = "0nry4gxwy5aa99zzr8dlb6babpachsc3jjyk0vw82c7x3clbhl7l";
stripRoot = false;
};
patchPhase = ''
sed -i "s:~/astrolog:$out/astrolog:g" astrolog.h
substituteInPlace Makefile --replace cc "$CC" --replace strip "$STRIP"
'';
buildInputs = [ xorg.libX11 ];
NIX_CFLAGS_COMPILE = "-Wno-format-security";
installPhase =
let
ephemeris = fetchzip {
url = "http://astrolog.org/ftp/ephem/astephem.zip";
sha256 = "1mwvpvfk3lxjcc79zvwl4ypqzgqzipnc01cjldxrmx56xkc35zn7";
stripRoot = false;
};
moonsEphemeris = fetchzip {
url = "https://www.astrolog.org/ftp/ephem/moons/sepm.zip";
sha256 = "0labcidm8mrwvww93nwpp5738m9ff9q48cqzbgd18xny1jf6f8xd";
stripRoot = false;
};
atlas = fetchurl {
url = "http://astrolog.org/ftp/atlas/atlasbig.as";
sha256 = "001bmqyldsbk4bdliqfl4a9ydrh1ff13wccvfniwaxlmvkridx2q";
};
in ''
mkdir -p $out/bin $out/astrolog
cp *.as $out/astrolog
install astrolog $out/bin
${lib.optionalString withBigAtlas "cp ${atlas} $out/astrolog/atlas.as"}
${lib.optionalString withEphemeris ''
sed -i "/-Yi1/s#\".*\"#\"$out/ephemeris\"#" $out/astrolog/astrolog.as
mkdir -p $out/ephemeris
cp -r ${ephemeris}/*.se1 $out/ephemeris
''}
${lib.optionalString withMoonsEphemeris ''
sed -i "/-Yi1/s#\".*\"#\"$out/ephemeris\"#" $out/astrolog/astrolog.as
mkdir -p $out/ephemeris
cp -r ${moonsEphemeris}/*.se1 $out/ephemeris
''}
'';
meta = with lib; {
maintainers = [ maintainers.kmein ];
homepage = "https://astrolog.org/astrolog.htm";
description = "Freeware astrology program";
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
}

View file

@ -0,0 +1,37 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, freeglut, gtk2, gtkglext
, libjpeg_turbo, libtheora, libXmu, lua, libGLU, libGL, perl, autoreconfHook
}:
stdenv.mkDerivation rec {
pname = "celestia";
version = "1.6.2.2";
src = fetchFromGitHub {
owner = "CelestiaProject";
repo = "Celestia";
rev = version;
sha256 = "1s9fgxh6i3x1sy75y5wcidi2mjrf5xj71dd4n6rg0hkps441sgsp";
};
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [
freeglut gtk2 gtkglext lua perl
libjpeg_turbo libtheora libXmu libGLU libGL
];
configureFlags = [
"--with-gtk"
"--with-lua=${lua}"
];
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://celestia.space/";
description = "Real-time 3D simulation of space";
changelog = "https://github.com/CelestiaProject/Celestia/releases/tag/${version}";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ hjones2199 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
diff -ruN gildas-src-jul18a/admin/define-system.sh gildas-src-jul18a.aarch64/admin/define-system.sh
--- gildas-src-jul18a/admin/define-system.sh 2018-06-12 15:22:32.000000000 +0200
+++ gildas-src-jul18a.aarch64/admin/define-system.sh 2018-07-21 13:05:52.000000000 +0200
@@ -174,7 +174,7 @@
DEFAULT_CONFIG= # Default config is empty
case `uname` in
Linux)
- if [ `uname -m | grep -c "x86_64"` -ne 0 ]; then
+ if [ `uname -m | grep -c "64"` -ne 0 ]; then
GAG_MACHINE=x86_64
else
GAG_MACHINE=pc

View file

@ -0,0 +1,22 @@
diff -ruN gildas-src-jun18a/admin/define-system.sh gildas-src-jun18a.clang/admin/define-system.sh
--- gildas-src-jun18a/admin/define-system.sh 2018-03-12 11:07:57.000000000 +0100
+++ gildas-src-jun18a.clang/admin/define-system.sh 2018-06-12 14:56:14.000000000 +0200
@@ -218,13 +218,13 @@
else
GAG_MACHINE=pc
fi
- if which gcc > /dev/null 2>&1; then
- DEFAULT_CCOMPILER=gcc
+ if which clang > /dev/null 2>&1; then
+ DEFAULT_CCOMPILER=clang
fi
- if which g++ > /dev/null 2>&1; then
- DEFAULT_CXXCOMPILER=g++
- elif which clang++ > /dev/null 2>&1; then
+ if which clang++ > /dev/null 2>&1; then
DEFAULT_CXXCOMPILER=clang++
+ elif which g++ > /dev/null 2>&1; then
+ DEFAULT_CXXCOMPILER=g++
fi
if which ifort > /dev/null 2>&1; then
DEFAULT_FCOMPILER=ifort

View file

@ -0,0 +1,71 @@
{ lib, stdenv, fetchurl, gtk2-x11 , pkg-config , python3 , gfortran , lesstif
, cfitsio , getopt , perl , groff , which, darwin, ncurses
}:
let
python3Env = python3.withPackages(ps: with ps; [ numpy ]);
in
stdenv.mkDerivation rec {
srcVersion = "nov21a";
version = "20211101_a";
pname = "gildas";
src = fetchurl {
# For each new release, the upstream developers of Gildas move the
# source code of the previous release to a different directory
urls = [ "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.xz"
"http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.xz" ];
sha256 = "0fb6iqwh4hm7v7sib7sx98vxdavn3d6q2gq6y6vxg2z29g31f8g2";
};
nativeBuildInputs = [ pkg-config groff perl getopt gfortran which ];
buildInputs = [ gtk2-x11 lesstif cfitsio python3Env ncurses ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation ]);
patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ];
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks");
configurePhase=''
substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out
substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python3Env}
substituteInPlace utilities/main/gag-makedepend.pl --replace '/usr/bin/perl' ${perl}/bin/perl
source admin/gildas-env.sh -c gfortran -o openmp
echo "gag_doc: $out/share/doc/" >> kernel/etc/gag.dico.lcl
'';
postInstall=''
mkdir -p $out/bin
cp -a ../gildas-exe-${srcVersion}/* $out
mv $out/$GAG_EXEC_SYSTEM $out/libexec
cp admin/wrapper.sh $out/bin/gildas-wrapper.sh
chmod 755 $out/bin/gildas-wrapper.sh
for i in $out/libexec/bin/* ; do
ln -s $out/bin/gildas-wrapper.sh $out/bin/$(basename "$i")
done
'';
meta = {
broken = stdenv.isDarwin;
description = "Radioastronomy data analysis software";
longDescription = ''
GILDAS is a collection of state-of-the-art software
oriented toward (sub-)millimeter radioastronomical
applications (either single-dish or interferometer).
It is daily used to reduce all data acquired with the
IRAM 30M telescope and Plateau de Bure Interferometer
PDBI (except VLBI observations). GILDAS is easily
extensible. GILDAS is written in Fortran-90, with a
few parts in C/C++ (mainly keyboard interaction,
plotting, widgets).'';
homepage = "http://www.iram.fr/IRAMFR/GILDAS/gildas.html";
license = lib.licenses.free;
maintainers = [ lib.maintainers.bzizou lib.maintainers.smaret ];
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,20 @@
diff --new-file -r -u gildas-src-feb17d.orig/admin/wrapper.sh gildas-src-feb17d/admin/wrapper.sh
--- gildas-src-feb17d.orig/admin/wrapper.sh 1970-01-01 01:00:00.000000000 +0100
+++ gildas-src-feb17d/admin/wrapper.sh 2017-05-18 21:00:01.660778782 +0200
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+export GAG_ROOT_DIR="%%OUT%%"
+export GAG_PATH="${GAG_ROOT_DIR}/etc"
+export GAG_EXEC_SYSTEM="libexec"
+export GAG_GAG="${HOME}/.gag"
+export PYTHONHOME="%%PYTHONHOME%%"
+if [ -z "\$PYTHONPATH" ]; then
+ PYTHONPATH="${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/python"
+else
+ PYTHONPATH="${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/python:${PYTHONPATH}"
+fi
+export PYTHONPATH
+export LD_LIBRARY_PATH=${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/lib/
+me=`basename $0`
+exec ${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/bin/${me} ${*}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchurl, libtool
, cfitsio, curl, ghostscript, gsl, libgit2, libjpeg, libtiff, lzlib, wcslib }:
stdenv.mkDerivation rec {
pname = "gnuastro";
version = "0.17";
src = fetchurl {
url = "mirror://gnu/gnuastro/gnuastro-${version}.tar.gz";
sha256 = "sha256-xBvtM8wkDOqXg/Q2dNfPR0R0ZgRm4QiPJZoLDKivaPU=";
};
nativeBuildInputs = [ libtool ];
buildInputs = [
cfitsio
curl
ghostscript
gsl
libgit2
libjpeg
libtiff
lzlib
wcslib
];
enableParallelBuilding = true;
meta = with lib; {
description = "GNU astronomy utilities and library";
homepage = "https://www.gnu.org/software/gnuastro/";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ sikmir ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl, pkg-config, intltool
, gtk3, glib, curl, goocanvas2, gpsd
, hamlib, wrapGAppsHook
}:
let
version = "2.2.1";
in stdenv.mkDerivation {
pname = "gpredict";
inherit version;
src = fetchurl {
url = "https://github.com/csete/gpredict/releases/download/v${version}/gpredict-${version}.tar.bz2";
sha256 = "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7";
};
nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ];
buildInputs = [ curl glib gtk3 goocanvas2 gpsd hamlib ];
meta = with lib; {
description = "Real time satellite tracking and orbit prediction";
longDescription = ''
Gpredict is a real time satellite tracking and orbit prediction program
written using the GTK widgets. Gpredict is targetted mainly towards ham radio
operators but others interested in satellite tracking may find it useful as
well. Gpredict uses the SGP4/SDP4 algorithms, which are compatible with the
NORAD Keplerian elements.
'';
license = licenses.gpl2Only;
platforms = platforms.linux;
homepage = "http://gpredict.oz9aec.net/";
maintainers = [ maintainers.markuskowa maintainers.cmcdragonkai ];
};
}

View file

@ -0,0 +1,52 @@
{ stdenvNoCC
, lib
, fetchzip
, jre
, makeDesktopItem
, copyDesktopItems
, makeWrapper
, extraJavaArgs ? "-Xms512M -Xmx2000M"
}:
stdenvNoCC.mkDerivation rec {
pname = "gprojector";
version = "3.0.3";
src = fetchzip {
url = "https://www.giss.nasa.gov/tools/gprojector/download/G.ProjectorJ-${version}.tgz";
sha256 = "sha256-60UT6z5aQ3Tk4EujEUp4ntB5GakFVhJzk5eytoIwf78=";
};
desktopItems = [ (makeDesktopItem {
name = "gprojector";
exec = "gprojector";
desktopName = "G.Projector";
comment = meta.description;
categories = [ "Science" ];
startupWMClass = "gov-nasa-giss-projector-GProjector";
}) ];
buildInputs = [ jre ];
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
dontConfigure = true;
dontBuild = true;
dontFixup = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r $src/jars $out/share/java
makeWrapper ${jre}/bin/java $out/bin/gprojector --add-flags "-jar $out/share/java/G.Projector.jar" --add-flags "${extraJavaArgs}"
runHook postInstall
'';
meta = {
description = "G.Projector transforms an input map image into any of about 200 global and regional map projections";
homepage = "https://www.giss.nasa.gov/tools/gprojector/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with lib.maintainers; [ alyaeanyx ];
license = lib.licenses.unfree;
inherit (jre.meta) platforms;
};
}

View file

@ -0,0 +1,56 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, SDL, SDL_ttf, SDL_image, libSM, libICE, libGLU, libGL, libpng, lua5, autoconf, automake }:
stdenv.mkDerivation rec {
pname = "gravit";
version = "0.5.1";
src = fetchFromGitHub {
owner = "gak";
repo = pname;
rev = version;
hash = "sha256-JuqnLLD5+Ec8kQI0SK98V1O6TTbGM6+yKn5KCHe85eM=";
};
patches = [
# Pull fix pending upstream inclusion for -fno-common toolchains:
# https://github.com/gak/gravit/pull/100
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/gak/gravit/commit/0f848834889212f16201fd404d2d5b9bb5b47d23.patch";
hash = "sha256-k1aMIg7idMt53o6dFgIKJflOMp0Jp5NwgWEijcIwXrQ=";
})
];
buildInputs = [ libGLU libGL SDL SDL_ttf SDL_image lua5 libpng libSM libICE ];
nativeBuildInputs = [ autoconf automake ];
preConfigure = ''
./autogen.sh
# Build fails on Linux with windres.
export ac_cv_prog_WINDRES=
'';
enableParallelBuilding = true;
meta = {
broken = (stdenv.isLinux && stdenv.isAarch64);
homepage = "https://github.com/gak/gravit";
description = "Beautiful OpenGL-based gravity simulator";
license = lib.licenses.gpl2Plus;
longDescription = ''
Gravit is a gravity simulator which runs under Linux, Windows and
macOS. It uses Newtonian physics using the Barnes-Hut N-body
algorithm. Although the main goal of Gravit is to be as accurate
as possible, it also creates beautiful looking gravity patterns.
It records the history of each particle so it can animate and
display a path of its travels. At any stage you can rotate your
view in 3D and zoom in and out.
'';
platforms = lib.platforms.mesaPlatforms;
hydraPlatforms = lib.platforms.linux; # darwin times out
};
}

View file

@ -0,0 +1,53 @@
{
lib, mkDerivation, extra-cmake-modules, fetchurl,
kconfig, kdoctools, kguiaddons, ki18n, kinit, kiconthemes, kio,
knewstuff, kplotting, kwidgetsaddons, kxmlgui, knotifyconfig,
qtx11extras, qtwebsockets, qtkeychain, libsecret,
eigen, zlib,
cfitsio, indi-full, xplanet, libnova, libraw, gsl, wcslib, stellarsolver
}:
mkDerivation rec {
pname = "kstars";
version = "3.5.8";
src = fetchurl {
url = "mirror://kde/stable/kstars/kstars-${version}.tar.xz";
sha256 = "sha256-Zg2QKDe3q/OBDW4k9y/YTwREopvX1D4YlrGf7OHIjD8=";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kconfig kdoctools kguiaddons ki18n kinit kiconthemes kio
knewstuff kplotting kwidgetsaddons kxmlgui knotifyconfig
qtx11extras qtwebsockets qtkeychain libsecret
eigen zlib
cfitsio indi-full xplanet libnova libraw gsl wcslib stellarsolver
];
cmakeFlags = [
"-DINDI_PREFIX=${indi-full}"
"-DXPLANET_PREFIX=${xplanet}"
];
meta = with lib; {
description = "Virtual planetarium astronomy software";
homepage = "https://kde.org/applications/education/org.kde.kstars";
longDescription = ''
It provides an accurate graphical simulation of the night sky, from any location on Earth, at any date and time.
The display includes up to 100 million stars, 13.000 deep-sky objects, all 8 planets, the Sun and Moon, and thousands of comets, asteroids, supernovae, and satellites.
For students and teachers, it supports adjustable simulation speeds in order to view phenomena that happen over long timescales, the KStars Astrocalculator to predict conjunctions, and many common astronomical calculations.
'';
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ timput hjones2199 ];
};
}

View file

@ -0,0 +1,48 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, gtk3, wxGTK30-gtk3
, curl, gettext, glib, indi-full, libnova, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "phd2";
version = "2.6.11";
src = fetchFromGitHub {
owner = "OpenPHDGuiding";
repo = "phd2";
rev = "v${version}";
sha256 = "sha256-iautgHOVzdLWYGOVu3wHBDt30uCbaP58mDz/l7buB1k=";
};
nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook
];
buildInputs = [
gtk3
wxGTK30-gtk3
curl
gettext
glib
indi-full
libnova
];
cmakeFlags = [
"-DOPENSOURCE_ONLY=1"
];
# Fix broken wrapped name scheme by moving wrapped binary to where wrapper expects it
postFixup = ''
mv $out/bin/.phd2.bin-wrapped $out/bin/.phd2-wrapped.bin
'';
meta = with lib; {
homepage = "https://openphdguiding.org/";
description = "Telescope auto-guidance application";
changelog = "https://github.com/OpenPHDGuiding/phd2/releases/tag/v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ hjones2199 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,46 @@
{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja
, git, criterion, gtk3, libconfig, gnuplot, opencv, json-glib
, fftwFloat, cfitsio, gsl, exiv2, librtprocess, wcslib, ffmpeg
, libraw, libtiff, libpng, libjpeg, libheif, ffms, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "siril";
version = "1.0.0";
src = fetchFromGitLab {
owner = "free-astro";
repo = pname;
rev = version;
sha256 = "sha256-yqWFEa1fnSwl0ecN9hMI13QCfj0f69CFqTJlEAhTpJI=";
};
nativeBuildInputs = [
meson ninja pkg-config git criterion wrapGAppsHook
];
buildInputs = [
gtk3 cfitsio gsl exiv2 gnuplot opencv fftwFloat librtprocess wcslib
libconfig libraw libtiff libpng libjpeg libheif ffms ffmpeg json-glib
];
# Necessary because project uses default build dir for flatpaks/snaps
dontUseMesonConfigure = true;
configureScript = ''
${meson}/bin/meson --buildtype release nixbld .
'';
postConfigure = ''
cd nixbld
'';
meta = with lib; {
homepage = "https://www.siril.org/";
description = "Astrophotographic image processing tool";
license = licenses.gpl3Plus;
changelog = "https://gitlab.com/free-astro/siril/-/blob/HEAD/ChangeLog";
maintainers = with maintainers; [ hjones2199 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,39 @@
{ stdenv, lib, mkDerivation, fetchFromGitHub
, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
, qtscript, qtserialport, qttools, qtcharts
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
}:
mkDerivation rec {
pname = "stellarium";
version = "0.22.1";
src = fetchFromGitHub {
owner = "Stellarium";
repo = "stellarium";
rev = "v${version}";
sha256 = "sha256-zDYZBV/76BDWWfiug0fFvMe3pdE4xfKgSmVJJd3Qu9Y=";
};
nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
buildInputs = [
freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools
qtmultimedia qtlocation qtbase qtcharts
];
preConfigure = lib.optionalString stdenv.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")'
'';
meta = with lib; {
broken = stdenv.isDarwin;
description = "Free open-source planetarium";
homepage = "http://stellarium.org/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ ma27 ];
};
}

View file

@ -0,0 +1,31 @@
{ lib, stdenv, fetchurl, imake, gccmakedep, libXt, libXext }:
stdenv.mkDerivation rec {
pname = "xearth";
version = "1.1";
src = fetchurl {
url = "http://xearth.org/${pname}-${version}.tar.gz";
sha256 = "bcb1407cc35b3f6dd3606b2c6072273b6a912cbd9ed1ae22fb2d26694541309c";
};
nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ libXt libXext ];
installFlags = [ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"];
installTargets = [ "install" "install.man" ];
meta = with lib; {
description = "sets the X root window to an image of the Earth";
homepage = "http://xplanet.org";
longDescription =
'' Xearth sets the X root window to an image of the Earth, as seen from your favorite vantage point in space,
correctly shaded for the current position of the Sun.
By default, xearth updates the displayed image every five minutes.
'';
maintainers = [ maintainers.mafo ];
license = "xearth";
platforms=platforms.unix;
};
}

View file

@ -0,0 +1,38 @@
{lib, stdenv, fetchurl, fetchpatch, pkg-config, freetype, pango, libpng, libtiff
, giflib, libjpeg, netpbm}:
stdenv.mkDerivation rec {
pname = "xplanet";
version = "1.3.1";
src = fetchurl {
url = "mirror://sourceforge/xplanet/${pname}-${version}.tar.gz";
sha256 = "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ freetype pango libpng libtiff giflib libjpeg netpbm ];
patches = [
(fetchpatch {
name = "giflib6.patch";
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/ce6f25eb369dc011161613894f01fd0a6ae85a09/trunk/giflib6.patch";
sha256 = "173l0xkqq0v2bpaff7hhwc7y2aw5cclqw8988k1nalhyfbrjb8bl";
})
(fetchpatch {
name = "xplanet-c++11.patch";
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/ce6f25eb369dc011161613894f01fd0a6ae85a09/trunk/xplanet-c++11.patch";
sha256 = "0vldai78ixw49bxch774pps6pq4sp0p33qvkvxywcz7p8kzpg8q2";
})
];
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = with lib; {
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;
};
}