From b43328f2333b7ad735713a86a851a6e69e3b7a98 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 21 Jul 2025 21:22:09 +0000 Subject: [PATCH] firefox-extensions.sponsorblock: fix first-run check? not sure this is actually necessary w/ auto-updates disabled --- pkgs/firefox-extensions/sponsorblock/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/firefox-extensions/sponsorblock/package.nix b/pkgs/firefox-extensions/sponsorblock/package.nix index fcb240444..64e4d1e8e 100644 --- a/pkgs/firefox-extensions/sponsorblock/package.nix +++ b/pkgs/firefox-extensions/sponsorblock/package.nix @@ -27,10 +27,12 @@ stdenvNoCC.mkDerivation rec { # but web shit is absolutely cursed and building from source requires a fucking PhD # (if you have one, feel free to share your nix package) # - # NB: in source this is `alreadyInstalled: false`, but the build process hates Booleans or something - # TODO(2024/03/23): this is broken (replacement doesn't match). but maybe not necessary anymore? + # NB: source code looks like `alreadyInstalled: false`, the build process converts that to `alreadyInstalled:!1`. + # XXX(2024/03/23): the original replacement doesn't match anymore. + # generated code is liable to shuffle around, so make a best-effort to catch all variants. substituteInPlace js/*.js \ - --replace 'alreadyInstalled:!1' 'alreadyInstalled:!0' + --replace 'alreadyInstalled:!1' 'alreadyInstalled:!0' \ + --replace '!r.default.local.alreadyInstalled' '!1' ''; installPhase = ''