nur-packages

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

default.nix (3541B)


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