From 86663f1789aecdb62e44a4be46e0ed111b795a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 7 May 2019 15:02:33 +0200 Subject: Move ttrss to pkgs --- pkgs/webapps/ttrss/default.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pkgs/webapps/ttrss/default.nix (limited to 'pkgs/webapps/ttrss/default.nix') diff --git a/pkgs/webapps/ttrss/default.nix b/pkgs/webapps/ttrss/default.nix new file mode 100644 index 0000000..0ce2f94 --- /dev/null +++ b/pkgs/webapps/ttrss/default.nix @@ -0,0 +1,30 @@ +{ ttrss_config ? "/etc/ttrss/config.php" +, varDir ? "/var/lib/ttrss" +, stdenv, mylibs }: +let + withPlugins = plugins: package.overrideAttrs(old: rec { + name = "${old.name}-with-plugins"; + installPhase = old.installPhase + + builtins.concatStringsSep "\n" ( + map (value: "ln -s ${value} $out/plugins/${value.pluginName}") plugins + ); + passthru = old.passthru // { + inherit plugins; + withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins); + }; + }); + package = stdenv.mkDerivation (mylibs.fetchedGit ./tt-rss.json // rec { + buildPhase = '' + rm -rf lock feed-icons cache + ln -sf ${varDir}/{lock,feed-icons,cache} . + ''; + installPhase = '' + cp -a . $out + ln -s ${ttrss_config} $out/config.php + ''; + passthru = { + plugins = []; + inherit withPlugins; + }; + }); +in package -- cgit v1.2.3