summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/override
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-01-31 00:34:07 +0100
committerlassulus <git@lassul.us>2023-01-31 00:34:07 +0100
commit62bd490d1e7217898bc793afc20de853ac1e6622 (patch)
tree454b9cbf6f72c54b993487ebc1f8deeb1cbb6506 /tv/5pkgs/override
parent369fa6b7eb3f0fa3e1034bcad438eeda017949f8 (diff)
parenta85de9a0deb81f8b8759bfc6a54db0d823ab7a19 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/5pkgs/override')
-rw-r--r--tv/5pkgs/override/flameshot/default.nix15
-rw-r--r--tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch35
-rw-r--r--tv/5pkgs/override/iosevka-tv-1.nix20
-rw-r--r--tv/5pkgs/override/iosevka-tv-2.nix20
4 files changed, 90 insertions, 0 deletions
diff --git a/tv/5pkgs/override/flameshot/default.nix b/tv/5pkgs/override/flameshot/default.nix
new file mode 100644
index 000000000..2f7c5236b
--- /dev/null
+++ b/tv/5pkgs/override/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/flameshot_imgur_0.10.2.patch
+ ];
+})
diff --git a/tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch b/tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch
new file mode 100644
index 000000000..c4c0bf38a
--- /dev/null
+++ b/tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.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,
diff --git a/tv/5pkgs/override/iosevka-tv-1.nix b/tv/5pkgs/override/iosevka-tv-1.nix
new file mode 100644
index 000000000..880160b3e
--- /dev/null
+++ b/tv/5pkgs/override/iosevka-tv-1.nix
@@ -0,0 +1,20 @@
+self: super:
+
+let
+ srcpkg = super.iosevka-tv-1;
+ binpkg = self.fetchzip {
+ inherit (srcpkg) pname version;
+ stripRoot = false;
+ hash = "sha256-QIuTS70vUQSvDDXjY4uI6SCcu1XT4HjvzpthvrNX4h0=";
+ urls = [
+ "https://c.krebsco.de/${srcpkg.name}.tar.gz"
+ "https://ni.krebsco.de/~tv/mirrors/iosevka/${srcpkg.name}.tar.gz"
+ ];
+ };
+in
+
+if srcpkg.version == binpkg.version then
+ binpkg
+
+else
+ srcpkg
diff --git a/tv/5pkgs/override/iosevka-tv-2.nix b/tv/5pkgs/override/iosevka-tv-2.nix
new file mode 100644
index 000000000..2eecf3cff
--- /dev/null
+++ b/tv/5pkgs/override/iosevka-tv-2.nix
@@ -0,0 +1,20 @@
+self: super:
+
+let
+ srcpkg = super.iosevka-tv-2;
+ binpkg = self.fetchzip {
+ inherit (srcpkg) pname version;
+ stripRoot = false;
+ hash = "sha256-PuIrW1ftYD5PW4du6gq1XpUM3v0potwmj+vAxJImF/A=";
+ urls = [
+ "https://c.krebsco.de/${srcpkg.name}.tar.gz"
+ "https://ni.krebsco.de/~tv/mirrors/iosevka/${srcpkg.name}.tar.gz"
+ ];
+ };
+in
+
+if srcpkg.version == binpkg.version then
+ binpkg
+
+else
+ srcpkg