diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix new file mode 100644 index 000000000000..3517351090d7 --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix @@ -0,0 +1,68 @@ +{ stdenv, fetchFromGitHub, gdal, cmake, ninja, proj, clipper, zlib, qtbase, qttools + , qtlocation, qtsensors, doxygen, cups, makeWrapper, qtimageformats +}: + +stdenv.mkDerivation rec { + name = "OpenOrienteering-Mapper-${version}"; + version = "0.8.3"; + + buildInputs = [ gdal qtbase qttools qtlocation qtimageformats + qtsensors clipper zlib proj doxygen cups]; + + nativeBuildInputs = [ cmake makeWrapper ninja ]; + + src = fetchFromGitHub { + owner = "OpenOrienteering"; + repo = "mapper"; + rev = "v${version}"; + sha256 = "0pnqwvmg97mgc2ci3abmx07l0njxcrbljh75w8ym31g0jq76pgr9"; + }; + + cmakeFlags = + [ + # Required by the build to be specified + "-DPROJ4_ROOT=${proj}" + + # Building the manual and bundling licenses fails + "-DLICENSING_PROVIDER:BOOL=OFF" + "-DMapper_MANUAL_QTHELP:BOOL=OFF" + ] ++ + (stdenv.lib.optionals stdenv.isDarwin + [ + # Usually enabled on Darwin + "-DCMAKE_FIND_FRAMEWORK=never" + # FindGDAL is broken and always finds /Library/Framework unless this is + # specified + "-DGDAL_INCLUDE_DIR=${gdal}/include" + "-DGDAL_CONFIG=${gdal}/bin/gdal-config" + "-DGDAL_LIBRARY=${gdal}/lib/libgdal.dylib" + # Don't bundle libraries + "-DMapper_PACKAGE_PROJ=0" + "-DMapper_PACKAGE_QT=0" + "-DMapper_PACKAGE_ASSISTANT=0" + "-DMapper_PACKAGE_GDAL=0" + ]); + + + postInstall = + stdenv.lib.optionalString stdenv.isDarwin '' + # Fixes "This application failed to start because it could not find or load the Qt + # platform plugin "cocoa"." + wrapProgram $out/Mapper.app/Contents/MacOS/Mapper \ + --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \ + --set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtimageformats}/${qtbase.qtPluginPrefix} + mkdir -p $out/bin + ln -s $out/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper + ''; + + meta = with stdenv.lib; { + description = '' + OpenOrienteering Mapper is an orienteering mapmaking program + and provides a free alternative to the existing proprietary solution. + ''; + homepage = https://www.openorienteering.org/apps/mapper/; + license = licenses.gpl3; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [mpickering]; + }; +} |