nixpkgs/pkgs/applications/misc/subsurface/default.nix

112 lines
3.1 KiB
Nix
Raw Normal View History

{ 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
, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit, libXcomposite
2021-02-19 10:13:45 +00:00
, bluez
}:
let
2021-07-04 01:27:42 +00:00
version = "5.0.2";
subsurfaceSrc = (fetchFromGitHub {
2020-07-22 11:17:39 +00:00
owner = "Subsurface";
repo = "subsurface";
rev = "v${version}";
2021-07-04 01:27:42 +00:00
sha256 = "1yay06m8p9qp2ghrg8dxavdq55y09apcgdnb7rihgs3hq86k539n";
fetchSubmodules = true;
});
2019-08-13 21:52:01 +00:00
libdc = stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "libdivecomputer-ssrf";
inherit version;
src = subsurfaceSrc;
sourceRoot = "source/libdivecomputer";
2017-11-01 12:26:04 +00:00
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ zlib ];
enableParallelBuilding = true;
meta = with lib; {
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";
maintainers = with maintainers; [ mguentner ];
2017-11-01 12:26:04 +00:00
license = licenses.lgpl21;
platforms = platforms.all;
};
};
2017-11-01 12:26:04 +00:00
googlemaps = stdenv.mkDerivation rec {
pname = "googlemaps";
2017-11-01 12:26:04 +00:00
version = "2021-03-19";
2017-11-01 12:26:04 +00:00
src = fetchFromGitHub {
owner = "vladest";
repo = "googlemaps";
rev = "8f7def10c203fd3faa5ef96c5010a7294dca0759";
sha256 = "1irz398g45hk6xizwzd07qcx1ln8f7l6bhjh15f56yc20waqpx1x";
};
2017-11-01 12:26:04 +00:00
nativeBuildInputs = [ qmake ];
buildInputs = [ qtbase qtlocation libXcomposite ];
2017-11-01 12:26:04 +00:00
dontWrapQtApps = true;
2017-11-01 12:26:04 +00:00
pluginsSubdir = "lib/qt-${qtbase.qtCompatVersion}/plugins";
installPhase = ''
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/
'';
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;
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;
src = subsurfaceSrc;
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
qtbase qtconnectivity qtsvg qttools qtwebkit
2021-02-19 10:13:45 +00:00
bluez
];
nativeBuildInputs = [ cmake wrapQtAppsHook pkg-config ];
cmakeFlags = [
2017-11-01 12:26:04 +00:00
"-DLIBDC_FROM_PKGCONFIG=ON"
"-DNO_PRINTING=OFF"
];
2017-11-01 12:26:04 +00:00
passthru = { inherit version libdc googlemaps; };
meta = with lib; {
2017-11-01 12:26:04 +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;
maintainers = with maintainers; [ mguentner adisbladis ];
platforms = platforms.all;
};
}