16 src = fetchFromGitHub {
17 owner = "SpacingBat3";
20 hash = "sha256-x9Ejb8yxgQhlEfUUfoqbgSffNNtOoFeAyb3OISR+Jz4=";
23 npmDepsHash = "sha256-7H4I4vKygMgsPh+OvZZGhpkoQQu1a51yUTwEPJSBM18=";
30 # npm install will error when electron tries to download its binary
31 # we don't need it anyways since we wrap the program with our nixpkgs electron
32 env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
34 # remove husky commit hooks, errors and aren't needed for packaging
39 # override installPhase so we can copy the only folders that matter
42 binPath = lib.makeBinPath [ xdg-utils ];
47 # Remove dev deps that aren't necessary for running the app
50 mkdir -p $out/lib/node_modules/webcord
51 cp -r app node_modules sources package.json $out/lib/node_modules/webcord/
53 install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png
55 # Add xdg-utils to path via suffix, per PR #181171
56 makeWrapper '${lib.getExe electron_29}' $out/bin/webcord \
57 --suffix PATH : "${binPath}" \
58 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
59 --add-flags $out/lib/node_modules/webcord/
69 desktopName = "WebCord";
70 comment = meta.description;
71 categories = [ "Network" "InstantMessaging" ];
75 passthru.updateScript = nix-update-script { };
78 description = "A Discord and SpaceBar electron-based client implemented without Discord API";
79 homepage = "https://github.com/SpacingBat3/WebCord";
80 downloadPage = "https://github.com/SpacingBat3/WebCord/releases";
81 changelog = "https://github.com/SpacingBat3/WebCord/releases/tag/v${version}";
82 license = lib.licenses.mit;
83 mainProgram = "webcord";
84 maintainers = with lib.maintainers; [ eclairevoyant huantian ];
85 platforms = lib.platforms.linux;