about summary refs log tree commit diff
path: root/pkgs/games/humblebundle
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-02-01 15:30:10 +0100
committeraszlig <aszlig@nix.build>2018-02-01 22:28:17 +0100
commit68b034da1b0a7fb20488b06c646f894458d6beff (patch)
treec2ffade0005c609c6f0fb3ccf0897bd4c12d6368 /pkgs/games/humblebundle
parent50cb698e544dd40ef450e5136efc9ade86cc6dea (diff)
fetchHumbleBundle: Run get-captcha off-the-record
We don't want this little helper to leave all kinds of junk on the disk,
so let's enable offTheRecord mode for the default QtWebEngine profile.
This in turn causes all stuff like cache, cookies, local storage and
whatnot to only reside in memory.

For example on my machine I had lots of files like this in
~/.local/share and ~/.cache:

 * 014bxyklf1xm99jd5rg8y4q0blmqw6yc-get-captcha
 * 18j0knrwrsamsrpwjz741midspxbqmpp-get-captcha
 * 4817rvjnj249ifvk7dsvv2p0kxi2jwkg-get-captcha

So if you ran this helper you should probably remove *-get-captcha in
XDG_DATA_HOME (by default ~/.local/share) and XDG_CACHE_HOME (by default
~/.cache).

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Profpatsch, @Sternenseemann, @layus
Diffstat (limited to 'pkgs/games/humblebundle')
-rw-r--r--pkgs/games/humblebundle/fetch-humble-bundle/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/games/humblebundle/fetch-humble-bundle/default.nix b/pkgs/games/humblebundle/fetch-humble-bundle/default.nix
index ce21c207..dbf6c862 100644
--- a/pkgs/games/humblebundle/fetch-humble-bundle/default.nix
+++ b/pkgs/games/humblebundle/fetch-humble-bundle/default.nix
@@ -29,12 +29,15 @@
       #include <QApplication>
       #include <QWebEngineView>
       #include <QTcpServer>
+      #include <QQuickWebEngineProfile>
 
       int main(int argc, char **argv) {
         QApplication *app = new QApplication(argc, argv);
         QTcpServer *server = new QTcpServer();
         QWebEngineView *browser = new QWebEngineView();
 
+        QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
+
         if (!server->listen(QHostAddress::LocalHost, 18123)) {
           qCritical() << "Unable to listen on port 18123!";
           return 1;
@@ -74,7 +77,7 @@
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ qt5.qtbase qt5.qtwebengine ];
   } ''
-    g++ $(pkg-config --libs --cflags Qt5WebEngineWidgets) \
+    g++ $(pkg-config --libs --cflags Qt5WebEngineWidgets Qt5WebEngine) \
       -Wall -std=c++11 -o "$out" ${application}
   '';