firefox-extensions.sidebery: build from source

This commit is contained in:
Colin 2024-04-15 05:25:19 +00:00
parent 2af5bb3d78
commit 7692ab0b3e
2 changed files with 39 additions and 9 deletions

View File

@ -127,6 +127,7 @@ in (lib.makeScope newScope (self: with self; {
ctrl-shift-c-should-copy = callPackage ./ctrl-shift-c-should-copy { };
i-still-dont-care-about-cookies = callPackage ./i-still-dont-care-about-cookies { };
open-in-mpv = callPackage ./open-in-mpv { };
sidebery = callPackage ./sidebery { };
ether-metamask = fetchVersionedAddon rec {
extid = "webextension@metamask.io";
@ -149,15 +150,6 @@ in (lib.makeScope newScope (self: with self; {
version = "1.49";
hash = "sha256-LnR5z3fqNJywlr/khFdV4qloKGQhbxNZQvWCEgz97DU=";
};
sidebery = fetchVersionedAddon rec {
extid = "{3c078156-979c-498b-8990-85f7987dd929}";
pname = "sidebery";
url = let
versionPrefix = lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version));
in "https://github.com/mbnuqw/sidebery/releases/download/v${versionPrefix}/sidebery-${version}.xpi";
version = "5.2.0.7";
hash = "sha256-vbMicJc8c6njx6Rn8TIEktoHSZDzoUr29uX9iFapy0w=";
};
sponsorblock = fetchVersionedAddon rec {
extid = "sponsorBlocker@ajay.app";
pname = "sponsorblock";

View File

@ -0,0 +1,38 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
, gitUpdater
}:
buildNpmPackage rec {
pname = "sidebery";
version = "5.2.0";
src = fetchFromGitHub {
owner = "mbnuqw";
repo = "sidebery";
rev = "v${version}";
hash = "sha256-83n0aX5mJYf1yYamuM+DelkpOGLRZqkXpTgQMAmMLXI=";
};
npmDepsHash = "sha256-wBYjX65Tb3+83NT5625j77qceCADkiS22PsmCdwbJA0=";
postBuild = ''
npm run build.ext
'';
installPhase = ''
cp dist/* "$out"
'';
passthru = {
extid = "{3c078156-979c-498b-8990-85f7987dd929}";
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = {
homepage = "https://github.com/mbnuqw/sidebery";
description = "Firefox extension for managing tabs and bookmarks in sidebar";
maintainer = with lib.maintainers; [ colinsane ];
};
}