Merge pull request #108029 from danieldk/brave-update-script

brave: add update script
This commit is contained in:
Daniël de Kok 2021-01-01 10:06:19 +01:00 committed by GitHub
commit 4df737c880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -88,11 +88,11 @@ in
stdenv.mkDerivation rec {
pname = "brave";
version = "1.18.75";
version = "1.18.77";
src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
sha256 = "1njgdw7ml30xs517brc7z7piy6lcylrfjhz6wn1dp7gywsxfgx1h";
sha256 = "AV3bqtWaoy6AVnt8K/Qo+7hguAIsPJPZhgLSeOvJ7JY=";
};
dontConfigure = true;
@ -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";

View File

@ -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"