about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2022-11-23 20:37:02 +0800
committerGitHub <noreply@github.com>2022-11-23 20:37:02 +0800
commit689f5904888c41e28c78ff1d19d30484f450863c (patch)
tree64af486b7db1e32d395aeaea6a153950d5765b03 /pkgs/applications/misc
parent1406f51025fb054e6a9f95a411652f6cb8b07d64 (diff)
subsurface: 5.0.2 -> 5.0.10 (#202145)
* subsurface: 5.0.2 -> 5.0.10

* override version detection
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/subsurface/default.nix70
1 files changed, 55 insertions, 15 deletions
diff --git a/pkgs/applications/misc/subsurface/default.nix b/pkgs/applications/misc/subsurface/default.nix
index 10d4ffc77b4b2..55599a87b8615 100644
--- a/pkgs/applications/misc/subsurface/default.nix
+++ b/pkgs/applications/misc/subsurface/default.nix
@@ -1,17 +1,38 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook, cmake, wrapQtAppsHook, pkg-config, qmake
-, curl, grantlee, libgit2, libusb-compat-0_1, libssh2, libxml2, libxslt, libzip, zlib
-, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit, libXcomposite
+{ 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
 , bluez
 }:
 
 let
-  version = "5.0.2";
+  version = "5.0.10";
 
   subsurfaceSrc = (fetchFromGitHub {
     owner = "Subsurface";
     repo = "subsurface";
     rev = "v${version}";
-    sha256 = "1yay06m8p9qp2ghrg8dxavdq55y09apcgdnb7rihgs3hq86k539n";
+    hash = "sha256-KzUBhFGvocaS1VrVT2stvKrj3uVxYka+dyYZUfkIoNs=";
     fetchSubmodules = true;
   });
 
@@ -21,7 +42,7 @@ let
 
     src = subsurfaceSrc;
 
-    prePatch = "cd libdivecomputer";
+    sourceRoot = "source/libdivecomputer";
 
     nativeBuildInputs = [ autoreconfHook ];
 
@@ -30,7 +51,7 @@ let
     enableParallelBuilding = true;
 
     meta = with lib; {
-      homepage = "http://www.libdivecomputer.org";
+      homepage = "https://www.libdivecomputer.org";
       description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
       maintainers = with maintainers; [ mguentner ];
       license = licenses.lgpl21;
@@ -40,14 +61,13 @@ let
 
   googlemaps = stdenv.mkDerivation rec {
     pname = "googlemaps";
-
-    version = "2021-03-19";
+    version = "0.0.0.2";
 
     src = fetchFromGitHub {
       owner = "vladest";
       repo = "googlemaps";
-      rev = "8f7def10c203fd3faa5ef96c5010a7294dca0759";
-      sha256 = "1irz398g45hk6xizwzd07qcx1ln8f7l6bhjh15f56yc20waqpx1x";
+      rev = "v.${version}";
+      hash = "sha256-PfSLFQeCeVNcCVDCZehxyNLQGT6gff5jNxMW8lAaP8c=";
     };
 
     nativeBuildInputs = [ qmake ];
@@ -74,17 +94,37 @@ let
     };
   };
 
-in stdenv.mkDerivation {
+  get-version = writeShellScriptBin "get-version" ''
+    echo -n ${version}
+  '';
+
+in
+stdenv.mkDerivation {
   pname = "subsurface";
   inherit version;
 
   src = subsurfaceSrc;
 
+  postPatch = ''
+    install -m555 -t scripts ${lib.getExe get-version}
+  '';
+
   buildInputs = [
-    libdc googlemaps
-    curl grantlee libgit2 libssh2 libusb-compat-0_1 libxml2 libxslt libzip
-    qtbase qtconnectivity qtsvg qttools qtwebkit
     bluez
+    curl
+    googlemaps
+    grantlee
+    libdc
+    libgit2
+    libssh2
+    libxml2
+    libxslt
+    libzip
+    qtbase
+    qtconnectivity
+    qtsvg
+    qttools
+    qtwebengine
   ];
 
   nativeBuildInputs = [ cmake wrapQtAppsHook pkg-config ];