nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit af46d8db4c04b9c7046af0fae1dfb13adb68fb01
parent b27c38a1ce8b9ce079fd2c0a426b2e1d36a1153d
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Mon, 23 Dec 2019 23:19:36 +0300

Add openorienteering-mapper

Diffstat:
Mdefault.nix | 3+++
Mnix/sources.json | 12++++++++++++
Apkgs/openorienteering-mapper/default.nix | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 74 insertions(+), 0 deletions(-)

diff --git a/default.nix b/default.nix @@ -37,6 +37,9 @@ in { mbutil = python3Packages.callPackage ./pkgs/mbutil { inherit (sources) mbutil; }; + openorienteering-mapper = libsForQt5.callPackage ./pkgs/openorienteering-mapper { + inherit (sources) mapper; + }; redict = libsForQt5.callPackage ./pkgs/redict { inherit (sources) redict; }; diff --git a/nix/sources.json b/nix/sources.json @@ -119,6 +119,18 @@ "url": "https://notabug.org/irdvo/gpxtools/archive/b989f357abb9f9b694cbe95081dd8d1094019233.tar.gz", "url_template": "https://notabug.org/<owner>/<repo>/archive/<rev>.tar.gz" }, + "mapper": { + "branch": "master", + "description": "OpenOrienteering Mapper is a software for creating maps for the orienteering sport.", + "homepage": "https://www.openorienteering.org/apps/mapper/", + "owner": "OpenOrienteering", + "repo": "mapper", + "rev": "3c943cf1e11fe3b0268d2aea7b5365ffc1811bfa", + "sha256": "1ndwwp3vhm83z9xmq7k9w3l61rkc7g150ljw5r3y71bf594h5d14", + "type": "tarball", + "url": "https://github.com/OpenOrienteering/mapper/archive/3c943cf1e11fe3b0268d2aea7b5365ffc1811bfa.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "mbutil": { "branch": "master", "description": "Importer and Exporter of MBTiles", diff --git a/pkgs/openorienteering-mapper/default.nix b/pkgs/openorienteering-mapper/default.nix @@ -0,0 +1,59 @@ +{ stdenv, gdal, cmake, ninja, proj, clipper, zlib, qtbase, qttools, qtlocation +, qtsensors, doxygen, cups, wrapQtAppsHook, qtimageformats, mapper }: + +stdenv.mkDerivation rec { + pname = "OpenOrienteering-Mapper"; + version = stdenv.lib.substring 0 7 src.rev; + src = mapper; + + buildInputs = [ + gdal + qtbase + qttools + qtlocation + qtimageformats + qtsensors + clipper + zlib + proj + doxygen + cups + ]; + + nativeBuildInputs = [ cmake wrapQtAppsHook ninja ]; + + cmakeFlags = [ + # 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"." + wrapQtApp $out/Mapper.app/Contents/MacOS/Mapper + mkdir -p $out/bin + ln -s $out/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper + ''; + + meta = with stdenv.lib; { + description = mapper.description; + homepage = "https://www.openorienteering.org/apps/mapper/"; + license = licenses.gpl3; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ sikmir ]; + }; +}