bypass-paywalls-clean: 3.2.5.0 -> 3.3.4.0; lay the foundation for updateScripts in this repo

note that the hash produced by the updateScript wasn't actually correct
(failed once i attempted to build it). hmm.
This commit is contained in:
Colin 2023-09-22 10:11:44 +00:00
parent 6222998303
commit 68e3bc932f
3 changed files with 30 additions and 2 deletions

9
default.nix Normal file
View File

@ -0,0 +1,9 @@
# limited, non-flake interface to this repo.
# this file exposes the same view into `pkgs` which the flake would see when evaluated.
#
# the primary purpose of this file is so i can run `updateScript`s which expect
# the root to be `default.nix`
{ pkgs ? import <nixpkgs> {} }:
pkgs.appendOverlays [
(import ./overlays/all.nix)
]

View File

@ -276,6 +276,21 @@
program = "${pkgs.feeds.updateScript}";
};
update-bpc = {
# proof-of-concept updater like in nixpkgs
# TODO: extend this to update all my packages
type = "app";
program = let
pkg = pkgs.firefox-extensions.unwrapped.bypass-paywalls-clean;
in builtins.toString (pkgs.writeShellScript "update-bpc" ''
export UPDATE_NIX_NAME=${pkg.name}
export UPDATE_NIX_PNAME=${pkg.pname}
export UPDATE_NIX_OLD_VERSION=${pkg.version}
export UPDATE_NIX_ATTR_PATH=firefox-extensions.unwrapped.bypass-paywalls-clean
${pkgs.lib.escapeShellArgs pkg.updateScript.command}
'');
};
init-feed = {
type = "app";
program = "${pkgs.feeds.initFeedScript}";

View File

@ -1,17 +1,18 @@
{ lib
, fetchFromGitLab
, gitUpdater
, stdenv
, zip
}:
stdenv.mkDerivation rec {
pname = "bypass-paywalls-clean";
version = "3.2.5.0";
version = "3.3.4.0";
src = fetchFromGitLab {
owner = "magnolia1234";
repo = "bypass-paywalls-firefox-clean";
rev = "v${version}";
hash = "sha256-FkAqzJisPdBiElX9ceQS3zfg8zwrsozOquHDagiRKiE=";
hash = "sha256-tgtdtTRLFgkJ7KuwLbLqrrImujKeeSWGEXc274G/YN0=";
};
patches = [
@ -28,6 +29,9 @@ stdenv.mkDerivation rec {
passthru = {
extid = "magnolia@12.34";
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = {