diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-02-14 09:48:00 +0100 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-02-14 09:48:39 +0100 |
commit | 31124e17ebe40a3162dab2b1f204fc404b2ff256 (patch) | |
tree | 8b823a6b460bbdfc830a8217c9ad4bbf0e3f6586 /pkgs/applications/misc/xygrib | |
parent | c4419e62648071d9ef25baa4ace233ed6f6d3f1f (diff) |
xygrib: fix build failure due to openjpeg update
Diffstat (limited to 'pkgs/applications/misc/xygrib')
-rw-r--r-- | pkgs/applications/misc/xygrib/default.nix | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/pkgs/applications/misc/xygrib/default.nix b/pkgs/applications/misc/xygrib/default.nix index 68adc2abbf9df..864ea27ede778 100644 --- a/pkgs/applications/misc/xygrib/default.nix +++ b/pkgs/applications/misc/xygrib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg } : +{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg }: stdenv.mkDerivation rec { version = "1.2.6.1"; @@ -13,26 +13,29 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake qttools wrapQtAppsHook ]; buildInputs = [ bzip2 qtbase libnova proj openjpeg libpng ]; - cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-2.3" ] + cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-${lib.versions.majorMinor openjpeg.version}" ] ++ lib.optionals stdenv.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ]; - 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 - ''; + 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 + ''; meta = with 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.''; + 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 = with maintainers; [ j03 SuperSandro2000 ]; |