diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-07 15:02:33 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-07 15:02:33 +0200 |
commit | 86663f1789aecdb62e44a4be46e0ed111b795a09 (patch) | |
tree | 80789e781d261ba800ee99b2525a106449d4755b /pkgs/webapps/ttrss/plugins/af_feedmod | |
parent | fffbbb5623649ca7c7b32b74558a26ec5cf11abb (diff) | |
download | Nix-86663f1789aecdb62e44a4be46e0ed111b795a09.tar.gz Nix-86663f1789aecdb62e44a4be46e0ed111b795a09.tar.zst Nix-86663f1789aecdb62e44a4be46e0ed111b795a09.zip |
Move ttrss to pkgs
Diffstat (limited to 'pkgs/webapps/ttrss/plugins/af_feedmod')
-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 |
3 files changed, 36 insertions, 0 deletions
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 0000000..e57fcce --- /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 0000000..8512be3 --- /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 0000000..d622577 --- /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 | ||