2019-07-05 16:42:08 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, wrapQtAppsHook, pkgconfig, qmake
|
2020-04-28 04:29:39 +01: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
|
2016-11-10 12:02:53 +00:00
|
|
|
}:
|
|
|
|
|
2017-02-11 14:48:18 +00:00
|
|
|
let
|
2020-04-10 21:54:06 +01:00
|
|
|
version = "4.9.3";
|
|
|
|
|
|
|
|
subsurfaceSrc = (fetchFromGitHub {
|
|
|
|
owner = "Subsurface-divelog";
|
|
|
|
repo = "subsurface";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1i07f7appifx9j205x5a7ng01wsipxr6n9a3692pm60jli2nsir5";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
});
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
libdc = stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "libdivecomputer-ssrf";
|
|
|
|
inherit version;
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2020-04-10 21:54:06 +01: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;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01: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 13:41:18 +01:00
|
|
|
pname = "googlemaps";
|
2017-11-01 12:26:04 +00:00
|
|
|
|
2018-01-01 17:28:49 +00:00
|
|
|
version = "2017-12-18";
|
2017-02-11 14:48:18 +00:00
|
|
|
|
2017-11-01 12:26:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vladest";
|
|
|
|
repo = "googlemaps";
|
2018-01-01 17:28:49 +00:00
|
|
|
rev = "79f3511d60dc9640de02a5f24656094c8982b26d";
|
|
|
|
sha256 = "11334w0bnfb97sv23vvj2b5hcwvr0171hxldn91jms9y12l5j15d";
|
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
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.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 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "subsurface";
|
|
|
|
inherit version;
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2020-04-10 21:54:06 +01:00
|
|
|
src = subsurfaceSrc;
|
|
|
|
|
|
|
|
# remove with the 4.10 release
|
|
|
|
patches = [ ./0001-core-fix-libgit-ifdef-to-handle-libgit2-v1.0-and-onw.patch ];
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2017-02-11 14:48:18 +00:00
|
|
|
buildInputs = [
|
2017-11-01 12:26:04 +00:00
|
|
|
libdc googlemaps
|
2020-04-28 04:29:39 +01: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
|
|
|
|
];
|
2016-11-10 12:02:53 +00:00
|
|
|
|
2019-07-05 16:42:08 +01:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook pkgconfig ];
|
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
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
passthru = { inherit version libdc googlemaps; };
|
|
|
|
|
2016-11-10 12:02:53 +00:00
|
|
|
meta = with stdenv.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 02:11:51 +01:00
|
|
|
homepage = "https://subsurface-divelog.org";
|
2016-11-10 12:02:53 +00:00
|
|
|
license = licenses.gpl2;
|
2017-02-11 14:48:18 +00:00
|
|
|
maintainers = with maintainers; [ mguentner ];
|
2016-11-10 12:02:53 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|