summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-08-28 22:35:07 -0700
committerFuwn <[email protected]>2024-08-28 22:35:07 -0700
commit0687f98f5e8f293c19ee4de018a4389d355c55b8 (patch)
tree85daad9a5373b6656c7f21c40b7d3277b8f3a0ec /pkgs
parenthi (diff)
downloadnixos-config-0687f98f5e8f293c19ee4de018a4389d355c55b8.tar.xz
nixos-config-0687f98f5e8f293c19ee4de018a4389d355c55b8.zip
hi
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/ahoviewer.nix54
-rw-r--r--pkgs/bollux/default.nix42
-rw-r--r--pkgs/bollux/fix_lesskey_nag.patch13
-rw-r--r--pkgs/thorium.nix25
-rw-r--r--pkgs/yaak.nix28
-rw-r--r--pkgs/zen-browser-bin.nix128
6 files changed, 290 insertions, 0 deletions
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 <nixpkgs> { },
+}:
+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 <nixpkgs> { },
+ 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";
+ };
+}