mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
google-chrome: add update-script
This commit is contained in:
parent
d49f993b39
commit
d95e9bf3a6
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, patchelf, makeWrapper, fetchurl
|
||||
{ lib, stdenv, patchelf, makeWrapper, fetchurl, writeScript
|
||||
|
||||
# Linked dynamic libraries.
|
||||
, glib, fontconfig, freetype, pango, cairo, libX11, libXi, atk, nss, nspr
|
||||
@ -142,6 +142,17 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-google-chrome.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
url="https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions/all/releases"
|
||||
response=$(curl --silent $url)
|
||||
version=$(jq ".releases[0].version" --raw-output <<< "$response")
|
||||
update-source-version ${finalAttrs.pname} "$version" --ignore-same-hash
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A freeware web browser developed by Google";
|
||||
homepage = "https://www.google.com/chrome/browser/";
|
||||
|
Loading…
Reference in New Issue
Block a user