From 68b034da1b0a7fb20488b06c646f894458d6beff Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 1 Feb 2018 15:30:10 +0100 Subject: 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 Cc: @Profpatsch, @Sternenseemann, @layus --- pkgs/games/humblebundle/fetch-humble-bundle/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/games/humblebundle') 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 #include #include + #include 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} ''; -- cgit 1.4.1