nixpkgs-suyu/pkgs/applications/misc/xygrib/default.nix

41 lines
1.6 KiB
Nix
Raw Normal View History

2020-01-15 16:09:24 +01:00
{ stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg } :
2019-07-19 15:21:51 +02:00
stdenv.mkDerivation rec {
version = "1.2.6.1";
pname = "xygrib";
src = fetchFromGitHub {
owner = "opengribs";
repo = "XyGrib";
rev = "v${version}";
sha256 = "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia";
};
2020-01-15 16:09:24 +01:00
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
2019-07-19 15:21:51 +02:00
buildInputs = [ bzip2 qtbase libnova proj openjpeg libpng ];
2020-11-29 09:18:32 +01:00
cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-2.3" ]
++ stdenv.lib.optionals stdenv.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ];
2019-07-19 15:21:51 +02:00
2020-11-29 09:18:32 +01:00
postInstall = if stdenv.isDarwin then ''
mkdir -p "$out/Applications" "$out/XyGrib/XyGrib.app/Contents/Resources"
cp "../data/img/xyGrib.icns" "$out/XyGrib/XyGrib.app/Contents/Resources/xyGrib.icns"
mv $out/XyGrib/XyGrib.app $out/Applications
wrapQtApp "$out/Applications/XyGrib.app/Contents/MacOS/XyGrib"
'' else ''
2020-01-15 16:09:24 +01:00
wrapQtApp $out/XyGrib/XyGrib
mkdir -p $out/bin
ln -s $out/XyGrib/XyGrib $out/bin/xygrib
2019-07-19 15:21:51 +02:00
'';
meta = with stdenv.lib; {
homepage = "https://opengribs.org";
description = "Weather Forecast Visualization";
longDescription = ''XyGrib is a leading opensource weather visualization package.
It interacts with OpenGribs's Grib server providing a choice
of global and large area atmospheric and wave models.'';
license = licenses.gpl3;
platforms = platforms.all;
2020-11-29 09:18:32 +01:00
maintainers = with maintainers; [ j03 SuperSandro2000 ];
2019-07-19 15:21:51 +02:00
};
}