From 0687f98f5e8f293c19ee4de018a4389d355c55b8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 28 Aug 2024 22:35:07 -0700 Subject: hi --- home/ebisu/meta/multimedia/browser/default.nix | 2 +- home/ebisu/meta/multimedia/browser/thorium.nix | 28 +---- .../meta/multimedia/browser/zen-browser-bin.nix | 128 --------------------- home/ebisu/meta/multimedia/image/ahoviewer.nix | 54 --------- home/ebisu/meta/multimedia/image/default.nix | 2 +- home/ebisu/meta/network/smolnet/bollux.nix | 6 + home/ebisu/meta/network/smolnet/bollux/default.nix | 65 ----------- .../network/smolnet/bollux/fix_lesskey_nag.patch | 13 --- home/ebisu/meta/network/smolnet/default.nix | 2 +- home/ebisu/meta/network/tools/http/default.nix | 5 +- home/ebisu/meta/network/tools/http/httpie.nix | 6 + .../meta/network/tools/http/httpie/default.nix | 6 - .../ebisu/meta/network/tools/http/yaak/default.nix | 28 ----- pkgs/ahoviewer.nix | 54 +++++++++ pkgs/bollux/default.nix | 42 +++++++ pkgs/bollux/fix_lesskey_nag.patch | 13 +++ pkgs/thorium.nix | 25 ++++ pkgs/yaak.nix | 28 +++++ pkgs/zen-browser-bin.nix | 128 +++++++++++++++++++++ 19 files changed, 310 insertions(+), 325 deletions(-) delete mode 100644 home/ebisu/meta/multimedia/browser/zen-browser-bin.nix delete mode 100644 home/ebisu/meta/multimedia/image/ahoviewer.nix create mode 100644 home/ebisu/meta/network/smolnet/bollux.nix delete mode 100644 home/ebisu/meta/network/smolnet/bollux/default.nix delete mode 100644 home/ebisu/meta/network/smolnet/bollux/fix_lesskey_nag.patch create mode 100644 home/ebisu/meta/network/tools/http/httpie.nix delete mode 100644 home/ebisu/meta/network/tools/http/httpie/default.nix delete mode 100644 home/ebisu/meta/network/tools/http/yaak/default.nix create mode 100644 pkgs/ahoviewer.nix create mode 100644 pkgs/bollux/default.nix create mode 100644 pkgs/bollux/fix_lesskey_nag.patch create mode 100644 pkgs/thorium.nix create mode 100644 pkgs/yaak.nix create mode 100644 pkgs/zen-browser-bin.nix diff --git a/home/ebisu/meta/multimedia/browser/default.nix b/home/ebisu/meta/multimedia/browser/default.nix index 176bc9c..0eaa3ed 100644 --- a/home/ebisu/meta/multimedia/browser/default.nix +++ b/home/ebisu/meta/multimedia/browser/default.nix @@ -14,6 +14,6 @@ web-ext firefox tor-browser - (pkgs.callPackage ./zen-browser-bin.nix { }) + (pkgs.callPackage ../../../../../pkgs/zen-browser-bin.nix { }) ]; } diff --git a/home/ebisu/meta/multimedia/browser/thorium.nix b/home/ebisu/meta/multimedia/browser/thorium.nix index e789275..20cdb73 100644 --- a/home/ebisu/meta/multimedia/browser/thorium.nix +++ b/home/ebisu/meta/multimedia/browser/thorium.nix @@ -1,30 +1,6 @@ -{ pkgs, lib, ... }: -let - thorium-archive = pkgs.fetchurl { - url = "https://github.com/Alex313031/thorium/releases/download/M126.0.6478.246/Thorium_Browser_126.0.6478.246_Th24_SSE4.AppImage"; - hash = "sha256-izYbx/mSA+l7fAh917SauHopk3UlUJo+7NjkyIGpnNA="; - }; - - version = "126.0.6478.246_Th24"; - - # https://discourse.nixos.org/t/creating-a-nix-derivation-for-an-appimage/31927 - thorium = pkgs.appimageTools.wrapType2 { - pname = "thorium"; - version = version; - src = "${thorium-archive}"; - - meta = with lib; { - description = "Chromium fork named after radioactive element No. 90. Windows and MacOS/Raspi/Android/Special builds are in different repositories, links are towards the top of the README.md."; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - homepage = "https://thorium.rocks/"; - license = licenses.bsd3; - platforms = platforms.linux; - mainProgram = "thorium-browser"; - }; - }; -in +{ pkgs, ... }: { - home.packages = [ thorium ]; + home.packages = [ (pkgs.callPackage ../../../../../pkgs/thorium.nix { }) ]; xdg.configFile."thorium-flags.conf".text = '' --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer,TouchpadOverscrollHistoryNavigation diff --git a/home/ebisu/meta/multimedia/browser/zen-browser-bin.nix b/home/ebisu/meta/multimedia/browser/zen-browser-bin.nix deleted file mode 100644 index 51a95db..0000000 --- a/home/ebisu/meta/multimedia/browser/zen-browser-bin.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ - 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.32"; - - src = fetchzip { - url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-specific.tar.bz2"; - hash = "sha256-5Z+RG5UwSHM6sC1WT5KHgwL0cco2DlMTSteEfnLGrlo="; - }; - - 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"; - }; -} diff --git a/home/ebisu/meta/multimedia/image/ahoviewer.nix b/home/ebisu/meta/multimedia/image/ahoviewer.nix deleted file mode 100644 index 38524dc..0000000 --- a/home/ebisu/meta/multimedia/image/ahoviewer.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ - pkgs ? import { }, -}: -pkgs.stdenv.mkDerivation rec { - pname = "ahoviewer"; - version = "42e16f9"; - - src = pkgs.fetchFromGitHub { - owner = "ahodesuka"; - repo = pname; - rev = "42e16f94b78496e3e346f0d127baa569039a6757"; - sha256 = "sha256-HcijKiExwyBoWDvMlJ5AMA0U7BtS9EfcA54nfQ/iGvE="; - }; - - buildInputs = with pkgs; [ - meson - ninja - gtkmm3 - gtk3 - libconfig - libxml2 - curl - gst_all_1.gstreamer - gst_all_1.gst-plugins-base - libpeas - libsecret - libzip - ]; - - nativeBuildInputs = [ pkgs.pkg-config ]; - - configurePhase = '' - meson setup build --buildtype=release - ''; - - buildPhase = '' - cd build - ninja - cd .. - ''; - - installPhase = '' - mkdir -p $out/bin - cp build/src/ahoviewer $out/bin - ''; - - meta = with pkgs.lib; { - description = "A GTK image viewer, manga reader, and booru browser"; - homepage = "https://github.com/ahodesuka/ahoviewer"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - platforms = platforms.linux; - }; -} diff --git a/home/ebisu/meta/multimedia/image/default.nix b/home/ebisu/meta/multimedia/image/default.nix index 5ff22b8..ddebfeb 100644 --- a/home/ebisu/meta/multimedia/image/default.nix +++ b/home/ebisu/meta/multimedia/image/default.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { home.packages = with pkgs; [ - (pkgs.callPackage ./ahoviewer.nix { }) + (pkgs.callPackage ../../../../../pkgs/ahoviewer.nix { }) emulsion feh imv diff --git a/home/ebisu/meta/network/smolnet/bollux.nix b/home/ebisu/meta/network/smolnet/bollux.nix new file mode 100644 index 0000000..4e2b05d --- /dev/null +++ b/home/ebisu/meta/network/smolnet/bollux.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ... }: +{ + home.packages = with pkgs; [ (pkgs.callPackage ../../../../../pkgs/bollux { }) ]; + + xdg.configFile."bollux/bollux.conf".text = ''''; +} diff --git a/home/ebisu/meta/network/smolnet/bollux/default.nix b/home/ebisu/meta/network/smolnet/bollux/default.nix deleted file mode 100644 index 4d26eee..0000000 --- a/home/ebisu/meta/network/smolnet/bollux/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ pkgs, lib, ... }: -let - bollux = - pkgs.stdenvNoCC.mkDerivation rec { - pname = "bollux"; - version = "0.4.1"; - - nativeBuildInputs = [ - pkgs.makeWrapper - ]; - - buildInputs = [ - pkgs.bashInteractive - ]; - - dontBuild = true; - - makeFlags = [ - "PREFIX=$(out)" - ]; - - src = pkgs.fetchFromGitea { - domain = "tildegit.org"; - owner = "acdw"; - repo = "bollux"; - rev = "f472e60f1164f0dc025d06db2a13ff4e8ebee1a2"; - hash = "sha256-mo2qWCPfW+dUaYcJLsos/vR5nJ8n1eABy8Zy8OZsfVg="; - }; - - patches = [ - # https://tildegit.org/acdw/bollux/issues/13#issuecomment-9786 - ./fix_lesskey_nag.patch - ]; - - postInstall = '' - wrapProgram $out/bin/bollux --prefix PATH : ${lib.makeBinPath [ - pkgs.bashInteractive - pkgs.iconv - pkgs.openssl - pkgs.less - pkgs.coreutils - ]} - ''; - - meta = with lib; { - description = "a Gemini browser in like, idk, 96% pure Bash"; - homepage = "https://tildegit.org/acdw/bollux"; - license = licenses.mit; - platforms = platforms.all; - mainProgram = "bollux"; - }; - }; -in -{ - home.packages = [ - # I'll update this later and move the above derivation to its own package - # once I push my entire NixOS system configuration. - # (pkgs.callPackage /path/to/pkgs/bollux.nix { - # src = bollux; - # }) - bollux - ]; - - xdg.configFile."bollux/bollux.conf".text = ''''; -} diff --git a/home/ebisu/meta/network/smolnet/bollux/fix_lesskey_nag.patch b/home/ebisu/meta/network/smolnet/bollux/fix_lesskey_nag.patch deleted file mode 100644 index 329b886..0000000 --- a/home/ebisu/meta/network/smolnet/bollux/fix_lesskey_nag.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/bollux w/bollux -index 267418e..090217e 100755 ---- i/bollux -+++ w/bollux -@@ -1130,7 +1130,7 @@ display() { # display METADATA [TITLE] - # text, and pre-formatted text shouldn't wrap. - less_cmd+=(-S) - # Load the keybindings (see `lesskey'). -- mklesskey && less_cmd+=(-k "$BOLLUX_LESSKEY") -+ mklesskey && less_cmd+=(--lesskey-src="$BOLLUX_LESSKEY") - local helpline="${KEY_OPEN}:open, " - helpline+="${KEY_GOTO}/" - helpline+="${KEY_GOTO_FROM}:goto, " diff --git a/home/ebisu/meta/network/smolnet/default.nix b/home/ebisu/meta/network/smolnet/default.nix index 93003c1..7fee28f 100644 --- a/home/ebisu/meta/network/smolnet/default.nix +++ b/home/ebisu/meta/network/smolnet/default.nix @@ -1,6 +1,6 @@ { pkgs, config, ... }: { - imports = [ ./bollux ]; + imports = [ ./bollux.nix ]; home.packages = with pkgs; [ amfora diff --git a/home/ebisu/meta/network/tools/http/default.nix b/home/ebisu/meta/network/tools/http/default.nix index 59d6efc..b47540f 100644 --- a/home/ebisu/meta/network/tools/http/default.nix +++ b/home/ebisu/meta/network/tools/http/default.nix @@ -1,8 +1,9 @@ { pkgs, ... }: { imports = [ - ./httpie - ./yaak + ./httpie.nix ./wget.nix ]; + + home.packages = [ (pkgs.callPackage ../../../../../../pkgs/yaak.nix { }) ]; } diff --git a/home/ebisu/meta/network/tools/http/httpie.nix b/home/ebisu/meta/network/tools/http/httpie.nix new file mode 100644 index 0000000..b917245 --- /dev/null +++ b/home/ebisu/meta/network/tools/http/httpie.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ + httpie + httpie-desktop + ]; +} diff --git a/home/ebisu/meta/network/tools/http/httpie/default.nix b/home/ebisu/meta/network/tools/http/httpie/default.nix deleted file mode 100644 index b917245..0000000 --- a/home/ebisu/meta/network/tools/http/httpie/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - httpie - httpie-desktop - ]; -} diff --git a/home/ebisu/meta/network/tools/http/yaak/default.nix b/home/ebisu/meta/network/tools/http/yaak/default.nix deleted file mode 100644 index 05bf0e7..0000000 --- a/home/ebisu/meta/network/tools/http/yaak/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, lib, ... }: -let - yaak-archive = pkgs.fetchzip { - url = "https://releases.yaak.app/releases/2024.6.6/yaak_2024.6.6_amd64.AppImage.tar.gz"; - hash = "sha256-Qnc4RlQmQWHARreQ69jAshq57bZ56Yt5a35jpTjGwNU="; - }; - - version = "2024.6.6"; - - # https://discourse.nixos.org/t/creating-a-nix-derivation-for-an-appimage/31927 - yaak = pkgs.appimageTools.wrapType2 { - pname = "yaak"; - version = version; - src = "${yaak-archive}/yaak_${version}_amd64.AppImage"; - - meta = with lib; { - description = "Play with APIs, intuitively"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - homepage = "https://yaak.app/"; - license = licenses.unfree; - platforms = platforms.linux; - mainProgram = "yaak"; - }; - }; -in -{ - home.packages = [ yaak ]; -} diff --git a/pkgs/ahoviewer.nix b/pkgs/ahoviewer.nix new file mode 100644 index 0000000..38524dc --- /dev/null +++ b/pkgs/ahoviewer.nix @@ -0,0 +1,54 @@ +{ + pkgs ? import { }, +}: +pkgs.stdenv.mkDerivation rec { + pname = "ahoviewer"; + version = "42e16f9"; + + src = pkgs.fetchFromGitHub { + owner = "ahodesuka"; + repo = pname; + rev = "42e16f94b78496e3e346f0d127baa569039a6757"; + sha256 = "sha256-HcijKiExwyBoWDvMlJ5AMA0U7BtS9EfcA54nfQ/iGvE="; + }; + + buildInputs = with pkgs; [ + meson + ninja + gtkmm3 + gtk3 + libconfig + libxml2 + curl + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + libpeas + libsecret + libzip + ]; + + nativeBuildInputs = [ pkgs.pkg-config ]; + + configurePhase = '' + meson setup build --buildtype=release + ''; + + buildPhase = '' + cd build + ninja + cd .. + ''; + + installPhase = '' + mkdir -p $out/bin + cp build/src/ahoviewer $out/bin + ''; + + meta = with pkgs.lib; { + description = "A GTK image viewer, manga reader, and booru browser"; + homepage = "https://github.com/ahodesuka/ahoviewer"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/bollux/default.nix b/pkgs/bollux/default.nix new file mode 100644 index 0000000..0922592 --- /dev/null +++ b/pkgs/bollux/default.nix @@ -0,0 +1,42 @@ +{ pkgs, lib, ... }: +pkgs.stdenvNoCC.mkDerivation rec { + pname = "bollux"; + version = "0.4.1"; + nativeBuildInputs = [ pkgs.makeWrapper ]; + buildInputs = [ pkgs.bashInteractive ]; + dontBuild = true; + makeFlags = [ "PREFIX=$(out)" ]; + + src = pkgs.fetchFromGitea { + domain = "tildegit.org"; + owner = "acdw"; + repo = "bollux"; + rev = "f472e60f1164f0dc025d06db2a13ff4e8ebee1a2"; + hash = "sha256-mo2qWCPfW+dUaYcJLsos/vR5nJ8n1eABy8Zy8OZsfVg="; + }; + + patches = [ + # https://tildegit.org/acdw/bollux/issues/13#issuecomment-9786 + ./fix_lesskey_nag.patch + ]; + + postInstall = '' + wrapProgram $out/bin/bollux --prefix PATH : ${ + lib.makeBinPath [ + pkgs.bashInteractive + pkgs.iconv + pkgs.openssl + pkgs.less + pkgs.coreutils + ] + } + ''; + + meta = with lib; { + description = "a Gemini browser in like, idk, 96% pure Bash"; + homepage = "https://tildegit.org/acdw/bollux"; + license = licenses.mit; + platforms = platforms.all; + mainProgram = "bollux"; + }; +} diff --git a/pkgs/bollux/fix_lesskey_nag.patch b/pkgs/bollux/fix_lesskey_nag.patch new file mode 100644 index 0000000..329b886 --- /dev/null +++ b/pkgs/bollux/fix_lesskey_nag.patch @@ -0,0 +1,13 @@ +diff --git i/bollux w/bollux +index 267418e..090217e 100755 +--- i/bollux ++++ w/bollux +@@ -1130,7 +1130,7 @@ display() { # display METADATA [TITLE] + # text, and pre-formatted text shouldn't wrap. + less_cmd+=(-S) + # Load the keybindings (see `lesskey'). +- mklesskey && less_cmd+=(-k "$BOLLUX_LESSKEY") ++ mklesskey && less_cmd+=(--lesskey-src="$BOLLUX_LESSKEY") + local helpline="${KEY_OPEN}:open, " + helpline+="${KEY_GOTO}/" + helpline+="${KEY_GOTO_FROM}:goto, " diff --git a/pkgs/thorium.nix b/pkgs/thorium.nix new file mode 100644 index 0000000..23ae485 --- /dev/null +++ b/pkgs/thorium.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, ... }: +let + thorium-version = "126.0.6478.246"; + thorium-release = "${thorium-version}_Th24_SSE4"; + + thorium-archive = pkgs.fetchurl { + url = "https://github.com/Alex313031/thorium/releases/download/M${thorium-version}/Thorium_Browser_${thorium-release}.AppImage"; + hash = "sha256-izYbx/mSA+l7fAh917SauHopk3UlUJo+7NjkyIGpnNA="; + }; +in +# https://discourse.nixos.org/t/creating-a-nix-derivation-for-an-appimage/31927 +pkgs.appimageTools.wrapType2 { + pname = "thorium"; + version = thorium-version; + src = "${thorium-archive}"; + + meta = with lib; { + description = "Chromium fork named after radioactive element No. 90. Windows and MacOS/Raspi/Android/Special builds are in different repositories, links are towards the top of the README.md."; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + homepage = "https://thorium.rocks/"; + license = licenses.bsd3; + platforms = platforms.linux; + mainProgram = "thorium-browser"; + }; +} diff --git a/pkgs/yaak.nix b/pkgs/yaak.nix new file mode 100644 index 0000000..5331462 --- /dev/null +++ b/pkgs/yaak.nix @@ -0,0 +1,28 @@ +{ + pkgs ? import { }, + lib, + ... +}: +let + yaak-version = "2024.6.6"; + + yaak-archive = pkgs.fetchzip { + url = "https://releases.yaak.app/releases/${yaak-version}/yaak_${yaak-version}_amd64.AppImage.tar.gz"; + hash = "sha256-Qnc4RlQmQWHARreQ69jAshq57bZ56Yt5a35jpTjGwNU="; + }; +in +# https://discourse.nixos.org/t/creating-a-nix-derivation-for-an-appimage/31927 +pkgs.appimageTools.wrapType2 rec { + pname = "yaak"; + version = yaak-version; + src = "${yaak-archive}/yaak_${yaak-version}_amd64.AppImage"; + + meta = with lib; { + description = "Play with APIs, intuitively"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + homepage = "https://yaak.app/"; + license = licenses.unfree; + platforms = platforms.linux; + mainProgram = "yaak"; + }; +} diff --git a/pkgs/zen-browser-bin.nix b/pkgs/zen-browser-bin.nix new file mode 100644 index 0000000..51a95db --- /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.32"; + + src = fetchzip { + url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-specific.tar.bz2"; + hash = "sha256-5Z+RG5UwSHM6sC1WT5KHgwL0cco2DlMTSteEfnLGrlo="; + }; + + 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"; + }; +} -- cgit v1.2.3