about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/gis
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-07-13 23:20:04 +0000
committerAlyssa Ross <hi@alyssa.is>2020-07-13 23:21:06 +0000
commita42c1d6d62656dcf9bd85de620f2e200a5ad22d8 (patch)
tree7d481fea9872f62a034452612be17f4494159baa /nixpkgs/pkgs/applications/gis
parent55f69a6b0e53c1c4b3e0396937c53bf5662b5519 (diff)
parent9480bae337095fd24f61380bce3174fdfe926a00 (diff)
downloadnixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.gz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.bz2
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.lz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.xz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.zst
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.zip
Merge commit '9480bae337095fd24f61380bce3174fdfe926a00'
This is the last nixos-unstable release before 13b2903169f, which I'm a
bit nervous about.  So I want the update including that one to be as
small as possible, hence going to this one first.
Diffstat (limited to 'nixpkgs/pkgs/applications/gis')
-rw-r--r--nixpkgs/pkgs/applications/gis/grass/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix69
-rw-r--r--nixpkgs/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff13
3 files changed, 65 insertions, 21 deletions
diff --git a/nixpkgs/pkgs/applications/gis/grass/default.nix b/nixpkgs/pkgs/applications/gis/grass/default.nix
index cb574ffc8f18..420f57bb93fe 100644
--- a/nixpkgs/pkgs/applications/gis/grass/default.nix
+++ b/nixpkgs/pkgs/applications/gis/grass/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
-, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
+, cairo, readline, ffmpeg_3, makeWrapper, wxGTK30, netcdf, blas
 , proj, gdal, geos, sqlite, postgresql, libmysqlclient, python2Packages, libLAS, proj-datumgrid
 }:
 
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo proj
-  readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
+  readline ffmpeg_3 makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
   libLAS proj-datumgrid ]
     ++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
 
diff --git a/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix
index 2fc118597f92..39f8694dd177 100644
--- a/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix
+++ b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix
@@ -1,31 +1,61 @@
-{ stdenv, fetchFromGitHub, gdal, cmake, ninja, proj, clipper, zlib, qtbase, qttools
-, qtlocation, qtsensors, doxygen, cups, wrapQtAppsHook, qtimageformats
+{ stdenv
+, mkDerivation
+, fetchFromGitHub
+, gdal
+, cmake
+, ninja
+, proj
+, clipper
+, zlib
+, qttools
+, qtlocation
+, qtsensors
+, qttranslations
+, doxygen
+, cups
+, qtimageformats
 }:
 
-stdenv.mkDerivation rec {
+mkDerivation rec {
   pname = "OpenOrienteering-Mapper";
-  version = "0.9.2";
+  version = "0.9.3";
 
-  buildInputs = [ gdal qtbase qttools qtlocation qtimageformats
-                  qtsensors clipper zlib proj doxygen cups];
+  buildInputs = [
+    gdal
+    qtlocation
+    qtimageformats
+    qtsensors
+    clipper
+    zlib
+    proj
+    cups
+  ];
 
-  nativeBuildInputs = [ cmake wrapQtAppsHook ninja ];
+  nativeBuildInputs = [ cmake doxygen ninja qttools ];
 
   src = fetchFromGitHub {
     owner = "OpenOrienteering";
     repo = "mapper";
     rev = "v${version}";
-    sha256 = "1787f2agjzcyizk2m60icb44yv9dlwv6irw3k53fqfmwkhkd2h5p";
+    sha256 = "05bliglpc8170px6k9lfrp9ylpnb2zf47gnjns9b2bif8dv8zq0l";
   };
 
-  cmakeFlags =
-    [
+  patches = [
+    # See https://github.com/NixOS/nixpkgs/issues/86054
+    ./fix-qttranslations-path.diff
+  ];
+
+  postPatch = ''
+    substituteInPlace src/util/translation_util.cpp \
+      --subst-var-by qttranslations ${qttranslations}
+  '';
+
+  cmakeFlags = [
     # Building the manual and bundling licenses fails
+    # See https://github.com/NixOS/nixpkgs/issues/85306
     "-DLICENSING_PROVIDER:BOOL=OFF"
     "-DMapper_MANUAL_QTHELP:BOOL=OFF"
-    ] ++
-    (stdenv.lib.optionals stdenv.isDarwin
-    [
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [
     # Usually enabled on Darwin
     "-DCMAKE_FIND_FRAMEWORK=never"
     # FindGDAL is broken and always finds /Library/Framework unless this is
@@ -38,16 +68,17 @@ stdenv.mkDerivation rec {
     "-DMapper_PACKAGE_QT=0"
     "-DMapper_PACKAGE_ASSISTANT=0"
     "-DMapper_PACKAGE_GDAL=0"
-    ]);
+  ];
 
-  postInstall =
-    stdenv.lib.optionalString stdenv.isDarwin ''
+  postInstall = with stdenv; lib.optionalString isDarwin ''
+    mkdir -p $out/Applications
+    mv $out/Mapper.app $out/Applications
     # Fixes "This application failed to start because it could not find or load the Qt
     # platform plugin "cocoa"."
-    wrapQtApp $out/Mapper.app/Contents/MacOS/Mapper
+    wrapQtApp $out/Applications/Mapper.app/Contents/MacOS/Mapper
     mkdir -p $out/bin
-    ln -s $out/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper
-    '';
+    ln -s $out/Applications/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper
+  '';
 
   meta = with stdenv.lib; {
     description = ''
diff --git a/nixpkgs/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff
new file mode 100644
index 000000000000..06c465a8fb33
--- /dev/null
+++ b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff
@@ -0,0 +1,13 @@
+diff --git i/src/util/translation_util.cpp w/src/util/translation_util.cpp
+index da03d216..c1f12751 100644
+--- i/src/util/translation_util.cpp
++++ w/src/util/translation_util.cpp
+@@ -103,7 +103,7 @@ TranslationUtil::TranslationUtil(const QString& code, QString translation_file)
+ 	}
+ 	
+ 	QString translation_name = QLatin1String("qt_") + language.code;
+-	if (!qt_translator.load(translation_name, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
++	if (!qt_translator.load(translation_name, QLatin1String("@qttranslations@/translations")))
+ 		load(qt_translator, translation_name);
+ 	
+ 	load(app_translator, translation_file);