sub-store: init at 2.20.61; sub-store-frontend: init at 2.15.85 (#472396)

This commit is contained in:
Sizhe Zhao
2026-01-01 04:53:06 +00:00
committed by GitHub
2 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
pnpm_10,
pnpm ? pnpm_10,
fetchPnpmDeps,
pnpmConfigHook,
nix-update-script,
nodejs,
}:
buildNpmPackage (finalAttrs: {
pname = "sub-store-frontend";
version = "2.15.85";
src = fetchFromGitHub {
owner = "sub-store-org";
repo = "Sub-Store-Front-End";
tag = finalAttrs.version;
hash = "sha256-K7tAqbM7cQpmZmRQFwJhpiesUoPzvXEKu5q0pYsj+ZA=";
};
nativeBuildInputs = [
nodejs
pnpm
];
npmDeps = null;
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-HEeNYLKvzO/RQWYnm5gqRjTrXiiCxKUxf3bcRvz+O4k=";
};
npmConfigHook = pnpmConfigHook;
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Sub-Store Progressive Web App";
homepage = "https://github.com/sub-store-org/Sub-Store-Front-End";
changelog = "https://github.com/sub-store-org/Sub-Store-Front-End/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ moraxyc ];
platforms = nodejs.meta.platforms;
};
})

View File

@@ -0,0 +1,72 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
pnpm_10,
pnpm ? pnpm_10,
fetchPnpmDeps,
pnpmConfigHook,
makeBinaryWrapper,
nix-update-script,
nodejs,
}:
buildNpmPackage (finalAttrs: {
pname = "sub-store";
version = "2.20.61";
src = fetchFromGitHub {
owner = "sub-store-org";
repo = "Sub-Store";
tag = finalAttrs.version;
hash = "sha256-6NHPVCIlModWXzKOJnPwA41cHrNWy6yXUEwoKpbwpmw=";
};
sourceRoot = "${finalAttrs.src.name}/backend";
nativeBuildInputs = [
makeBinaryWrapper
pnpm
];
npmDeps = null;
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs)
pname
version
src
sourceRoot
;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-VsK6qvBeOF2smXRFmMk4gWxQgAD1GG/ExvZdIERdz9g=";
};
npmConfigHook = pnpmConfigHook;
npmBuildScript = "bundle:esbuild";
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r dist $out/share/sub-store
makeWrapper ${lib.getExe nodejs} $out/bin/sub-store \
--add-flags "$out/share/sub-store/sub-store.bundle.js"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Advanced Subscription Manager for QX, Loon, Surge, Stash, Egern and Shadowrocket";
homepage = "https://github.com/sub-store-org/Sub-Store";
changelog = "https://github.com/sub-store-org/Sub-Store/releases/tag/${finalAttrs.version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "sub-store";
platforms = nodejs.meta.platforms;
};
})