@@ -1,71 +1,65 @@
1−{
2− stdenv,
3− cmake, doxygen, pkgconfig, autoreconfHook,
4− curl,
5− fetchgit,
6− grantlee,
7− libgit2,
8− libusb,
9− libssh2,
10− libxml2,
11− libxslt,
12− libzip,
13− qtbase, qtconnectivity, qtquickcontrols, qtscript, qtsvg, qttools, qtwebkit,
14− sqlite
1+{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, makeWrapper, pkgconfig, qmake
2+, curl, grantlee, libgit2, libusb, libssh2, libxml2, libxslt, libzip, zlib
3+, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit
154}:
165
176let
18− version = "4.6.0";
7+ version = "4.7.2";
198
20− libmarble = stdenv.mkDerivation rec {
21− name = "libmarble-ssrf-${version}";
9+ libdc = stdenv.mkDerivation rec {
10+ name = "libdivecomputer-ssrf-${version}";
2211
23− src = fetchgit {
24− url = "git://git.subsurface-divelog.org/marble";
25− rev = "refs/tags/v${version}";
26− sha256 = "1dm2hdk6y36ls7pxbzkqmyc46hdy2cd5f6pkxa6nfrbhvk5f31zd";
12+ src = fetchurl {
13+ url = "https://subsurface-divelog.org/downloads/libdivecomputer-subsurface-branch-${version}.tgz";
14+ sha256 = "04wadhhva1bfnwk0kl359kcv0f83mgym2fzs441spw5llcl7k52r";
2715 };
2816
29− buildInputs = [ qtbase qtquickcontrols qtscript qtwebkit ];
30− nativeBuildInputs = [ doxygen pkgconfig cmake ];
17+ nativeBuildInputs = [ autoreconfHook ];
18+
19+ buildInputs = [ zlib ];
3120
3221 enableParallelBuilding = true;
3322
34− cmakeFlags = [
35− "-DQTONLY=TRUE"
36− "-DQT5BUILD=ON"
37− "-DBUILD_MARBLE_TESTS=NO"
38− "-DWITH_DESIGNER_PLUGIN=NO"
39− "-DBUILD_MARBLE_APPS=NO"
40− ];
41−
4223 meta = with stdenv.lib; {
43− description = "Qt library for a slippy map with patches from the Subsurface project";
44− homepage = http://subsurface-divelog.org;
45− license = licenses.lgpl21;
24+ homepage = http://www.libdivecomputer.org;
25+ description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
4626 maintainers = with maintainers; [ mguentner ];
27+ license = licenses.lgpl21;
4728 platforms = platforms.all;
4829 };
4930 };
5031
51− libdc = stdenv.mkDerivation rec {
52− name = "libdivecomputer-ssrf-${version}";
32+ googlemaps = stdenv.mkDerivation rec {
33+ name = "googlemaps-${version}";
34+
35+ version = "2017-09-17";
5336
54− src = fetchgit {
55− url = "git://subsurface-divelog.org/libdc";
56− rev = "refs/tags/v${version}";
57− sha256 = "0s82c8bvqph9c9chwzd76iwrw968w7lgjm3pj4hmad1jim67bs6n";
37+ src = fetchFromGitHub {
38+ owner = "vladest";
39+ repo = "googlemaps";
40+ rev = "1b857c02504dd52b1aa442418b8dcea78ced3f35";
41+ sha256 = "14icmc925g4abwwdrldjc387aiyvcp3ia5z7mfh9qa09bv829a84";
5842 };
5943
60− nativeBuildInputs = [ autoreconfHook ];
44+ nativeBuildInputs = [ qmake ];
45+
46+ buildInputs = [ qtbase qtlocation ];
47+
48+ pluginsSubdir = "lib/qt-${qtbase.qtCompatVersion}/plugins";
49+
50+ installPhase = ''
51+ mkdir $out $(dirname ${pluginsSubdir})
52+ mv plugins ${pluginsSubdir}
53+ mv lib $out/
54+ '';
6155
6256 enableParallelBuilding = true;
6357
6458 meta = with stdenv.lib; {
65− homepage = http://www.libdivecomputer.org;
66− description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
67− maintainers = with maintainers; [ mguentner ];
68− license = licenses.lgpl21;
59+ inherit (src.meta) homepage;
60+ description = "QtLocation plugin for Google maps tile API";
61+ maintainers = with maintainers; [ orivej ];
62+ license = licenses.mit;
6963 platforms = platforms.all;
7064 };
7165 };
@@ -73,28 +67,35 @@ let
7367in stdenv.mkDerivation rec {
7468 name = "subsurface-${version}";
7569
76− src = fetchgit {
77− url = "git://git.subsurface-divelog.org/subsurface";
78− rev = "refs/tags/v${version}";
79− sha256 = "1rk5n52p6cnyjrgi7ybhmvh7y31zxrjny0mqpnc1wql69f90h94c";
70+ src = fetchurl {
71+ url = "https://subsurface-divelog.org/downloads/Subsurface-${version}.tgz";
72+ sha256 = "06f215xx1nc2q2qff2ihcl86fkrlnkvacl1swi3fw9iik6nq3bjp";
8073 };
8174
8275 buildInputs = [
83− libdc libmarble
76+ libdc googlemaps
8477 curl grantlee libgit2 libssh2 libusb libxml2 libxslt libzip
8578 qtbase qtconnectivity qtsvg qttools qtwebkit
8679 ];
87− nativeBuildInputs = [ cmake pkgconfig ];
8880
89− enableParallelBuilding = false; # subsurfacewebservices.h dependency on ui_webservices.h
81+ nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
9082
9183 cmakeFlags = [
92− "-DMARBLE_LIBRARIES=${libmarble}/lib/libssrfmarblewidget.so"
84+ "-DLIBDC_FROM_PKGCONFIG=ON"
9385 "-DNO_PRINTING=OFF"
9486 ];
9587
88+ postInstall = ''
89+ wrapProgram $out/bin/subsurface \
90+ --prefix QT_PLUGIN_PATH : "${googlemaps}/${googlemaps.pluginsSubdir}"
91+ '';
92+
93+ enableParallelBuilding = true;
94+
95+ passthru = { inherit version libdc googlemaps; };
96+
9697 meta = with stdenv.lib; {
97− description = "Subsurface is an open source divelog program that runs on Windows, Mac and Linux";
98+ description = "A divelog program";
9899 longDescription = ''
99100 Subsurface can track single- and multi-tank dives using air, Nitrox or TriMix.
100101 It allows tracking of dive locations including GPS coordinates (which can also