aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/misc/xygrib/default.nix
blob: c7f449d97cdb16eb3cb6e1f5dbe64f05816e8e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg } :

stdenv.mkDerivation rec {
  version = "1.2.6.1";
  pname = "xygrib";

  src = fetchFromGitHub {
    owner = "opengribs";
    repo = "XyGrib";
    rev = "v${version}";
    sha256 = "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia";
  };

  nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
  buildInputs = [ bzip2 qtbase libnova proj openjpeg libpng ];
  cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-2.3" ];

  postInstall = ''
    wrapQtApp $out/XyGrib/XyGrib
    mkdir -p $out/bin
    ln -s $out/XyGrib/XyGrib $out/bin/xygrib
  '';

  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;
    maintainers = [ maintainers.j03 ];
  };
}