webcord: name -> pname, suffix xdg-utils to PATH

This commit is contained in:
huantian 2023-03-16 19:07:07 -07:00
parent 6a88bba059
commit 951b5edd72
No known key found for this signature in database
GPG Key ID: 4A0318E04E555DE5

View File

@ -2,7 +2,7 @@
, python3, pipewire, libpulseaudio, xdg-utils, electron_22, makeDesktopItem }:
buildNpmPackage rec {
name = "webcord";
pname = "webcord";
version = "4.1.1";
src = fetchFromGitHub {
@ -24,10 +24,6 @@ buildNpmPackage rec {
libpulseaudio
];
binPath = lib.makeBinPath [
xdg-utils
];
# npm install will error when electron tries to download its binary
# we don't need it anyways since we wrap the program with our nixpkgs electron
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
@ -49,9 +45,10 @@ buildNpmPackage rec {
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
makeWrapper '${electron_22}/bin/electron' $out/bin/webcord \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \
--prefix PATH : "${binPath}" \
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}" \
--add-flags $out/lib/node_modules/webcord/