2021-09-28 08:13:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj_7, libpng, openjpeg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "unstable-2022-05-16";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xygrib";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opengribs";
|
|
|
|
repo = "XyGrib";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "88c425ca2d7f4ba5d7ab75bfa25e177bee02d310";
|
|
|
|
sha256 = "sha256-qMMeRYIQqJpVRE3YjbXIiXHwS/CHs9l2QihszwQIr/A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
|
2021-09-28 08:13:01 +00:00
|
|
|
buildInputs = [ bzip2 qtbase libnova proj_7 openjpeg libpng ];
|
2021-02-17 17:02:09 +00:00
|
|
|
cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-${lib.versions.majorMinor openjpeg.version}" ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-17 17:02:09 +00: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 ''
|
|
|
|
wrapQtApp $out/XyGrib/XyGrib
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/XyGrib/XyGrib $out/bin/xygrib
|
2024-01-02 11:29:13 +00:00
|
|
|
install -Dm444 $src/debian/xygrib.png -t $out/share/icons/hicolor/32x32/apps
|
|
|
|
install -Dm444 $src/debian/xygrib.desktop -t $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/xygrib.desktop \
|
|
|
|
--replace 'Exec=XyGrib' 'Exec=xygrib'
|
2021-02-17 17:02:09 +00:00
|
|
|
'';
|
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
|
|
|
homepage = "https://opengribs.org";
|
|
|
|
description = "Weather Forecast Visualization";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "xygrib";
|
2021-02-17 17:02:09 +00:00
|
|
|
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.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.all;
|
2022-12-02 08:20:57 +00:00
|
|
|
maintainers = with maintainers; [ j03 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|