diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-13 21:25:24 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 01:40:13 +0200 |
commit | 24fd1fe6c62b7a9fc347794fde043285da272f5c (patch) | |
tree | 65557bf1d241ca389b619dbd24d18d51932ee030 /pkgs/webapps/ttrss | |
download | NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.tar.gz NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.tar.zst NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.zip |
Initial commit published for NUR
Diffstat (limited to 'pkgs/webapps/ttrss')
-rw-r--r-- | pkgs/webapps/ttrss/default.nix | 30 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/af_feedmod/af_feedmod.json | 15 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/af_feedmod/default.nix | 9 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/af_feedmod/type_replace.patch | 12 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/auth_ldap/auth-ldap.json | 15 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/auth_ldap/default.nix | 8 | ||||
-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 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/ff_instagram/default.nix | 8 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/ff_instagram/ff_instagram.json | 15 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/default.nix | 8 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/tumblr_gdpr_ua.json | 15 | ||||
-rw-r--r-- | pkgs/webapps/ttrss/tt-rss.json | 14 |
14 files changed, 191 insertions, 0 deletions
diff --git a/pkgs/webapps/ttrss/default.nix b/pkgs/webapps/ttrss/default.nix new file mode 100644 index 00000000..0ce2f94f --- /dev/null +++ b/pkgs/webapps/ttrss/default.nix | |||
@@ -0,0 +1,30 @@ | |||
1 | { ttrss_config ? "/etc/ttrss/config.php" | ||
2 | , varDir ? "/var/lib/ttrss" | ||
3 | , stdenv, mylibs }: | ||
4 | let | ||
5 | withPlugins = plugins: package.overrideAttrs(old: rec { | ||
6 | name = "${old.name}-with-plugins"; | ||
7 | installPhase = old.installPhase + | ||
8 | builtins.concatStringsSep "\n" ( | ||
9 | map (value: "ln -s ${value} $out/plugins/${value.pluginName}") plugins | ||
10 | ); | ||
11 | passthru = old.passthru // { | ||
12 | inherit plugins; | ||
13 | withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins); | ||
14 | }; | ||
15 | }); | ||
16 | package = stdenv.mkDerivation (mylibs.fetchedGit ./tt-rss.json // rec { | ||
17 | buildPhase = '' | ||
18 | rm -rf lock feed-icons cache | ||
19 | ln -sf ${varDir}/{lock,feed-icons,cache} . | ||
20 | ''; | ||
21 | installPhase = '' | ||
22 | cp -a . $out | ||
23 | ln -s ${ttrss_config} $out/config.php | ||
24 | ''; | ||
25 | passthru = { | ||
26 | plugins = []; | ||
27 | inherit withPlugins; | ||
28 | }; | ||
29 | }); | ||
30 | in package | ||
diff --git a/pkgs/webapps/ttrss/plugins/af_feedmod/af_feedmod.json b/pkgs/webapps/ttrss/plugins/af_feedmod/af_feedmod.json new file mode 100644 index 00000000..e57fcce1 --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/af_feedmod/af_feedmod.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "0ea2092-master", | ||
3 | "meta": { | ||
4 | "name": "ttrss-af_feedmod", | ||
5 | "url": "https://github.com/mbirth/ttrss_plugin-af_feedmod", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "mbirth", | ||
10 | "repo": "ttrss_plugin-af_feedmod", | ||
11 | "rev": "0ea2092dd34067ecd898802cfca3570023d1ecfe", | ||
12 | "sha256": "02ibf47zcrsc2rr45wsix8gxyyf371davj8n8i0gj1zdq95klvnv", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||
diff --git a/pkgs/webapps/ttrss/plugins/af_feedmod/default.nix b/pkgs/webapps/ttrss/plugins/af_feedmod/default.nix new file mode 100644 index 00000000..8512be3d --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/af_feedmod/default.nix | |||
@@ -0,0 +1,9 @@ | |||
1 | { patched ? false, stdenv, mylibs, lib }: | ||
2 | stdenv.mkDerivation (mylibs.fetchedGithub ./af_feedmod.json // { | ||
3 | patches = lib.optionals patched [ ./type_replace.patch ]; | ||
4 | installPhase = '' | ||
5 | mkdir $out | ||
6 | cp init.php $out | ||
7 | ''; | ||
8 | passthru.pluginName = "af_feedmod"; | ||
9 | }) | ||
diff --git a/pkgs/webapps/ttrss/plugins/af_feedmod/type_replace.patch b/pkgs/webapps/ttrss/plugins/af_feedmod/type_replace.patch new file mode 100644 index 00000000..d622577a --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/af_feedmod/type_replace.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | --- a/init.php 2014-06-16 14:21:06.995480038 +0200 | ||
2 | +++ b/init.php 2014-06-16 14:22:00.151027654 +0200 | ||
3 | @@ -147,6 +147,9 @@ | ||
4 | } | ||
5 | } | ||
6 | break; | ||
7 | + case 'replace': | ||
8 | + $article['content'] = preg_replace("/".$config['pattern']."/",$config['replacement'],$article['content']); | ||
9 | + break; | ||
10 | |||
11 | default: | ||
12 | // unknown type or invalid config | ||
diff --git a/pkgs/webapps/ttrss/plugins/auth_ldap/auth-ldap.json b/pkgs/webapps/ttrss/plugins/auth_ldap/auth-ldap.json new file mode 100644 index 00000000..c8aaab5c --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/auth_ldap/auth-ldap.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "4d751b0-master", | ||
3 | "meta": { | ||
4 | "name": "ttrss-auth-ldap", | ||
5 | "url": "https://github.com/hydrian/TTRSS-Auth-LDAP", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "hydrian", | ||
10 | "repo": "TTRSS-Auth-LDAP", | ||
11 | "rev": "4d751b095c29a8dbe2dc7bb07777742956136e94", | ||
12 | "sha256": "0b9fl86acrzpcv41r7pj3bl8b3n72hpkdywzx9zjyfqv5pskxyim", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||
diff --git a/pkgs/webapps/ttrss/plugins/auth_ldap/default.nix b/pkgs/webapps/ttrss/plugins/auth_ldap/default.nix new file mode 100644 index 00000000..424a9f7c --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/auth_ldap/default.nix | |||
@@ -0,0 +1,8 @@ | |||
1 | { stdenv, mylibs }: | ||
2 | stdenv.mkDerivation (mylibs.fetchedGithub ./auth-ldap.json // { | ||
3 | installPhase = '' | ||
4 | mkdir $out | ||
5 | cp plugins/auth_ldap/init.php $out | ||
6 | ''; | ||
7 | passthru.pluginName = "auth_ldap"; | ||
8 | }) | ||
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 | |||
diff --git a/pkgs/webapps/ttrss/plugins/ff_instagram/default.nix b/pkgs/webapps/ttrss/plugins/ff_instagram/default.nix new file mode 100644 index 00000000..3540f737 --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/ff_instagram/default.nix | |||
@@ -0,0 +1,8 @@ | |||
1 | { stdenv, mylibs }: | ||
2 | stdenv.mkDerivation (mylibs.fetchedGithub ./ff_instagram.json // { | ||
3 | installPhase = '' | ||
4 | mkdir $out | ||
5 | cp -a . $out | ||
6 | ''; | ||
7 | passthru.pluginName = "ff_instagram"; | ||
8 | }) | ||
diff --git a/pkgs/webapps/ttrss/plugins/ff_instagram/ff_instagram.json b/pkgs/webapps/ttrss/plugins/ff_instagram/ff_instagram.json new file mode 100644 index 00000000..1f241b90 --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/ff_instagram/ff_instagram.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "0366ffb-master", | ||
3 | "meta": { | ||
4 | "name": "ttrss-ff_instagram", | ||
5 | "url": "https://github.com/wltb/ff_instagram", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "wltb", | ||
10 | "repo": "ff_instagram", | ||
11 | "rev": "0366ffb18c4d490c8fbfba2f5f3367a5af23cfe8", | ||
12 | "sha256": "0vvzl6wi6jmrqknsfddvckjgsgfizz1d923d1nyrpzjfn6bda1vk", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||
diff --git a/pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/default.nix b/pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/default.nix new file mode 100644 index 00000000..2cf3e051 --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/default.nix | |||
@@ -0,0 +1,8 @@ | |||
1 | { stdenv, mylibs }: | ||
2 | stdenv.mkDerivation (mylibs.fetchedGithub ./tumblr_gdpr_ua.json // { | ||
3 | installPhase = '' | ||
4 | mkdir $out | ||
5 | cp -a . $out | ||
6 | ''; | ||
7 | passthru.pluginName = "tumblr_gdpr_ua"; | ||
8 | }) | ||
diff --git a/pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/tumblr_gdpr_ua.json b/pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/tumblr_gdpr_ua.json new file mode 100644 index 00000000..eafbcfef --- /dev/null +++ b/pkgs/webapps/ttrss/plugins/tumblr_gdpr_ua/tumblr_gdpr_ua.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "287c584-master", | ||
3 | "meta": { | ||
4 | "name": "ttrss-tumblr_gdpr_ua", | ||
5 | "url": "https://github.com/hkockerbeck/ttrss-tumblr-gdpr-ua", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "hkockerbeck", | ||
10 | "repo": "ttrss-tumblr-gdpr-ua", | ||
11 | "rev": "287c584e68845d524f920156bff0b2eaa6f65117", | ||
12 | "sha256": "1fviawgcclqky4k4xv1sqzvpb8i74w9f0pclm09m78s8l85wh9py", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||
diff --git a/pkgs/webapps/ttrss/tt-rss.json b/pkgs/webapps/ttrss/tt-rss.json new file mode 100644 index 00000000..e2731b0f --- /dev/null +++ b/pkgs/webapps/ttrss/tt-rss.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "tag": "986ca25-master", | ||
3 | "meta": { | ||
4 | "name": "tt-rss", | ||
5 | "url": "https://git.tt-rss.org/fox/tt-rss.git", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "git": { | ||
9 | "url": "https://git.tt-rss.org/fox/tt-rss.git", | ||
10 | "rev": "986ca251f995f7754a0470d3e0c44538a545081f", | ||
11 | "sha256": "0xkafkh7l9zazm5d6snlq03kdfxfhkb4c8fdsb32wn8b9bhdzf5s", | ||
12 | "fetchSubmodules": true | ||
13 | } | ||
14 | } | ||