push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
diff --git i/packages/core-extensions/src/moonbase/host.ts w/packages/core-extensions/src/moonbase/host.ts
index 6bb7b62..71b57b9 100644
--- i/packages/core-extensions/src/moonbase/host.ts
+++ w/packages/core-extensions/src/moonbase/host.ts
@@ -79,22 +79,9 @@ electron.app.whenReady().then(() => {
if (!entries.find((e) => e.label === "moonlight")) {
const options: Electron.MenuItemConstructorOptions[] = [
- { label: "Update and restart", click: updateAndRestart },
{ label: "Reset config", click: resetConfig }
];
- if (moonlightHost.branch !== MoonlightBranch.DEV) {
- options.push({
- label: "Switch branch",
- submenu: [MoonlightBranch.STABLE, MoonlightBranch.NIGHTLY].map((branch) => ({
- label: branch,
- type: "radio",
- checked: moonlightHost.branch === branch,
- click: () => changeBranch(branch)
- }))
- });
- }
-
options.push({ label: "About", click: showAbout });
entries.splice(i + 1, 0, {
diff --git i/packages/core-extensions/src/moonbase/native.ts w/packages/core-extensions/src/moonbase/native.ts
index c6e068f..0adc765 100644
--- i/packages/core-extensions/src/moonbase/native.ts
+++ w/packages/core-extensions/src/moonbase/native.ts
@@ -39,24 +39,7 @@ export default function getNatives(): MoonbaseNatives {
return {
async checkForMoonlightUpdate() {
- try {
- if (moonlightGlobal.branch === MoonlightBranch.STABLE) {
- const json = await getStableRelease();
- return json.name !== moonlightGlobal.version ? json.name : null;
- } else if (moonlightGlobal.branch === MoonlightBranch.NIGHTLY) {
- const req = await fetch(nightlyRefUrl, {
- cache: "no-store",
- headers: sharedHeaders
- });
- const ref = (await req.text()).split("\n")[0];
- return ref !== moonlightGlobal.version ? ref : null;
- }
-
- return null;
- } catch (e) {
- logger.error("Error checking for moonlight update", e);
- return null;
- }
+ return null;
},
async updateMoonlight(overrideBranch?: MoonlightBranch) {
diff --git i/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx w/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx
index 133a98f..9414e7a 100644
--- i/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx
+++ w/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx
@@ -106,16 +106,6 @@ function ArrayFormItem({ config }: { config: "repositories" | "devSearchPaths" }
export default function ConfigPage() {
return (
<>
- <div className={Margins.marginTop20}>
- <FormSwitch
- checked={MoonbaseSettingsStore.getExtensionConfigRaw<boolean>("moonbase", "updateChecking", true) ?? true}
- onChange={(value: boolean) => {
- MoonbaseSettingsStore.setExtensionConfig("moonbase", "updateChecking", value);
- }}
- label="Automatic update checking"
- description="Checks for updates to moonlight"
- />
- </div>
<FormItem title="Repositories">
<FormText className={Margins.marginBottom4}>A list of remote repositories to display extensions from</FormText>
<ArrayFormItem config="repositories" />

View File

@@ -0,0 +1,88 @@
{
lib,
stdenv,
pnpm_10,
nodejs_22,
fetchFromGitHub,
nix-update-script,
discord,
discord-ptb,
discord-canary,
discord-development,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "moonlight";
version = "1.3.32";
src = fetchFromGitHub {
owner = "moonlight-mod";
repo = "moonlight";
tag = "v${finalAttrs.version}";
hash = "sha256-aXap/wUjjJTCy2eq7p7BL6ZYOVZEBVY4/YkrDtbIj2Q=";
};
nativeBuildInputs = [
nodejs_22
pnpm_10.configHook
];
pnpmDeps = pnpm_10.fetchDeps {
inherit (finalAttrs) pname version src;
buildInputs = [ nodejs_22 ];
fetcherVersion = 2;
hash = "sha256-gv+PHGbo0IiPgcxi0RAvsNmGLHWZar3SB4eW7NbJRJY=";
};
env = {
NODE_ENV = "production";
MOONLIGHT_BRANCH = "stable";
MOONLIGHT_VERSION = "v${finalAttrs.version} (nixpkgs)";
};
patches = [
./disable_updates.patch
];
buildPhase = ''
runHook preBuild
pnpm run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
passthru = {
updateScript = nix-update-script { };
tests = lib.genAttrs' [ discord discord-ptb discord-canary discord-development ] (
p: lib.nameValuePair p.pname p.tests.withMoonlight
);
};
meta = with lib; {
description = "Discord client modification, focused on enhancing user and developer experience";
longDescription = ''
Moonlight is a ***passion project***yet another Discord client modfocused on providing a decent user
and developer experience. Heavily inspired by hh3 (a private client mod) and the projects before it, namely EndPwn.
All core code is original or used with permission from their respective authors where not copyleft.
'';
homepage = "https://moonlight-mod.github.io";
downloadPage = "https://moonlight-mod.github.io/using/install/#nix";
changelog = "https://raw.githubusercontent.com/moonlight-mod/moonlight/refs/tags/v${finalAttrs.version}/CHANGELOG.md";
license = licenses.lgpl3;
maintainers = with maintainers; [
ilys
FlameFlag
];
};
})