mirror of
https://github.com/elwrcl/heliux.git
synced 2026-10-31 14:38:02 +03:00
chromminmm
This commit is contained in:
1 file changed
+25
-1
@@ -17,7 +17,7 @@ let
|
|||||||
in
|
in
|
||||||
pkgs.fetchurl {
|
pkgs.fetchurl {
|
||||||
name = "${id}.crx";
|
name = "${id}.crx";
|
||||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&os=${os}&arch=${arch}&os_arch=${os_arch}&nacl_arch=x86-64&prod=chromiumcrx&prodchannel=stable&prodversion=120.0.0.0&acceptformat=crx3&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
url = "https://clients2.google.com/service/update2/crx?response=redirect&os=${os}&arch=${arch}&os_arch=${os_arch}&nacl_arch=x86-64&prod=chromiumcrx&prodchannel=stable&prodversion=${cfg.prodversion}&acceptformat=crx3&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||||
inherit hash;
|
inherit hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -29,6 +29,18 @@ let
|
|||||||
src = fetchExtension { inherit id hash; };
|
src = fetchExtension { inherit id hash; };
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
|
# The Web Store answers 204 No Content for extensions that need a newer
|
||||||
|
# browser than `prodversion` claims. fetchurl stores that empty body
|
||||||
|
# happily, so without this check the build succeeds and the extension is
|
||||||
|
# silently missing at runtime.
|
||||||
|
if [ ! -s "$src" ]; then
|
||||||
|
echo "error: the CRX for ${id} is empty." >&2
|
||||||
|
echo "The Chrome Web Store returned no content, which usually means" >&2
|
||||||
|
echo "programs.helium.prodversion (${cfg.prodversion}) is older than the" >&2
|
||||||
|
echo "extension supports. Raise it and re-run the hash prefetch." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
unzip -q $src -d $out || true
|
unzip -q $src -d $out || true
|
||||||
|
|
||||||
@@ -93,6 +105,18 @@ in
|
|||||||
);
|
);
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
prodversion = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "151.0.0.0";
|
||||||
|
description = ''
|
||||||
|
Chrome version advertised to the Web Store when downloading extensions.
|
||||||
|
|
||||||
|
The store replies 204 No Content for any extension that requires a newer
|
||||||
|
browser than this, and an empty body still hashes fine, so too low a
|
||||||
|
value yields extensions that build but are empty. Keep it at or above
|
||||||
|
the Chromium version Helium is based on.
|
||||||
|
'';
|
||||||
|
};
|
||||||
extraFlags = lib.mkOption {
|
extraFlags = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
|||||||
Reference in new issue
Block a user