]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/blame - pkgs/webapps/ttrss/default.nix
Initial commit published for NUR
[perso/Immae/Config/Nix/NUR.git] / pkgs / webapps / ttrss / default.nix
CommitLineData
24fd1fe6
IB
1{ ttrss_config ? "/etc/ttrss/config.php"
2, varDir ? "/var/lib/ttrss"
3, stdenv, mylibs }:
4let
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 });
30in package