diff options
| author | Fuwn <[email protected]> | 2024-09-14 23:48:25 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-14 23:48:25 -0700 |
| commit | 6d820fe08965a96f7a3e8190642bc88e5b0ebcd1 (patch) | |
| tree | 2c60764e59c9dba04d20094e30ccfbba721437ce /pkgs | |
| parent | system: add encryption module with seahorse (diff) | |
| download | nixos-config-6d820fe08965a96f7a3e8190642bc88e5b0ebcd1.tar.xz nixos-config-6d820fe08965a96f7a3e8190642bc88e5b0ebcd1.zip | |
revert: browsers: use zen-browser-flake
This reverts commit 9c27b0589cce7642036df8346df56f8e729e51d1.
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/zen-browser-bin.nix | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/pkgs/zen-browser-bin.nix b/pkgs/zen-browser-bin.nix new file mode 100644 index 0000000..aa53e96 --- /dev/null +++ b/pkgs/zen-browser-bin.nix @@ -0,0 +1,128 @@ +{ + stdenv, + lib, + fetchzip, + makeDesktopItem, + autoPatchelfHook, + wrapGAppsHook3, + copyDesktopItems, + gtk3, + alsa-lib, + dbus-glib, + xorg, + pciutils, + libva, + pipewire, + libglvnd, +}: +let + desktopItem = makeDesktopItem { + name = "zen-browser"; + desktopName = "Zen Browser"; + genericName = "Web Browser"; + categories = [ + "Network" + "WebBrowser" + ]; + keywords = [ + "internet" + "www" + "browser" + "web" + "explorer" + ]; + exec = "zen %u"; + icon = "zen"; + mimeTypes = [ + "text/html" + "text/xml" + "application/xhtml+xml" + "application/vnd.mozilla.xul+xml" + "x-scheme-handler/http" + "x-scheme-handler/https" + ]; + startupNotify = true; + startupWMClass = "zen-alpha"; + terminal = false; + actions = { + new-window = { + name = "New Window"; + exec = "zen --new-window %u"; + }; + new-private-window = { + name = "New Private Window"; + exec = "zen --private-window %u"; + }; + profile-manager-window = { + name = "Profile Manager"; + exec = "zen --ProfileManager %u"; + }; + }; + }; +in +stdenv.mkDerivation rec { + pname = "zen-browser-bin"; + version = "1.0.0-a.39"; + + src = fetchzip { + url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-specific.tar.bz2"; + hash = "sha256-CcY0BDC3nZspwV1S4SheKn9MzjZRVY7QhqXCnK1Oj78="; + }; + + desktopItems = [ desktopItem ]; + + nativeBuildInputs = [ + autoPatchelfHook + wrapGAppsHook3 + copyDesktopItems + ]; + + buildInputs = [ + gtk3 + alsa-lib + dbus-glib + xorg.libXtst + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib + cp -r $src $out/lib/zen/ + + mkdir -p $out/bin + ln -s $out/lib/zen/zen $out/bin/zen + + for n in {16,32,48,64,128}; do + size=$n"x"$n + mkdir -p $out/share/icons/hicolor/$size/apps + file="default"$n".png" + cp $out/lib/zen/browser/chrome/icons/default/$file $out/share/icons/hicolor/$size/apps/zen.png + done + + runHook postInstall + ''; + + preFixup = '' + gappsWrapperArgs+=( + --prefix LD_LIBRARY_PATH : "${ + lib.makeLibraryPath [ + pciutils + pipewire + libva + libglvnd + ] + }" + ) + gappsWrapperArgs+=(--set MOZ_LEGACY_PROFILES 1) + wrapGApp $out/lib/zen/zen + ''; + + meta = with lib; { + license = licenses.mpl20; + maintainers = with maintainers; [ mordrag ]; + description = "Experience tranquillity while browsing the web without people tracking you! "; + platforms = platforms.linux; + mainProgram = "zen"; + }; +} |