diff options
author | makefu <github@syntax-fehler.de> | 2020-06-07 19:51:47 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-06-07 19:51:47 +0200 |
commit | 8dc4c3d153f4f6536815dbb122bf5465ed3a800a (patch) | |
tree | 584ff99e146b1b1a40ff1b2ab026de00a984eb0d /krebs/5pkgs/override | |
parent | 54502928f633568c694cac94dfd4de527c8414bc (diff) | |
parent | 8ae780cf2689a0e62718fe0dcc8b80e584f68d23 (diff) |
Merge remote-tracking branch 'tv/master'
Diffstat (limited to 'krebs/5pkgs/override')
-rw-r--r-- | krebs/5pkgs/override/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix new file mode 100644 index 000000000..7a7b979c4 --- /dev/null +++ b/krebs/5pkgs/override/default.nix @@ -0,0 +1,51 @@ +with import <stockholm/lib>; +self: super: { + + flameshot = super.flameshot.overrideAttrs (old: rec { + patches = old.patches or [] ++ [ + (self.writeText "flameshot-imgur.patch" /* diff */ '' +--- a/src/tools/imgur/imguruploader.cpp ++++ b/src/tools/imgur/imguruploader.cpp +@@ -40,6 +40,7 @@ + #include <QTimer> + #include <QJsonDocument> + #include <QJsonObject> ++#include <stdlib.h> + + ImgurUploader::ImgurUploader(const QPixmap &capture, QWidget *parent) : + QWidget(parent), m_pixmap(capture) +@@ -74,7 +75,10 @@ void ImgurUploader::handleReply(QNetworkReply *reply) { + QJsonObject json = response.object(); + QJsonObject data = json["data"].toObject(); + m_imageURL.setUrl(data["link"].toString()); +- m_deleteImageURL.setUrl(QString("https://imgur.com/delete/%1").arg( ++ char *deleteImageURLPattern = secure_getenv("IMGUR_DELETE_URL"); ++ if (deleteImageURLPattern == NULL) ++ deleteImageURLPattern = "https://imgur.com/delete/%1"; ++ m_deleteImageURL.setUrl(QString(deleteImageURLPattern).arg( + data["deletehash"].toString())); + onUploadOk(); + } else { +@@ -105,7 +109,10 @@ void ImgurUploader::upload() { + QString description = FileNameHandler().parsedPattern(); + urlQuery.addQueryItem("description", description); + +- QUrl url("https://api.imgur.com/3/image"); ++ char *createImageURLPattern = secure_getenv("IMGUR_CREATE_URL"); ++ if (createImageURLPattern == NULL) ++ createImageURLPattern = "https://api.imgur.com/3/image"; ++ QUrl url(createImageURLPattern); + url.setQuery(urlQuery); + QNetworkRequest request(url); + request.setHeader(QNetworkRequest::ContentTypeHeader, + '') + ]; + }); + + # https://github.com/proot-me/PRoot/issues/106 + proot = self.writeDashBin "proot" '' + export PROOT_NO_SECCOMP=1 + exec ${super.proot}/bin/proot "$@" + ''; + +} |