fix: more changes or whatever

This commit is contained in:
zack 2024-09-23 22:21:44 -04:00
parent 0c65086288
commit e35543d7ab
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
7 changed files with 410 additions and 5 deletions

View file

@ -5,7 +5,7 @@
lib,
...
}: {
wms.sway.enable = true;
wms.hyprland.enable = true;
apps = {
web.librewolf.enable = true;

View file

@ -171,7 +171,7 @@ in {
force_zero_scaling = true;
};
monitor = ["DP-1,2560x1440@240,0x0,1,bitdepth,10" "HDMI-A-1,disable"];
monitor = ["DP-1,2560x1440@240,0x0,1,bitdepth,10" "HDMI-A-1,disable" "DP-2,disable"];
layerrule = [
"blur, ^(gtk-layer-shell)$"
@ -211,7 +211,7 @@ in {
"workspace 4, title:^(.*(Disc|WebC)ord.*)$"
"workspace 4, class:^(.*Slack.*)$"
"workspace 3, title:^(Spotify Premium)$"
"workspace 2, class:^(firefox)$"
"workspace 2, class:^(zen)$"
"opacity 0.0 override,class:^(xwaylandvideobridge)$"
"noanim,class:^(xwaylandvideobridge)$"
"noinitialfocus,class:^(xwaylandvideobridge)$"

View file

@ -24,7 +24,8 @@ in {
enable = true;
settings = rec {
initial_session = {
command = "sway --unsupported-gpu";
# command = "sway --unsupported-gpu";
command = "Hyprland";
user = "zoey";
};
default_session = initial_session;

View file

@ -0,0 +1,210 @@
{
lib,
stdenv,
stdenvNoCC,
fetchFromGitHub,
substituteAll,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
vencord,
electron,
libicns,
jq,
moreutils,
cacert,
pipewire,
libpulseaudio,
autoPatchelfHook,
withTTS ? true,
# Enables the use of vencord from nixpkgs instead of
# letting vesktop manage it's own version
withSystemVencord ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vesktop";
version = "1.5.3";
src = fetchFromGitHub {
owner = "Vencord";
repo = "Vesktop";
rev = "d008f903995c802cb5addd99bd759878c8a3491a";
hash = "sha256-oQr0k+0dOuJgwg51hr3O/OZoD66XOctQK82bu+MY+zE=";
};
# NOTE: This requires pnpm 8.10.0 or newer
# https://github.com/pnpm/pnpm/pull/7214
pnpmDeps = assert lib.versionAtLeast lib.custom.pkgs-unstable.nodePackages.pnpm.version "8.10.0";
stdenvNoCC.mkDerivation {
pname = "${finalAttrs.pname}-pnpm-deps";
inherit
(finalAttrs)
src
version
patches
ELECTRON_SKIP_BINARY_DOWNLOAD
;
nativeBuildInputs = [
cacert
jq
moreutils
lib.custom.pkgs-unstable.nodePackages.pnpm
];
# inspired by https://github.com/NixOS/nixpkgs/blob/763e59ffedb5c25774387bf99bc725df5df82d10/pkgs/applications/misc/pot/default.nix#L56
# and based on https://github.com/NixOS/nixpkgs/pull/290715
installPhase = ''
runHook preInstall
pnpm -v
export HOME=$(mktemp -d)
pnpm config set store-dir $out
# Some packages produce platform dependent outputs. We do not want to cache those in the global store
pnpm config set side-effects-cache false
# pnpm is going to warn us about using --force
# --force allows us to fetch all dependencies including ones that aren't meant for our host platform
pnpm install --force --frozen-lockfile --ignore-script
'';
fixupPhase = ''
runHook preFixup
# Remove timestamp and sort the json files
rm -rf $out/v3/tmp
for f in $(find $out -name "*.json"); do
sed -i -E -e 's/"checkedAt":[0-9]+,//g' $f
jq --sort-keys . $f | sponge $f
done
runHook postFixup
'';
dontConfigure = true;
dontBuild = true;
outputHashMode = "recursive";
outputHash = "sha256-FI2CGnbM5TYnh7+CBU0Bbo9I2RwlbGxb+OF/dlh0r0c=";
};
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
makeWrapper
lib.custom.pkgs-unstable.nodePackages.pnpm
lib.custom.pkgs-unstable.nodePackages.nodejs
];
buildInputs = [
libpulseaudio
pipewire
stdenv.cc.cc.lib
];
patches =
[./disable_update_checking.patch]
++ lib.optional withSystemVencord (substituteAll {
inherit vencord;
src = ./use_system_vencord.patch;
});
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
export STORE_PATH=$(mktemp -d)
cp -Tr "$pnpmDeps" "$STORE_PATH"
chmod -R +w "$STORE_PATH"
pnpm config set store-dir "$STORE_PATH"
pnpm install --frozen-lockfile --ignore-script --offline
patchShebangs node_modules/{*,.*}
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
pnpm build
# using `pnpm exec` here apparently makes it ignore ELECTRON_SKIP_BINARY_DOWNLOAD
./node_modules/.bin/electron-builder \
--dir \
-c.asarUnpack="**/*.node" \
-c.electronDist=${electron}/libexec/electron \
-c.electronVersion=${electron.version}
runHook postBuild
'';
# this is consistent with other nixpkgs electron packages and upstream, as far as I am aware
installPhase = ''
runHook preInstall
mkdir -p $out/opt/Vesktop
cp -r dist/linux-*unpacked/resources $out/opt/Vesktop/
pushd build
${libicns}/bin/icns2png -x icon.icns
for file in icon_*x32.png; do
file_suffix=''${file//icon_}
install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/vesktop.png
done
makeWrapper ${electron}/bin/electron $out/bin/vesktop \
--add-flags $out/opt/Vesktop/resources/app.asar \
${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "vesktop";
desktopName = "Vesktop";
exec = "vesktop %U";
icon = "vesktop";
startupWMClass = "Vesktop";
genericName = "Internet Messenger";
keywords = [
"discord"
"vencord"
"electron"
"chat"
];
categories = [
"Network"
"InstantMessaging"
"Chat"
];
})
];
passthru = {
inherit (finalAttrs) pnpmDeps;
};
meta = {
description = "An alternate client for Discord with Vencord built-in";
homepage = "https://github.com/Vencord/Vesktop";
changelog = "https://github.com/Vencord/Vesktop/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
getchoo
Scrumplex
vgskye
pluiedev
];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
mainProgram = "vesktop";
};
})

View file

@ -0,0 +1,181 @@
diff --git a/package.json b/package.json
index 481c91b..7217e01 100644
--- a/package.json
+++ b/package.json
@@ -24,8 +24,7 @@
"updateMeta": "tsx scripts/utils/updateMeta.mts"
},
"dependencies": {
- "arrpc": "github:OpenAsar/arrpc#5aadc307cb9bf4479f0a12364a253b07a77ace22",
- "electron-updater": "^6.3.4"
+ "arrpc": "github:OpenAsar/arrpc#5aadc307cb9bf4479f0a12364a253b07a77ace22"
},
"optionalDependencies": {
"@vencord/venmic": "^6.1.0"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 18e57ff..a600375 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -16,9 +16,6 @@ importers:
arrpc:
specifier: github:OpenAsar/arrpc#5aadc307cb9bf4479f0a12364a253b07a77ace22
version: https://codeload.github.com/OpenAsar/arrpc/tar.gz/5aadc307cb9bf4479f0a12364a253b07a77ace22(patch_hash=biyukfa6dww2wxujy4eyvkhrti)
- electron-updater:
- specifier: ^6.3.4
- version: 6.3.4
optionalDependencies:
'@vencord/venmic':
specifier: ^6.1.0
@@ -1007,9 +1004,6 @@ packages:
electron-publish@25.0.3:
resolution: {integrity: sha512-wSGm+TFK2lArswIFBPLuIRHbo945s3MCvG5y1xVC57zL/PsrElUkaGH2ERtRrcKNpaDNq77rDA9JnMJhAFJjUg==}
- electron-updater@6.3.4:
- resolution: {integrity: sha512-uZUo7p1Y53G4tl6Cgw07X1yF8Jlz6zhaL7CQJDZ1fVVkOaBfE2cWtx80avwDVi8jHp+I/FWawrMgTAeCCNIfAg==}
-
electron@32.1.2:
resolution: {integrity: sha512-CXe6doFzhmh1U7daOvUzmF6Cj8hssdYWMeEPRnRO6rB9/bbwMlWctcQ7P8NJXhLQ88/vYUJQrJvlJPh8qM0BRQ==}
engines: {node: '>= 12.20.55'}
@@ -1785,15 +1779,9 @@ packages:
lodash.difference@4.5.0:
resolution: {integrity: sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==}
- lodash.escaperegexp@4.1.2:
- resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==}
-
lodash.flatten@4.4.0:
resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==}
- lodash.isequal@4.5.0:
- resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==}
-
lodash.isplainobject@4.0.6:
resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}
@@ -2485,9 +2473,6 @@ packages:
text-table@0.2.0:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
- tiny-typed-emitter@2.1.0:
- resolution: {integrity: sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==}
-
tmp-promise@3.0.3:
resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==}
@@ -3214,7 +3199,7 @@ snapshots:
app-builder-bin@5.0.0-alpha.7: {}
- app-builder-lib@25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)):
+ app-builder-lib@25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)):
dependencies:
'@develar/schema-utils': 2.6.5
'@electron/notarize': 2.3.2
@@ -3229,7 +3214,7 @@ snapshots:
builder-util-runtime: 9.2.5
chromium-pickle-js: 0.2.0
debug: 4.3.7
- dmg-builder: 25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
+ dmg-builder: 25.0.5(electron-builder-squirrel-windows@25.0.5)
ejs: 3.1.10
electron-builder-squirrel-windows: 25.0.5(dmg-builder@25.0.5)
electron-publish: 25.0.3
@@ -3744,9 +3729,9 @@ snapshots:
'@types/react': 17.0.2
moment: 2.30.1
- dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)):
+ dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5):
dependencies:
- app-builder-lib: 25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
+ app-builder-lib: 25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
builder-util: 25.0.3
builder-util-runtime: 9.2.5
fs-extra: 10.1.0
@@ -3789,7 +3774,7 @@ snapshots:
electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5):
dependencies:
- app-builder-lib: 25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
+ app-builder-lib: 25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
archiver: 5.3.2
builder-util: 25.0.3
fs-extra: 10.1.0
@@ -3800,11 +3785,11 @@ snapshots:
electron-builder@25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)):
dependencies:
- app-builder-lib: 25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5)))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
+ app-builder-lib: 25.0.5(dmg-builder@25.0.5(electron-builder-squirrel-windows@25.0.5))(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
builder-util: 25.0.3
builder-util-runtime: 9.2.5
chalk: 4.1.2
- dmg-builder: 25.0.5(electron-builder-squirrel-windows@25.0.5(dmg-builder@25.0.5))
+ dmg-builder: 25.0.5(electron-builder-squirrel-windows@25.0.5)
fs-extra: 10.1.0
is-ci: 3.0.1
lazy-val: 1.0.5
@@ -3828,19 +3813,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- electron-updater@6.3.4:
- dependencies:
- builder-util-runtime: 9.2.5
- fs-extra: 10.1.0
- js-yaml: 4.1.0
- lazy-val: 1.0.5
- lodash.escaperegexp: 4.1.2
- lodash.isequal: 4.5.0
- semver: 7.6.3
- tiny-typed-emitter: 2.1.0
- transitivePeerDependencies:
- - supports-color
-
electron@32.1.2:
dependencies:
'@electron/get': 2.0.3
@@ -4739,12 +4711,8 @@ snapshots:
lodash.difference@4.5.0: {}
- lodash.escaperegexp@4.1.2: {}
-
lodash.flatten@4.4.0: {}
- lodash.isequal@4.5.0: {}
-
lodash.isplainobject@4.0.6: {}
lodash.merge@4.6.2: {}
@@ -5498,8 +5466,6 @@ snapshots:
text-table@0.2.0: {}
- tiny-typed-emitter@2.1.0: {}
-
tmp-promise@3.0.3:
dependencies:
tmp: 0.2.3
diff --git a/src/main/index.ts b/src/main/index.ts
index 2e0d6f7..f8a67e4 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -7,7 +7,6 @@
import "./ipc";
import { app, BrowserWindow, nativeTheme } from "electron";
-import { autoUpdater } from "electron-updater";
import { DATA_DIR } from "./constants";
import { createFirstLaunchTour } from "./firstLaunch";
@@ -19,8 +18,6 @@ import { isDeckGameMode } from "./utils/steamOS";
if (IS_DEV) {
require("source-map-support").install();
-} else {
- autoUpdater.checkForUpdatesAndNotify();
}
// Make the Vencord files use our DATA_DIR
// Make the Vencord files use our DATA_DIR

View file

@ -0,0 +1,13 @@
diff --git a/src/main/constants.ts b/src/main/constants.ts
index d5c5fa6..a1b32f1 100644
--- a/src/main/constants.ts
+++ b/src/main/constants.ts
@@ -16,7 +16,7 @@ export const VENCORD_THEMES_DIR = join(DATA_DIR, "themes");
// needs to be inline require because of circular dependency
// as otherwise "DATA_DIR" (which is used by ./settings) will be uninitialised
export const VENCORD_FILES_DIR =
- (require("./settings") as typeof import("./settings")).Settings.store.vencordDir || join(DATA_DIR, "vencordDist");
+ (require("./settings") as typeof import("./settings")).Settings.store.vencordDir || "@vencord@";
export const USER_AGENT = `Vesktop/${app.getVersion()} (https://github.com/Vencord/Vesktop)`;

View file

@ -87,7 +87,7 @@
environment.systemPackages = [
pkgs.BeatSaberModManager
pkgs.sbctl
pkgs.vesktop
pkgs.custom.vesktop
pkgs.mangohud
pkgs.transmission_4
inputs.agenix.packages.${system}.agenix