diff options
Diffstat (limited to 'pkgs/webapps/ttrss/default.nix')
-rw-r--r-- | pkgs/webapps/ttrss/default.nix | 30 |
1 files changed, 30 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 | ||