Merge pull request #240974 from huantianad/webcord-430
webcord: 4.2.0 -> 4.3.0, add updateScript
This commit is contained in:
commit
e4a6be1d85
2 changed files with 27 additions and 9 deletions
|
@ -1,18 +1,28 @@
|
||||||
{ lib, stdenv, buildNpmPackage, fetchFromGitHub, copyDesktopItems
|
{ lib
|
||||||
, python3, pipewire, libpulseaudio, xdg-utils, electron_24, makeDesktopItem }:
|
, buildNpmPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, copyDesktopItems
|
||||||
|
, python3
|
||||||
|
, pipewire
|
||||||
|
, libpulseaudio
|
||||||
|
, xdg-utils
|
||||||
|
, electron_25
|
||||||
|
, makeDesktopItem
|
||||||
|
, nix-update-script
|
||||||
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
pname = "webcord";
|
pname = "webcord";
|
||||||
version = "4.2.0";
|
version = "4.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "SpacingBat3";
|
owner = "SpacingBat3";
|
||||||
repo = "WebCord";
|
repo = "WebCord";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-530iWNvehImwSYt5HnZaqa4TAslrwxAOZi3gRm1K2/w=";
|
hash = "sha256-E/WXAVSCNTDEDaz71LXOHUf/APFO2uSpkTRhlZfQp0E=";
|
||||||
};
|
};
|
||||||
|
|
||||||
npmDepsHash = "sha256-YguZtGn8CT4EqOQWS0GeNGBdZSC3Lj1gFR0ZiegWTJU=";
|
npmDepsHash = "sha256-vGaYjM13seVmRbVPyDIM+qhGTCj6rw/el6Dq3KMzDks=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
|
@ -46,7 +56,7 @@ buildNpmPackage rec {
|
||||||
install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png
|
install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png
|
||||||
|
|
||||||
# Add xdg-utils to path via suffix, per PR #181171
|
# Add xdg-utils to path via suffix, per PR #181171
|
||||||
makeWrapper '${electron_24}/bin/electron' $out/bin/webcord \
|
makeWrapper '${electron_25}/bin/electron' $out/bin/webcord \
|
||||||
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \
|
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \
|
||||||
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}" \
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}" \
|
||||||
|
@ -66,6 +76,8 @@ buildNpmPackage rec {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Discord and Fosscord electron-based client implemented without Discord API";
|
description = "A Discord and Fosscord electron-based client implemented without Discord API";
|
||||||
homepage = "https://github.com/SpacingBat3/WebCord";
|
homepage = "https://github.com/SpacingBat3/WebCord";
|
||||||
|
@ -73,6 +85,6 @@ buildNpmPackage rec {
|
||||||
changelog = "https://github.com/SpacingBat3/WebCord/releases/tag/v${version}";
|
changelog = "https://github.com/SpacingBat3/WebCord/releases/tag/v${version}";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ huantian ];
|
maintainers = with maintainers; [ huantian ];
|
||||||
platforms = electron_24.meta.platforms;
|
platforms = electron_25.meta.platforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, lib
|
, lib
|
||||||
, vencord-web-extension
|
, vencord-web-extension
|
||||||
|
, electron_24
|
||||||
}:
|
}:
|
||||||
webcord.overrideAttrs (old: {
|
|
||||||
|
(webcord.overrideAttrs (old: {
|
||||||
patches = (old.patches or [ ]) ++ [
|
patches = (old.patches or [ ]) ++ [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./add-extension.patch;
|
src = ./add-extension.patch;
|
||||||
|
@ -15,4 +17,8 @@ webcord.overrideAttrs (old: {
|
||||||
description = "Webcord with Vencord web extension";
|
description = "Webcord with Vencord web extension";
|
||||||
maintainers = with maintainers; [ FlafyDev NotAShelf ];
|
maintainers = with maintainers; [ FlafyDev NotAShelf ];
|
||||||
};
|
};
|
||||||
})
|
})).override {
|
||||||
|
# Webcord has updated to electron 25, but that causes a segfault
|
||||||
|
# when launching webcord-vencord on wayland, so downgrade it for now.
|
||||||
|
electron_25 = electron_24;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue