about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/webcord/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/webcord/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/webcord/default.nix96
1 files changed, 0 insertions, 96 deletions
diff --git a/pkgs/applications/networking/instant-messengers/webcord/default.nix b/pkgs/applications/networking/instant-messengers/webcord/default.nix
deleted file mode 100644
index d2796142e8f7d..0000000000000
--- a/pkgs/applications/networking/instant-messengers/webcord/default.nix
+++ /dev/null
@@ -1,96 +0,0 @@
-{ lib
-, buildNpmPackage
-, fetchFromGitHub
-, copyDesktopItems
-, python3
-, pipewire
-, libpulseaudio
-, libnotify
-, xdg-utils
-, electron_29
-, makeDesktopItem
-, nix-update-script
-}:
-
-buildNpmPackage rec {
-  pname = "webcord";
-  version = "4.8.0";
-
-  src = fetchFromGitHub {
-    owner = "SpacingBat3";
-    repo = "WebCord";
-    rev = "v${version}";
-    hash = "sha256-x9Ejb8yxgQhlEfUUfoqbgSffNNtOoFeAyb3OISR+Jz4=";
-  };
-
-  npmDepsHash = "sha256-7H4I4vKygMgsPh+OvZZGhpkoQQu1a51yUTwEPJSBM18=";
-
-  nativeBuildInputs = [
-    copyDesktopItems
-    python3
-  ];
-
-  # 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
-  env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
-
-  # remove husky commit hooks, errors and aren't needed for packaging
-  postPatch = ''
-    rm -rf .husky
-  '';
-
-  # override installPhase so we can copy the only folders that matter
-  installPhase =
-    let
-      libPath = lib.makeLibraryPath [
-        libpulseaudio
-        pipewire
-        libnotify
-      ];
-      binPath = lib.makeBinPath [ xdg-utils ];
-    in
-  ''
-    runHook preInstall
-
-    # Remove dev deps that aren't necessary for running the app
-    npm prune --omit=dev
-
-    mkdir -p $out/lib/node_modules/webcord
-    cp -r app node_modules sources package.json $out/lib/node_modules/webcord/
-
-    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 '${lib.getExe electron_29}' $out/bin/webcord \
-      --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \
-      --suffix PATH : "${binPath}" \
-      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
-      --add-flags $out/lib/node_modules/webcord/
-
-    runHook postInstall
-  '';
-
-  desktopItems = [
-    (makeDesktopItem {
-      name = "webcord";
-      exec = "webcord";
-      icon = "webcord";
-      desktopName = "WebCord";
-      comment = meta.description;
-      categories = [ "Network" "InstantMessaging" ];
-    })
-  ];
-
-  passthru.updateScript = nix-update-script { };
-
-  meta = {
-    description = "A Discord and SpaceBar electron-based client implemented without Discord API";
-    homepage = "https://github.com/SpacingBat3/WebCord";
-    downloadPage = "https://github.com/SpacingBat3/WebCord/releases";
-    changelog = "https://github.com/SpacingBat3/WebCord/releases/tag/v${version}";
-    license = lib.licenses.mit;
-    mainProgram = "webcord";
-    maintainers = with lib.maintainers; [ eclairevoyant huantian ];
-    platforms = lib.platforms.linux;
-  };
-}