firefox-extensions: fix the update script to not grab betas for u-block
This commit is contained in:
parent
a4eb073918
commit
031ce236f3
|
@ -1,11 +1,13 @@
|
|||
{ stdenv
|
||||
, callPackage
|
||||
, concatTextFile
|
||||
, fetchpatch
|
||||
, fetchurl
|
||||
, gnused
|
||||
, jq
|
||||
, lib
|
||||
, newScope
|
||||
, nix-update
|
||||
, nix-update-script
|
||||
, runCommandLocal
|
||||
, strip-nondeterminism
|
||||
|
@ -15,6 +17,18 @@
|
|||
, zip
|
||||
}:
|
||||
let
|
||||
nix-update' = nix-update.overrideAttrs (upstream: {
|
||||
patches = (upstream.patches or []) ++ [
|
||||
(fetchpatch {
|
||||
# u-block releases betas, and worse, deletes them later.
|
||||
# i don't know how to ignore them through the nix-update-script API,
|
||||
# but this patch handles that.
|
||||
name = "github: Use API to properly tag prereleases";
|
||||
url = "https://github.com/Mic92/nix-update/pull/246.patch";
|
||||
hash = "sha256-cwajliS1YMEcS2MtrKtpNn64rWHjwNDLI49LKhnlQYM=";
|
||||
})
|
||||
];
|
||||
});
|
||||
wrapAddon = addon: args:
|
||||
let
|
||||
extid = addon.passthru.extid;
|
||||
|
@ -111,15 +125,7 @@ let
|
|||
cp $src $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
# uBlock mixes X.YY.ZbN and X.YY.ZrcN style.
|
||||
# default nix-update accepts the former but rejects the later as unstable.
|
||||
# that's problematic because beta releases later get pulled.
|
||||
# ideally i'd reject both, but i don't know how.
|
||||
"--version=unstable"
|
||||
];
|
||||
};
|
||||
passthru.updateScript = (nix-update-script.override { nix-update = nix-update'; }) { };
|
||||
passthru.extid = extid;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user