package.nix (3693B)
1 { 2 stdenv, 3 lib, 4 fetchurl, 5 fetchpatch, 6 cmake, 7 qt5, 8 garmindev, 9 gdal, 10 gpsd, 11 libdmtx, 12 libexif, 13 libgeotiff, 14 libGLU, 15 libspatialite, 16 proj_7, 17 }: 18 19 stdenv.mkDerivation (finalAttrs: { 20 pname = "qlandkartegt"; 21 version = "1.8.1"; 22 23 src = fetchurl { 24 url = "mirror://sourceforge/qlandkartegt/qlandkartegt-${finalAttrs.version}.tar.gz"; 25 sha256 = "1rwv5ar5jv15g1cc6pp0lk69q3ip10pjazsh3ds2ggaciymha1ly"; 26 }; 27 28 patches = [ 29 (fetchpatch { 30 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-gps_read.patch?h=qlandkartegt"; 31 sha256 = "1xyqxdqxwviq7b8jjxssxjlkldk01ms8dzqdjgvjs8n3fh7w0l70"; 32 }) 33 (fetchpatch { 34 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-incomplete-type.patch?h=qlandkartegt"; 35 sha256 = "1q7rm321az3q6pq5mq0yjrihxl9sf3nln9z3xp20g9qldslv2cy2"; 36 }) 37 (fetchpatch { 38 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-proj_api.patch?h=qlandkartegt"; 39 sha256 = "12yibxn85z2n30azmhyv02q091jj5r50nlnjq4gfzyqd3xb9582n"; 40 }) 41 (fetchpatch { 42 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-qt5-build.patch?h=qlandkartegt"; 43 sha256 = "1wq2hr06gzq8m7zddh10vizmvpwp4lcy1g86rlpppvdc5cm3jpkl"; 44 }) 45 (fetchpatch { 46 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-qtgui-include.patch?h=qlandkartegt"; 47 sha256 = "16hql8ignzw4n1hlp4icbvaddqcadh2rjns0bvis720535112sc8"; 48 }) 49 (fetchpatch { 50 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-timespec.patch?h=qlandkartegt"; 51 sha256 = "1yzdwfsgjn7q04r9f7s5qk50y25hdl384dxrmpfmkm97fmpgyr7w"; 52 }) 53 (fetchpatch { 54 url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-ver_str.patch?h=qlandkartegt"; 55 sha256 = "13fg05gqrjfa9j00lrqz1b06xf6r5j01kl6l06vkn0hz1jzxss5m"; 56 }) 57 (fetchpatch { 58 url = "https://aur.archlinux.org/cgit/aur.git/plain/improve-gpx-creator.patch?h=qlandkartegt"; 59 sha256 = "1sdf5z8qrd43azrhwfw06zc0qr48z925hgbcfqlp0xrsxv2n6kks"; 60 }) 61 (fetchpatch { 62 url = "https://aur.archlinux.org/cgit/aur.git/plain/improve-gpx-name.patch?h=qlandkartegt"; 63 sha256 = "10phafhns79i3rl4zpc7arw11x46cywgkdkxm7gw1i9y5h0cal79"; 64 }) 65 ]; 66 67 nativeBuildInputs = [ 68 cmake 69 qt5.wrapQtAppsHook 70 ]; 71 72 buildInputs = [ 73 qt5.qtmultimedia 74 qt5.qtserialport 75 qt5.qtscript 76 qt5.qtwebkit 77 garmindev 78 (gdal.override { 79 libgeotiff = libgeotiff.override { proj = proj_7; }; 80 libspatialite = libspatialite.override { proj = proj_7; }; 81 proj = proj_7; 82 }) 83 gpsd 84 libdmtx 85 libexif 86 libGLU 87 proj_7 88 ]; 89 90 cmakeFlags = [ 91 (lib.cmakeBool "QK_QT5_PORT" true) 92 (lib.cmakeFeature "EXIF_LIBRARIES" "${libexif}/lib/libexif.so") 93 (lib.cmakeFeature "EXIF_INCLUDE_DIRS" "${libexif}/include") 94 ]; 95 96 postPatch = '' 97 substituteInPlace ConfigureChecks.cmake \ 98 --replace-fail \$\{PLUGIN_INSTALL_DIR\} "${garmindev}/lib/qlandkartegt" 99 ''; 100 101 postInstall = '' 102 mkdir -p $out/share/mime/packages 103 cat << EOF > $out/share/mime/packages/qlandkartegt.xml 104 <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> 105 <mime-type type="application/vnd.qlandkartegt.qlb"> 106 <comment>QLandkarteGT File</comment> 107 <glob pattern="*.qlb"/> 108 </mime-type> 109 </mime-info> 110 EOF 111 ''; 112 113 meta = { 114 homepage = "http://www.qlandkarte.org/"; 115 description = '' 116 QLandkarte GT is the ultimate outdoor aficionado's tool. 117 It supports GPS maps in GeoTiff format as well as Garmin's img vector map format. 118 ''; 119 license = lib.licenses.gpl2; 120 maintainers = [ lib.maintainers.sikmir ]; 121 platforms = lib.platforms.linux; 122 skip.ci = true; 123 }; 124 })