brave: add update script

The Brave package often seems to get very outdated. This is bad for a
browser, where vulnerabilities are high impact.

This change adds an update script, so that r-ryantm will suggest
updates. We find the latest version using their Debian package
database (since we are using the Debian package anyway).
wip/yesman
Daniël de Kok 3 years ago
parent 3d2ffa3dbf
commit 4d9d82632f
  1. 2
      pkgs/applications/networking/browsers/brave/default.nix
  2. 5
      pkgs/applications/networking/browsers/brave/update.sh

@ -147,6 +147,8 @@ stdenv.mkDerivation rec {
ln -sf ${xdg_utils}/bin/xdg-mime $out/opt/brave.com/brave/xdg-mime
'';
passthru.updateScript = ./update.sh;
meta = with stdenv.lib; {
homepage = "https://brave.com/";
description = "Privacy-oriented browser for Desktop and Laptop computers";

@ -0,0 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused common-updater-scripts
version="$(curl -sL https://brave-browser-apt-release.s3.brave.com/dists/stable/main/binary-amd64/Packages | sed -r -n 's/^Version: (.*)/\1/p' | head -n1)"
update-source-version brave "$version"
Loading…
Cancel
Save