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 | 252dd7d899b7a0deea1537cc5d2d48b825afffb0 (patch) | |
tree | f51c3c9cd7429b0b9553a840f26bee489be045bc /pkgs/webapps/ttrss/default.nix | |
download | NUR-nur_root.tar.gz NUR-nur_root.tar.zst NUR-nur_root.zip |
Initial commit published for NURnur_root
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 | ||