2022-11-27 09:42:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, writeShellScriptBin
|
|
|
|
, cmake
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, pkg-config
|
|
|
|
, qmake
|
|
|
|
, curl
|
|
|
|
, grantlee
|
|
|
|
, libgit2
|
|
|
|
, libssh2
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, libzip
|
|
|
|
, zlib
|
|
|
|
, qtbase
|
|
|
|
, qtconnectivity
|
|
|
|
, qtlocation
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, qtwebengine
|
|
|
|
, libXcomposite
|
2021-02-19 19:06:45 +00:00
|
|
|
, bluez
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "5.0.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subsurfaceSrc = (fetchFromGitHub {
|
2020-08-20 17:08:02 +00:00
|
|
|
owner = "Subsurface";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "subsurface";
|
|
|
|
rev = "v${version}";
|
2022-11-27 09:42:12 +00:00
|
|
|
hash = "sha256-KzUBhFGvocaS1VrVT2stvKrj3uVxYka+dyYZUfkIoNs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
});
|
|
|
|
|
|
|
|
libdc = stdenv.mkDerivation {
|
|
|
|
pname = "libdivecomputer-ssrf";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = subsurfaceSrc;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
sourceRoot = "source/libdivecomputer";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://www.libdivecomputer.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
|
|
|
|
maintainers = with maintainers; [ mguentner ];
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
googlemaps = stdenv.mkDerivation rec {
|
|
|
|
pname = "googlemaps";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.0.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vladest";
|
|
|
|
repo = "googlemaps";
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "v.${version}";
|
|
|
|
hash = "sha256-PfSLFQeCeVNcCVDCZehxyNLQGT6gff5jNxMW8lAaP8c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
|
|
|
|
buildInputs = [ qtbase qtlocation libXcomposite ];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
pluginsSubdir = "lib/qt-${qtbase.qtCompatVersion}/plugins";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out $(dirname ${pluginsSubdir}/geoservices)
|
|
|
|
mkdir -p ${pluginsSubdir}/geoservices
|
|
|
|
mv *.so ${pluginsSubdir}/geoservices
|
|
|
|
mv lib $out/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "QtLocation plugin for Google maps tile API";
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
get-version = writeShellScriptBin "get-version" ''
|
|
|
|
echo -n ${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "subsurface";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = subsurfaceSrc;
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
install -m555 -t scripts ${lib.getExe get-version}
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-02-19 19:06:45 +00:00
|
|
|
bluez
|
2022-11-27 09:42:12 +00:00
|
|
|
curl
|
|
|
|
googlemaps
|
|
|
|
grantlee
|
|
|
|
libdc
|
|
|
|
libgit2
|
|
|
|
libssh2
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
libzip
|
|
|
|
qtbase
|
|
|
|
qtconnectivity
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtwebengine
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DLIBDC_FROM_PKGCONFIG=ON"
|
|
|
|
"-DNO_PRINTING=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = { inherit version libdc googlemaps; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A divelog program";
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = "https://subsurface-divelog.org";
|
|
|
|
license = licenses.gpl2;
|
2021-02-19 19:06:45 +00:00
|
|
|
maintainers = with maintainers; [ mguentner adisbladis ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|