From 90377526eba1b9d0747f541e21340578369796b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20G=C3=BCntner?= Date: Thu, 10 Nov 2016 13:02:53 +0100 Subject: [PATCH] subsurface: init at 4.5.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Güntner --- pkgs/applications/misc/subsurface/default.nix | 64 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++ 2 files changed, 69 insertions(+) create mode 100644 pkgs/applications/misc/subsurface/default.nix diff --git a/pkgs/applications/misc/subsurface/default.nix b/pkgs/applications/misc/subsurface/default.nix new file mode 100644 index 000000000000..be4a004fb8ba --- /dev/null +++ b/pkgs/applications/misc/subsurface/default.nix @@ -0,0 +1,64 @@ +{ + stdenv, + cmake, + curl, + fetchgit, + grantlee, + libdivecomputer, + libgit2, + libmarble-ssrf, + libssh2, + libxml2, + libxslt, + libzip, + pkgconfig, + qtbase, + qtconnectivity, + qttools, + qtwebkit, + sqlite +}: + +stdenv.mkDerivation rec { + version = "4.5.6"; + name = "subsurface-${version}"; + + # use fetchgit instead of the official tgz is not complete + src = fetchgit { + sha256 = "156rqcszy0c4plk2mv7wdd4h7s7mygpq5sdc64pjfs4qvvsdj10f"; + url = "git://git.subsurface-divelog.org/subsurface"; + rev = "4d8d7c2a0fa1b4b0e6953d92287c75b6f97472d0"; + branchName = "v4.5-branch"; + }; + + buildInputs = [ qtbase libdivecomputer libmarble-ssrf libxslt + libzip libxml2 grantlee qtwebkit qttools + qtconnectivity libgit2 libssh2 curl ]; + nativeBuildInputs = [ pkgconfig cmake ]; + + enableParallelBuilding = true; + + # hack incoming... + preConfigure = '' + marble_libs=$(echo $(echo $CMAKE_LIBRARY_PATH | grep -o "/nix/store/[[:alnum:]]*-libmarble-ssrf-[a-zA-Z0-9\-]*/lib")/libssrfmarblewidget.so) + cmakeFlags="$cmakeFlags -DCMAKE_BUILD_TYPE=Debug \ + -DMARBLE_LIBRARIES=$marble_libs \ + -DNO_PRINTING=OFF \ + -DUSE_LIBGIT23_API=1" + ''; + + meta = with stdenv.lib; { + description = "Subsurface is an open source divelog program that runs on Windows, Mac and Linux"; + 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 = [ maintainers.mguentner ]; + platforms = platforms.all; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da3a256b2a9f..e797055daead 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3718,6 +3718,11 @@ in sstp = callPackage ../tools/networking/sstp {}; + subsurface = + qt55.callPackage ../applications/misc/subsurface { + libgit2 = pkgs.libgit2_0_23; + }; + sudo = callPackage ../tools/security/sudo { }; suidChroot = callPackage ../tools/system/suid-chroot { };