Unverified Commit 3bb1754d authored by Leona Maroni's avatar Leona Maroni
Browse files

catalyst-browser: drop

catalyst is electron browser which are unsafe be design due to lack of
proper sandboxing.

The package also seems unmaintained upstream.
Updates were not backported too, which is not accaptable for a browser.

Also, it has no commiter among its maintainers, which [is required](https://github.com/NixOS/nixpkgs/tree/master/pkgs#quick-start-to-adding-a-package).
parent 78658c0c
Loading
Loading
Loading
Loading
+0 −85
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  fetchurl,
  appimageTools,
  makeWrapper,
  electron_33,
  electronPackage ? electron_33,
  asar,
}:

let
  electron = electronPackage;
in
stdenv.mkDerivation rec {
  pname = "catalyst-browser";
  version = "3.9.6";

  src = fetchurl {
    url = "https://github.com/CatalystDevOrg/Catalyst/releases/download/v${version}/catalyst-${version}.AppImage";
    hash = "sha256-aqEwVykPt6p3HjDAsr7N/+uHnEK5yTUAgCsaT7OmI0w=";
    name = "catalyst-${version}.AppImage";
  };

  appimageContents = appimageTools.extractType2 {
    inherit pname src version;
  };

  dontUnpack = true;
  dontConfigure = true;
  dontBuild = true;

  nativeBuildInputs = [
    makeWrapper
    asar
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin $out/share/catalyst $out/share/applications
    mkdir -p $out/share/catalyst/resources/

    cp -a ${appimageContents}/locales $out/share/catalyst
    cp -a ${appimageContents}/catalyst.desktop $out/share/applications/catalyst.desktop
    mkdir -p $out/share/pixmaps
    cp -r ${appimageContents}/usr/share/icons/hicolor/1080x1080/apps/catalyst.png $out/share/pixmaps/
    asar extract ${appimageContents}/resources/app.asar resources/
    rm -rf resources/.github
    rm -rf resources/.vscode
    rm -rf resources/.eslintrc.json
    rm -rf resources/.gitignore
    rm -rf resources/.pnpm-debug.log
    rm -rf resources/contributing.md
    rm -rf resources/pnpm-lock.yaml
    rm -rf resources/README.md
    rm -rf resources/CODE_OF_CONDUCT.md
    rm -rf *.nix
    substituteInPlace resources/src/index.html \
      --replace-fail 'catalyst-default-distrib' 'catalyst-default-nixpkgs'

    substituteInPlace $out/share/applications/catalyst.desktop \
      --replace-fail 'Exec=AppRun' 'Exec=${meta.mainProgram}'

    asar pack resources/ $out/share/catalyst/resources/app.asar

    runHook postInstall
  '';

  postFixup = ''
    makeWrapper ${electron}/bin/electron $out/bin/${meta.mainProgram} \
      --add-flags $out/share/catalyst/resources/app.asar \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
  '';

  meta = {
    description = "Minimal, functional, and customizable user-focused FOSS web browser based on Chromium";
    homepage = "https://getcatalyst.eu.org";
    license = lib.licenses.mit;
    mainProgram = "catalyst";
    maintainers = with lib.maintainers; [ jdev082 ];
    platforms = [ "x86_64-linux" ];
    sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -412,6 +412,7 @@ mapAliases {
  cassandra_3_0 = throw "'cassandra_3_0' has been removed has it reached end-of-life"; # Added 2025-03-23
  cassandra_3_11 = throw "'cassandra_3_11' has been removed has it reached end-of-life"; # Added 2025-03-23
  cawbird = throw "cawbird has been abandoned upstream and is broken anyways due to Twitter closing its API";
  catalyst-browser = throw "'catalyst-browser' has been removed due to a lack of maintenance and not satisfying our security criteria for browsers."; # Added 2025-06-25
  cde = throw "'cde' has been removed as it is unmaintained and broken"; # Added 2025-05-17
  centerim = throw "centerim has been removed due to upstream disappearing"; # Added 2025-04-18
  certmgr-selfsigned = certmgr; # Added 2023-11-30