From 689f5904888c41e28c78ff1d19d30484f450863c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 23 Nov 2022 20:37:02 +0800 Subject: [PATCH] subsurface: 5.0.2 -> 5.0.10 (#202145) * subsurface: 5.0.2 -> 5.0.10 * override version detection --- pkgs/applications/misc/subsurface/default.nix | 70 +++++++++++++++---- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/misc/subsurface/default.nix b/pkgs/applications/misc/subsurface/default.nix index 10d4ffc77b4b..55599a87b861 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 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9ea4ea90e4a..1e9c072c83e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11716,7 +11716,7 @@ with pkgs; subgit = callPackage ../applications/version-management/git-and-tools/subgit { }; - subsurface = libsForQt514.callPackage ../applications/misc/subsurface { }; + subsurface = libsForQt5.callPackage ../applications/misc/subsurface { }; sudo = callPackage ../tools/security/sudo { };