2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, wrapQtAppsHook, pkg-config, qmake
|
2020-04-28 03:29:39 +00:00
|
|
|
, curl, grantlee, libgit2, libusb-compat-0_1, libssh2, libxml2, libxslt, libzip, zlib
|
2018-01-01 17:28:49 +00:00
|
|
|
, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit, libXcomposite
|
2021-02-19 10:13:45 +00:00
|
|
|
, bluez
|
2016-11-10 12:02:53 +00:00
|
|
|
}:
|
|
|
|
|
2017-02-11 14:48:18 +00:00
|
|
|
let
|
2021-07-04 01:27:42 +00:00
|
|
|
version = "5.0.2";
|
2020-04-10 20:54:06 +00:00
|
|
|
|
|
|
|
subsurfaceSrc = (fetchFromGitHub {
|
2020-07-22 11:17:39 +00:00
|
|
|
owner = "Subsurface";
|
2020-04-10 20:54:06 +00:00
|
|
|
repo = "subsurface";
|
|
|
|
rev = "v${version}";
|
2021-07-04 01:27:42 +00:00
|
|
|
sha256 = "1yay06m8p9qp2ghrg8dxavdq55y09apcgdnb7rihgs3hq86k539n";
|
2020-04-10 20:54:06 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
});
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
libdc = stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "libdivecomputer-ssrf";
|
|
|
|
inherit version;
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2020-04-10 20:54:06 +00:00
|
|
|
src = subsurfaceSrc;
|
|
|
|
sourceRoot = "source/libdivecomputer";
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
2017-02-11 14:48:18 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.libdivecomputer.org";
|
2017-11-01 12:26:04 +00:00
|
|
|
description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
|
2017-02-11 14:48:18 +00:00
|
|
|
maintainers = with maintainers; [ mguentner ];
|
2017-11-01 12:26:04 +00:00
|
|
|
license = licenses.lgpl21;
|
2017-02-11 14:48:18 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
googlemaps = stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "googlemaps";
|
2017-11-01 12:26:04 +00:00
|
|
|
|
2021-06-15 03:17:55 +00:00
|
|
|
version = "2021-03-19";
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vladest";
|
|
|
|
repo = "googlemaps";
|
2021-06-15 03:17:55 +00:00
|
|
|
rev = "8f7def10c203fd3faa5ef96c5010a7294dca0759";
|
|
|
|
sha256 = "1irz398g45hk6xizwzd07qcx1ln8f7l6bhjh15f56yc20waqpx1x";
|
2017-02-11 14:48:18 +00:00
|
|
|
};
|
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
|
2018-01-01 17:28:49 +00:00
|
|
|
buildInputs = [ qtbase qtlocation libXcomposite ];
|
2017-11-01 12:26:04 +00:00
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
pluginsSubdir = "lib/qt-${qtbase.qtCompatVersion}/plugins";
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-01-24 10:39:02 +00:00
|
|
|
mkdir -p $out $(dirname ${pluginsSubdir}/geoservices)
|
|
|
|
mkdir -p ${pluginsSubdir}/geoservices
|
|
|
|
mv *.so ${pluginsSubdir}/geoservices
|
2017-11-01 12:26:04 +00:00
|
|
|
mv lib $out/
|
|
|
|
'';
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-01 12:26:04 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "QtLocation plugin for Google maps tile API";
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
license = licenses.mit;
|
2017-02-11 14:48:18 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "subsurface";
|
|
|
|
inherit version;
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2020-04-10 20:54:06 +00:00
|
|
|
src = subsurfaceSrc;
|
|
|
|
|
2017-02-11 14:48:18 +00:00
|
|
|
buildInputs = [
|
2017-11-01 12:26:04 +00:00
|
|
|
libdc googlemaps
|
2020-04-28 03:29:39 +00:00
|
|
|
curl grantlee libgit2 libssh2 libusb-compat-0_1 libxml2 libxslt libzip
|
2017-02-11 14:48:18 +00:00
|
|
|
qtbase qtconnectivity qtsvg qttools qtwebkit
|
2021-02-19 10:13:45 +00:00
|
|
|
bluez
|
2017-02-11 14:48:18 +00:00
|
|
|
];
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook pkg-config ];
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2017-02-11 14:48:18 +00:00
|
|
|
cmakeFlags = [
|
2017-11-01 12:26:04 +00:00
|
|
|
"-DLIBDC_FROM_PKGCONFIG=ON"
|
2017-02-11 14:48:18 +00:00
|
|
|
"-DNO_PRINTING=OFF"
|
|
|
|
];
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
passthru = { inherit version libdc googlemaps; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-01 12:26:04 +00:00
|
|
|
description = "A divelog program";
|
2016-11-10 12:02:53 +00: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 01:11:51 +00:00
|
|
|
homepage = "https://subsurface-divelog.org";
|
2016-11-10 12:02:53 +00:00
|
|
|
license = licenses.gpl2;
|
2021-02-19 10:18:21 +00:00
|
|
|
maintainers = with maintainers; [ mguentner adisbladis ];
|
2016-11-10 12:02:53 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|