diff options
| author | tv <tv@krebsco.de> | 2026-12-02 02:18:54 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-02 02:18:54 +0000 |
| commit | 6d895321d2614c4c8fbb88c4b7f61de2495e7831 (patch) | |
| tree | f59b3c3df12b8d457bb9af3e6769c3dcfe26c293 /pkgs/simple/flameshot-once | |
| parent | d9f6eb1757a587bf69cb8a20cfb4a06704126265 (diff) | |
flameshot-once: move files to where the new version has them
Renames only, so that history follows them: profile.nix becomes
config.nix, flameshot's override moves next to flameshot-once, and its
imgur patch takes the name of the new one.
Diffstat (limited to 'pkgs/simple/flameshot-once')
| -rw-r--r-- | pkgs/simple/flameshot-once/config.nix (renamed from pkgs/simple/flameshot-once/profile.nix) | 0 | ||||
| -rw-r--r-- | pkgs/simple/flameshot-once/flameshot/default.nix | 15 | ||||
| -rw-r--r-- | pkgs/simple/flameshot-once/flameshot/flameshot-13.imgur.patch | 35 |
3 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/simple/flameshot-once/profile.nix b/pkgs/simple/flameshot-once/config.nix index 269f13a6..269f13a6 100644 --- a/pkgs/simple/flameshot-once/profile.nix +++ b/pkgs/simple/flameshot-once/config.nix diff --git a/pkgs/simple/flameshot-once/flameshot/default.nix b/pkgs/simple/flameshot-once/flameshot/default.nix new file mode 100644 index 00000000..10154cc4 --- /dev/null +++ b/pkgs/simple/flameshot-once/flameshot/default.nix @@ -0,0 +1,15 @@ +self: super: + +super.flameshot.overrideAttrs (old: rec { + name = "flameshot-${version}"; + version = "0.10.2"; + src = self.fetchFromGitHub { + owner = "flameshot-org"; + repo = "flameshot"; + rev = "v${version}"; + sha256 = "sha256-rZUiaS32C77tFJmEkw/9MGbVTVscb6LOCyWaWO5FyR4="; + }; + patches = old.patches or [] ++ [ + ./flameshot_imgur_0.10.2.patch + ]; +}) diff --git a/pkgs/simple/flameshot-once/flameshot/flameshot-13.imgur.patch b/pkgs/simple/flameshot-once/flameshot/flameshot-13.imgur.patch new file mode 100644 index 00000000..c4c0bf38 --- /dev/null +++ b/pkgs/simple/flameshot-once/flameshot/flameshot-13.imgur.patch @@ -0,0 +1,35 @@ +--- a/src/tools/imgur/imguruploader.cpp ++++ b/src/tools/imgur/imguruploader.cpp +@@ -31,6 +31,7 @@ + #include <QTimer> + #include <QUrlQuery> + #include <QVBoxLayout> ++#include <stdlib.h> + + ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent) + : QWidget(parent) +@@ -79,8 +80,11 @@ void ImgurUploader::handleReply(QNetworkReply* reply) + m_imageURL.setUrl(data[QStringLiteral("link")].toString()); + + auto deleteToken = data[QStringLiteral("deletehash")].toString(); ++ char *deleteImageURLPattern = secure_getenv("IMGUR_DELETE_URL"); ++ if (deleteImageURLPattern == NULL) ++ deleteImageURLPattern = "https://imgur.com/delete/%1"; + m_deleteImageURL.setUrl( +- QStringLiteral("https://imgur.com/delete/%1").arg(deleteToken)); ++ QString::fromUtf8(deleteImageURLPattern).arg(deleteToken)); + + // save history + QString imageName = m_imageURL.toString(); +@@ -133,7 +137,10 @@ void ImgurUploader::upload() + QString description = FileNameHandler().parsedPattern(); + urlQuery.addQueryItem(QStringLiteral("description"), description); + +- QUrl url(QStringLiteral("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(QString::fromUtf8(createImageURLPattern)); + url.setQuery(urlQuery); + QNetworkRequest request(url); + request.setHeader(QNetworkRequest::ContentTypeHeader, |
