12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
20 hash = "sha256-YmNRkNN7lWHMbUiGOxPa9b+TaLybj1XE7AonCnB88KY=";
23 nativeBuildInputs = [ pnpm.configHook nodejs makeWrapper copyDesktopItems ];
25 pnpmDeps = pnpm.fetchDeps {
26 inherit pname version src;
27 hash = "sha256-ZPTp6l7qtvgsYPY6FZvhuYxD8TdkBkaQO2SG1fQzU7s=";
30 ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
37 npm exec electron-builder -- \
39 -c.electronDist="${electron_32.dist}" \
40 -c.electronVersion="${electron_32.version}"
48 mkdir -p "$out/share/lib/legcord"
49 cp -r ./dist/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/legcord"
51 install -Dm644 "build/icon.png" "$out/share/icons/hicolor/256x256/apps/legcord.png"
53 makeShellWrapper "${lib.getExe electron_32}" "$out/bin/legcord" \
54 --add-flags "$out/share/lib/legcord/resources/app.asar" \
55 "''${gappsWrapperArgs[@]}" \
56 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
57 --set-default ELECTRON_IS_DEV 0 \
66 desktopName = "Legcord";
69 comment = meta.description;
70 categories = [ "Network" ];
71 startupWMClass = "Legcord";
76 passthru.updateScript = nix-update-script { };
79 description = "Lightweight, alternative desktop client for Discord";
80 homepage = "https://legcord.app";
81 downloadPage = "https://github.com/Legcord/Legcord";
82 license = licenses.osl3;
83 maintainers = with maintainers; [ wrmilling water-sucks ];
84 platforms = [ "x86_64-linux" "aarch64-linux" ];
85 mainProgram = "legcord";