aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/qu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/qu/qutebrowser-patched/0001-fix-standardpaths-Continue-to-work-with-xdg-while-ba.patch54
-rw-r--r--pkgs/by-name/qu/qutebrowser-patched/package.nix26
2 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/by-name/qu/qutebrowser-patched/0001-fix-standardpaths-Continue-to-work-with-xdg-while-ba.patch b/pkgs/by-name/qu/qutebrowser-patched/0001-fix-standardpaths-Continue-to-work-with-xdg-while-ba.patch
new file mode 100644
index 00000000..fa2e2482
--- /dev/null
+++ b/pkgs/by-name/qu/qutebrowser-patched/0001-fix-standardpaths-Continue-to-work-with-xdg-while-ba.patch
@@ -0,0 +1,54 @@
+From 8a0aa0e244fa565b8c55aab38cc5e84323c3b481 Mon Sep 17 00:00:00 2001
+From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
+Date: Tue, 3 Jun 2025 12:43:44 +0200
+Subject: [PATCH] fix(standardpaths): Continue to work with xdg, while
+ `--basedir` is set
+
+This can be used to simulate firefox's profiles feature (i.e., completely separated
+data/runtime/cache dirs), while still keeping to the xdg basedir standard.
+---
+ qutebrowser/utils/standarddir.py | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py
+index b82845a96..61319daed 100644
+--- a/qutebrowser/utils/standarddir.py
++++ b/qutebrowser/utils/standarddir.py
+@@ -285,12 +285,11 @@ def _from_args(
+ The overridden path, or None if there is no override.
+ """
+ basedir_suffix = {
+- QStandardPaths.StandardLocation.ConfigLocation: 'config',
+- QStandardPaths.StandardLocation.AppDataLocation: 'data',
+- QStandardPaths.StandardLocation.AppLocalDataLocation: 'data',
+- QStandardPaths.StandardLocation.CacheLocation: 'cache',
+- QStandardPaths.StandardLocation.DownloadLocation: 'download',
+- QStandardPaths.StandardLocation.RuntimeLocation: 'runtime',
++ QStandardPaths.StandardLocation.ConfigLocation: ('config', False),
++ QStandardPaths.StandardLocation.AppDataLocation: ('data', False),
++ QStandardPaths.StandardLocation.AppLocalDataLocation: ('data', False),
++ QStandardPaths.StandardLocation.CacheLocation: ('cache', True),
++ QStandardPaths.StandardLocation.RuntimeLocation: ('runtime', True),
+ }
+
+ if getattr(args, 'basedir', None) is None:
+@@ -298,10 +297,14 @@ def _from_args(
+ assert args is not None
+
+ try:
+- suffix = basedir_suffix[typ]
++ (suffix, extend) = basedir_suffix[typ]
+ except KeyError: # pragma: no cover
+ return None
+- return os.path.abspath(os.path.join(args.basedir, suffix))
++
++ if extend:
++ return os.path.abspath(os.path.join(_writable_location(typ), os.path.basename(args.basedir)))
++ else:
++ return os.path.abspath(os.path.join(args.basedir, suffix))
+
+
+ def _create(path: str) -> None:
+--
+2.49.0
+
diff --git a/pkgs/by-name/qu/qutebrowser-patched/package.nix b/pkgs/by-name/qu/qutebrowser-patched/package.nix
new file mode 100644
index 00000000..bf4fab1d
--- /dev/null
+++ b/pkgs/by-name/qu/qutebrowser-patched/package.nix
@@ -0,0 +1,26 @@
+{
+ qutebrowser,
+ python3,
+}: let
+ python3NoSpeech = python3.override {
+ packageOverrides = self: super: {
+ # NOTE: The re-compile is not worth the space saving <2026-07-01>
+ # pyqt6 = super.pyqt6.override {withSpeech = false;};
+ };
+ };
+ # NOTE: It's just not feasible to re-compile a webengine. <2026-05-29>
+ # qt6PackagesNoFfmpeg = qt6Packages.overrideScope (
+ # _: prev: {
+ # qtwebengine = prev.qtwebengine.override {
+ # ffmpeg = ffmpeg-headless;
+ # };
+ # }
+ # );
+in
+ (qutebrowser.overrideAttrs (final: prev: {
+ pname = "${prev.pname}-patched";
+
+ patches = (prev.patches or []) ++ [./0001-fix-standardpaths-Continue-to-work-with-xdg-while-ba.patch];
+ })).override {
+ python3 = python3NoSpeech;
+ }