Skip to content

Commit

Permalink
catalyst-browser: init at 3.9.4
Browse files Browse the repository at this point in the history
Signed-off-by: jdev082 <[email protected]>
  • Loading branch information
jdev082 committed Dec 13, 2024
1 parent 445215f commit 7cab2ef
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 5 deletions.
85 changes: 85 additions & 0 deletions pkgs/by-name/ca/catalyst-browser/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
stdenv,
lib,
fetchurl,
appimageTools,
makeWrapper,
electron_33,
electronPackage ? electron_33,
asar,
}:

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

src = fetchurl {
url = "https://github.com/CatalystDevOrg/Catalyst/releases/download/v${version}/catalyst-${version}.AppImage";
hash = "sha256-6t1RAxmRc/1fAQT4Qnd42kh3cxgRZr74k8gwebTb0Ic=";
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/0x0/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 ];
};
}
10 changes: 5 additions & 5 deletions pkgs/development/web/bun/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}:

stdenvNoCC.mkDerivation rec {
version = "1.1.29";
version = "1.1.31";
pname = "bun";

src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}");
Expand Down Expand Up @@ -51,19 +51,19 @@ stdenvNoCC.mkDerivation rec {
sources = {
"aarch64-darwin" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip";
hash = "sha256-RSMuealmdHe7qGFwhK9e51TED3PaCwSqzd4aj2RKMxE=";
hash = "sha256-dOQFfkxCiOFmAr11CjSdSKNpiLERkbVWawAuy8ASkJE=";
};
"aarch64-linux" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip";
hash = "sha256-gY+MDJqDjQamxQsk/CJJVuHsBAfwgrebs/h6nI0HV78=";
hash = "sha256-ZuU14GvAtf1n1sA8amtZUSGp5iJ5qp/SI2wrw4Gwe/4=";
};
"x86_64-darwin" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64-baseline.zip";
hash = "sha256-j5jpgofGcfjto/3CtBsC4QV411lUGdk2wHwLGmLduo4=";
hash = "sha256-qN8ciVHzHH8GgR89GDgfvteMV+YawMUQLiXNwYyN+wU=";
};
"x86_64-linux" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip";
hash = "sha256-RnKczYB/IkUYVBnRktCFhHsmvObQovVMfCilqJq3q1g=";
hash = "sha256-zHitG4Ktt+iCKk9GrC3C4MRSWhUxh89kW9bUeHzqNJs=";
};
};
updateScript = writeShellScript "update-bun" ''
Expand Down

0 comments on commit 7cab2ef

Please sign in to comment.