Merge pull request #259899 from Gerg-L/webcord

webcord: 4.4.2 -> 4.4.3

authored by Weijia Wang and committed by GitHub ef83bb17 b8a54ba9

+20 -17
+20 -17
pkgs/applications/networking/instant-messengers/webcord/default.nix
··· 13 13 14 14 buildNpmPackage rec { 15 15 pname = "webcord"; 16 - version = "4.4.2"; 16 + version = "4.4.3"; 17 17 18 18 src = fetchFromGitHub { 19 19 owner = "SpacingBat3"; 20 20 repo = "WebCord"; 21 21 rev = "v${version}"; 22 - hash = "sha256-23YmyRU+xBXpC7bZtBY3RZeVpLFQ3I/Ag5Tvi3m9cIs="; 22 + hash = "sha256-Se73TANnZUvbSe3v4woofRzYARP2h2HjO1kv/5sDRyA="; 23 23 }; 24 24 25 - npmDepsHash = "sha256-gHX5ZdcC46BwMu22G05Q8UhvZ6CtQ1HSf6KLLlN2iX0="; 25 + npmDepsHash = "sha256-O3eFtgDO+2A7PygrLj6iT/rptnG+oR5tD2lhhz6Iwug="; 26 26 27 27 nativeBuildInputs = [ 28 28 copyDesktopItems 29 29 python3 30 30 ]; 31 31 32 - libPath = lib.makeLibraryPath [ 33 - pipewire 34 - libpulseaudio 35 - ]; 36 - 37 32 # npm install will error when electron tries to download its binary 38 33 # we don't need it anyways since we wrap the program with our nixpkgs electron 39 - ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; 34 + env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; 40 35 41 36 # remove husky commit hooks, errors and aren't needed for packaging 42 37 postPatch = '' ··· 44 39 ''; 45 40 46 41 # override installPhase so we can copy the only folders that matter 47 - installPhase = '' 42 + installPhase = 43 + let 44 + libPath = lib.makeLibraryPath [ 45 + libpulseaudio 46 + pipewire 47 + ]; 48 + binPath = lib.makeBinPath [ xdg-utils ]; 49 + in 50 + '' 48 51 runHook preInstall 49 52 50 53 # Remove dev deps that aren't necessary for running the app ··· 56 59 install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png 57 60 58 61 # Add xdg-utils to path via suffix, per PR #181171 59 - makeWrapper '${electron_25}/bin/electron' $out/bin/webcord \ 62 + makeWrapper '${lib.getExe electron_25}' $out/bin/webcord \ 60 63 --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \ 61 - --suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \ 62 - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}" \ 64 + --suffix PATH : "${binPath}" \ 65 + --add-flags "--ozone-platform-hint=auto" \ 63 66 --add-flags $out/lib/node_modules/webcord/ 64 67 65 68 runHook postInstall ··· 78 81 79 82 passthru.updateScript = nix-update-script { }; 80 83 81 - meta = with lib; { 84 + meta = { 82 85 description = "A Discord and SpaceBar electron-based client implemented without Discord API"; 83 86 homepage = "https://github.com/SpacingBat3/WebCord"; 84 87 downloadPage = "https://github.com/SpacingBat3/WebCord/releases"; 85 88 changelog = "https://github.com/SpacingBat3/WebCord/releases/tag/v${version}"; 86 - license = licenses.mit; 89 + license = lib.licenses.mit; 87 90 mainProgram = "webcord"; 88 - maintainers = with maintainers; [ huantian ]; 89 - platforms = platforms.linux; 91 + maintainers = with lib.maintainers; [ huantian ]; 92 + platforms = lib.platforms.linux; 90 93 }; 91 94 }