mullvad-browser: add passthru.updateScript

This commit is contained in:
Felix Schröter 2023-05-13 23:55:09 +02:00
parent e9d18d3644
commit c54e256d2c
No known key found for this signature in database
GPG Key ID: 671E39E6744C807D

View File

@ -6,6 +6,7 @@
, makeWrapper
, writeText
, wrapGAppsHook
, callPackage
# Common run-time dependencies
, zlib
@ -79,7 +80,7 @@ let
version = "12.0.6";
srcs = {
sources = {
x86_64-linux = fetchurl {
url = "https://cdn.mullvad.net/browser/${version}/mullvad-browser-linux64-${version}_ALL.tar.xz";
hash = "sha256-XE6HFU38FhnikxGHRHxIGS3Z3Y2JNWH0yq2NejqbROI=";
@ -103,7 +104,7 @@ stdenv.mkDerivation rec {
pname = "mullvad-browser";
inherit version;
src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
nativeBuildInputs = [ copyDesktopItems makeWrapper wrapGAppsHook ];
@ -219,10 +220,19 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
passthru = {
inherit sources;
updateScript = callPackage ../tor-browser-bundle-bin/update.nix {
inherit pname version meta;
baseUrl = "https://cdn.mullvad.net/browser/";
prefix = "mullvad-browser-";
};
};
meta = with lib; {
description = "Privacy-focused browser made in a collaboration between The Tor Project and Mullvad";
homepage = "https://mullvad.net/en/browser";
platforms = attrNames srcs;
platforms = attrNames sources;
maintainers = with maintainers; [ felschr ];
# MPL2.0+, GPL+, &c. While it's not entirely clear whether
# the compound is "libre" in a strict sense (some components place certain