nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 123 lines 2.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6 desktopToDarwinBundle, 7 docbook_xml_dtd_45, 8 docbook_xsl, 9 intltool, 10 itstool, 11 libxslt, 12 pkg-config, 13 wrapGAppsHook3, 14 yelp-tools, 15 curl, 16 gdk-pixbuf, 17 gtk3, 18 json-glib, 19 libxml2, 20 gpsbabel, 21 withGeoClue ? true, 22 geoclue2, 23 withGeoTag ? true, 24 gexiv2, 25 withMagic ? true, 26 file, 27 withMapnik ? false, 28 mapnik, 29 withMBTiles ? true, 30 sqlite, 31 withMd5Hash ? true, 32 nettle, 33 withOAuth ? true, 34 liboauth, 35 withRealtimeGPSTracking ? (!stdenv.hostPlatform.isDarwin), 36 gpsd, 37}: 38 39stdenv.mkDerivation rec { 40 pname = "viking"; 41 version = "1.10"; 42 43 src = fetchurl { 44 url = "mirror://sourceforge/viking/viking-${version}.tar.bz2"; 45 sha256 = "sha256-lFXIlfmLwT3iS9ayNM0PHV7NwbBotMvG62ZE9hJuRaw="; 46 }; 47 48 patches = [ 49 # Fix check_md5_hash.sh on macOS 50 (fetchpatch { 51 url = "https://github.com/viking-gps/viking/pull/184/commits/b0e110a3cfefea0f1874669525eb3a220dd29f9f.patch"; 52 hash = "sha256-HdkcZMV570SXOQMIZZAti2HT0gIdF/EwQCVXBaOwpqs="; 53 }) 54 ]; 55 56 nativeBuildInputs = [ 57 docbook_xml_dtd_45 58 docbook_xsl 59 intltool 60 itstool 61 libxslt 62 pkg-config 63 wrapGAppsHook3 64 yelp-tools 65 ] 66 ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; 67 68 buildInputs = [ 69 curl 70 gdk-pixbuf 71 gtk3 72 json-glib 73 libxml2 74 ] 75 ++ lib.optional withGeoClue geoclue2 76 ++ lib.optional withGeoTag gexiv2 77 ++ lib.optional withMagic file 78 ++ lib.optional withMapnik mapnik 79 ++ lib.optional withMBTiles sqlite 80 ++ lib.optional withMd5Hash nettle 81 ++ lib.optional withOAuth liboauth 82 ++ lib.optional withRealtimeGPSTracking gpsd; 83 84 configureFlags = [ 85 (lib.enableFeature withGeoClue "geoclue") 86 (lib.enableFeature withGeoTag "geotag") 87 (lib.enableFeature withMagic "magic") 88 (lib.enableFeature withMapnik "mapnik") 89 (lib.enableFeature withMBTiles "mbtiles") 90 (lib.enableFeature withMd5Hash "nettle") 91 (lib.enableFeature withOAuth "oauth") 92 (lib.enableFeature withRealtimeGPSTracking "realtime-gps-tracking") 93 ]; 94 95 hardeningDisable = [ "format" ]; 96 97 doCheck = true; 98 99 preFixup = '' 100 gappsWrapperArgs+=( 101 --prefix PATH : ${lib.makeBinPath [ gpsbabel ]} 102 ) 103 ''; 104 105 meta = with lib; { 106 description = "GPS data editor and analyzer"; 107 mainProgram = "viking"; 108 longDescription = '' 109 Viking is a free/open source program to manage GPS data. You 110 can import and plot tracks and waypoints, show Openstreetmaps 111 and/or Terraserver maps under it, download geocaches for an area 112 on the map, make new tracks and waypoints, see real-time GPS 113 position, etc. 114 ''; 115 homepage = "https://sourceforge.net/projects/viking/"; 116 license = licenses.gpl2Plus; 117 maintainers = with maintainers; [ 118 pSub 119 sikmir 120 ]; 121 platforms = with platforms; unix; 122 }; 123}