diff options
Diffstat (limited to 'pkgs/webapps/ttrss/plugins/feediron')
-rw-r--r-- | pkgs/webapps/ttrss/plugins/feediron/default.nix | 9 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/feediron/feediron.json | 15 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch | 18 |
3 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/webapps/ttrss/plugins/feediron/default.nix b/pkgs/webapps/ttrss/plugins/feediron/default.nix new file mode 100644 index 00000000..80bfda4f --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/feediron/default.nix | |||
@@ -0,0 +1,9 @@ | |||
1 | { patched ? false, stdenv, mylibs, lib }: | ||
2 | stdenv.mkDerivation (mylibs.fetchedGithub ./feediron.json // { | ||
3 | patches = lib.optionals patched [ ./json_reformat.patch ]; | ||
4 | installPhase = '' | ||
5 | mkdir $out | ||
6 | cp -a . $out | ||
7 | ''; | ||
8 | passthru.pluginName = "feediron"; | ||
9 | }) | ||
diff --git a/pkgs/webapps/ttrss/plugins/feediron/feediron.json b/pkgs/webapps/ttrss/plugins/feediron/feediron.json new file mode 100644 index 00000000..5dbec923 --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/feediron/feediron.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "407168c-master", | ||
3 | "meta": { | ||
4 | "name": "ttrss-feediron", | ||
5 | "url": "https://github.com/m42e/ttrss_plugin-feediron", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "m42e", | ||
10 | "repo": "ttrss_plugin-feediron", | ||
11 | "rev": "407168c628880b5ced572cc549db6d50e866d3c8", | ||
12 | "sha256": "17b95ifpcph6m03hjd1mhi8gi1hw9yd3fnffmw66fqr5c9l3zd9r", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||
diff --git a/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch b/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch new file mode 100644 index 00000000..e1c44d95 --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/feediron/json_reformat.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | diff --git a/init.php b/init.php | ||
2 | index 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 | |||