|
| 1 | +{ |
| 2 | + stdenv, |
| 3 | + cmake, |
| 4 | + curl, |
| 5 | + fetchgit, |
| 6 | + grantlee, |
| 7 | + libdivecomputer, |
| 8 | + libgit2, |
| 9 | + libmarble-ssrf, |
| 10 | + libssh2, |
| 11 | + libxml2, |
| 12 | + libxslt, |
| 13 | + libzip, |
| 14 | + pkgconfig, |
| 15 | + qtbase, |
| 16 | + qtconnectivity, |
| 17 | + qttools, |
| 18 | + qtwebkit, |
| 19 | + sqlite |
| 20 | +}: |
| 21 | + |
| 22 | +stdenv.mkDerivation rec { |
| 23 | + version = "4.5.6"; |
| 24 | + name = "subsurface-${version}"; |
| 25 | + |
| 26 | + # use fetchgit instead of the official tgz is not complete |
| 27 | + src = fetchgit { |
| 28 | + sha256 = "156rqcszy0c4plk2mv7wdd4h7s7mygpq5sdc64pjfs4qvvsdj10f"; |
| 29 | + url = "git://git.subsurface-divelog.org/subsurface"; |
| 30 | + rev = "4d8d7c2a0fa1b4b0e6953d92287c75b6f97472d0"; |
| 31 | + branchName = "v4.5-branch"; |
| 32 | + }; |
| 33 | + |
| 34 | + buildInputs = [ qtbase libdivecomputer libmarble-ssrf libxslt |
| 35 | + libzip libxml2 grantlee qtwebkit qttools |
| 36 | + qtconnectivity libgit2 libssh2 curl ]; |
| 37 | + nativeBuildInputs = [ pkgconfig cmake ]; |
| 38 | + |
| 39 | + enableParallelBuilding = true; |
| 40 | + |
| 41 | + # hack incoming... |
| 42 | + preConfigure = '' |
| 43 | + marble_libs=$(echo $(echo $CMAKE_LIBRARY_PATH | grep -o "/nix/store/[[:alnum:]]*-libmarble-ssrf-[a-zA-Z0-9\-]*/lib")/libssrfmarblewidget.so) |
| 44 | + cmakeFlags="$cmakeFlags -DCMAKE_BUILD_TYPE=Debug \ |
| 45 | + -DMARBLE_LIBRARIES=$marble_libs \ |
| 46 | + -DNO_PRINTING=OFF \ |
| 47 | + -DUSE_LIBGIT23_API=1" |
| 48 | + ''; |
| 49 | + |
| 50 | + meta = with stdenv.lib; { |
| 51 | + description = "Subsurface is an open source divelog program that runs on Windows, Mac and Linux"; |
| 52 | + longDescription = '' |
| 53 | + Subsurface can track single- and multi-tank dives using air, Nitrox or TriMix. |
| 54 | + It allows tracking of dive locations including GPS coordinates (which can also |
| 55 | + conveniently be entered using a map interface), logging of equipment used and |
| 56 | + names of other divers, and lets users rate dives and provide additional notes. |
| 57 | + ''; |
| 58 | + homepage = https://subsurface-divelog.org; |
| 59 | + license = licenses.gpl2; |
| 60 | + maintainers = [ maintainers.mguentner ]; |
| 61 | + platforms = platforms.all; |
| 62 | + }; |
| 63 | + |
| 64 | +} |
0 commit comments