aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron
diff options
context:
space:
mode:
Diffstat (limited to 'flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron')
-rw-r--r--flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/default.nix18
-rw-r--r--flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch18
2 files changed, 36 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/default.nix b/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/default.nix
new file mode 100644
index 0000000..2f86416
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/default.nix
@@ -0,0 +1,18 @@
1{ patched ? false, stdenv, fetchFromGitHub, lib }:
2stdenv.mkDerivation ({
3 pname = "ttrss-feediron";
4 version = "407168c-master";
5 src = fetchFromGitHub {
6 owner = "m42e";
7 repo = "ttrss_plugin-feediron";
8 rev = "407168c628880b5ced572cc549db6d50e866d3c8";
9 sha256 = "17b95ifpcph6m03hjd1mhi8gi1hw9yd3fnffmw66fqr5c9l3zd9r";
10 fetchSubmodules = true;
11 };
12 patches = lib.optionals patched [ ./json_reformat.patch ];
13 installPhase = ''
14 mkdir $out
15 cp -a . $out
16 '';
17 passthru.pluginName = "feediron";
18})
diff --git a/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch b/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch
new file mode 100644
index 0000000..e1c44d9
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch
@@ -0,0 +1,18 @@
1diff --git a/init.php b/init.php
2index 3c0f2f9..1aad146 100644
3--- a/init.php
4+++ b/init.php
5@@ -600,10 +600,11 @@ class Feediron extends Plugin implements IHandler
6 return false;
7 }
8
9- $this->host->set($this, 'json_conf', Feediron_Json::format($json_conf));
10+ $new_conf = json_encode(json_decode($json_conf), JSON_PRETTY_PRINT);
11+ $this->host->set($this, 'json_conf', $new_conf);
12 $json_reply['success'] = true;
13 $json_reply['message'] = __('Configuration saved.');
14- $json_reply['json_conf'] = Feediron_Json::format($json_conf);
15+ $json_reply['json_conf'] = $new_conf;
16 echo json_encode($json_reply);
17 }
18