2021-01-17 03:09:27 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, wrapQtAppsHook, pkg-config, qmake
|
2020-04-28 05:29:39 +02:00
|
|
|
, curl, grantlee, libgit2, libusb-compat-0_1, libssh2, libxml2, libxslt, libzip, zlib
|
2018-01-01 18:28:49 +01:00
|
|
|
, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit, libXcomposite
|
2021-02-19 11:13:45 +01:00
|
|
|
, bluez
|
2016-11-10 13:02:53 +01:00
|
|
|
}:
|
|
|
|
|
2017-02-11 15:48:18 +01:00
|
|
|
let
|
2021-07-04 03:27:42 +02:00
|
|
|
version = "5.0.2";
|
2020-04-10 22:54:06 +02:00
|
|
|
|
|
|
|
subsurfaceSrc = (fetchFromGitHub {
|
2020-07-22 13:17:39 +02:00
|
|
|
owner = "Subsurface";
|
2020-04-10 22:54:06 +02:00
|
|
|
repo = "subsurface";
|
|
|
|
rev = "v${version}";
|
2021-07-04 03:27:42 +02:00
|
|
|
sha256 = "1yay06m8p9qp2ghrg8dxavdq55y09apcgdnb7rihgs3hq86k539n";
|
2020-04-10 22:54:06 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
});
|
2017-02-11 15:48:18 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
libdc = stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "libdivecomputer-ssrf";
|
|
|
|
inherit version;
|
2017-02-11 15:48:18 +01:00
|
|
|
|
2020-04-10 22:54:06 +02:00
|
|
|
src = subsurfaceSrc;
|
2022-01-04 06:19:01 +01:00
|
|
|
|
|
|
|
prePatch = "cd libdivecomputer";
|
2017-02-11 15:48:18 +01:00
|
|
|
|
2017-11-01 13:26:04 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
2017-02-11 15:48:18 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.libdivecomputer.org";
|
2017-11-01 13:26:04 +01:00
|
|
|
description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
|
2017-02-11 15:48:18 +01:00
|
|
|
maintainers = with maintainers; [ mguentner ];
|
2017-11-01 13:26:04 +01:00
|
|
|
license = licenses.lgpl21;
|
2017-02-11 15:48:18 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-11-01 13:26:04 +01:00
|
|
|
googlemaps = stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "googlemaps";
|
2017-11-01 13:26:04 +01:00
|
|
|
|
2021-06-15 05:17:55 +02:00
|
|
|
version = "2021-03-19";
|
2017-02-11 15:48:18 +01:00
|
|
|
|
2017-11-01 13:26:04 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vladest";
|
|
|
|
repo = "googlemaps";
|
2021-06-15 05:17:55 +02:00
|
|
|
rev = "8f7def10c203fd3faa5ef96c5010a7294dca0759";
|
|
|
|
sha256 = "1irz398g45hk6xizwzd07qcx1ln8f7l6bhjh15f56yc20waqpx1x";
|
2017-02-11 15:48:18 +01:00
|
|
|
};
|
|
|
|
|
2017-11-01 13:26:04 +01:00
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
|
2018-01-01 18:28:49 +01:00
|
|
|
buildInputs = [ qtbase qtlocation libXcomposite ];
|
2017-11-01 13:26:04 +01:00
|
|
|
|
2021-01-12 12:50:23 +01:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2017-11-01 13:26:04 +01:00
|
|
|
pluginsSubdir = "lib/qt-${qtbase.qtCompatVersion}/plugins";
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-01-24 11:39:02 +01:00
|
|
|
mkdir -p $out $(dirname ${pluginsSubdir}/geoservices)
|
|
|
|
mkdir -p ${pluginsSubdir}/geoservices
|
|
|
|
mv *.so ${pluginsSubdir}/geoservices
|
2017-11-01 13:26:04 +01:00
|
|
|
mv lib $out/
|
|
|
|
'';
|
2017-02-11 15:48:18 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-11-01 13:26:04 +01:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "QtLocation plugin for Google maps tile API";
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
license = licenses.mit;
|
2017-02-11 15:48:18 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "subsurface";
|
|
|
|
inherit version;
|
2016-11-10 13:02:53 +01:00
|
|
|
|
2020-04-10 22:54:06 +02:00
|
|
|
src = subsurfaceSrc;
|
|
|
|
|
2017-02-11 15:48:18 +01:00
|
|
|
buildInputs = [
|
2017-11-01 13:26:04 +01:00
|
|
|
libdc googlemaps
|
2020-04-28 05:29:39 +02:00
|
|
|
curl grantlee libgit2 libssh2 libusb-compat-0_1 libxml2 libxslt libzip
|
2017-02-11 15:48:18 +01:00
|
|
|
qtbase qtconnectivity qtsvg qttools qtwebkit
|
2021-02-19 11:13:45 +01:00
|
|
|
bluez
|
2017-02-11 15:48:18 +01:00
|
|
|
];
|
2016-11-10 13:02:53 +01:00
|
|
|
|
2021-01-17 03:09:27 +01:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook pkg-config ];
|
2016-11-10 13:02:53 +01:00
|
|
|
|
2017-02-11 15:48:18 +01:00
|
|
|
cmakeFlags = [
|
2017-11-01 13:26:04 +01:00
|
|
|
"-DLIBDC_FROM_PKGCONFIG=ON"
|
2017-02-11 15:48:18 +01:00
|
|
|
"-DNO_PRINTING=OFF"
|
|
|
|
];
|
2016-11-10 13:02:53 +01:00
|
|
|
|
2017-11-01 13:26:04 +01:00
|
|
|
passthru = { inherit version libdc googlemaps; };
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-11-01 13:26:04 +01:00
|
|
|
description = "A divelog program";
|
2016-11-10 13:02:53 +01:00
|
|
|
longDescription = ''
|
|
|
|
Subsurface can track single- and multi-tank dives using air, Nitrox or TriMix.
|
|
|
|
It allows tracking of dive locations including GPS coordinates (which can also
|
|
|
|
conveniently be entered using a map interface), logging of equipment used and
|
|
|
|
names of other divers, and lets users rate dives and provide additional notes.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://subsurface-divelog.org";
|
2016-11-10 13:02:53 +01:00
|
|
|
license = licenses.gpl2;
|
2021-02-19 11:18:21 +01:00
|
|
|
maintainers = with maintainers; [ mguentner adisbladis ];
|
2016-11-10 13:02:53 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|