1 { mantis_config ? "/etc/mantisbt/config_inc.php", stdenv, fetchurl }:
3 withPlugins = plugins: package.overrideAttrs(old: {
4 name = "${old.name}-with-plugins";
5 installPhase = old.installPhase + (
6 builtins.concatStringsSep "\n" (
7 map (value: if builtins.hasAttr "selector" value then
8 "ln -sf ${value}/${value.selector} $out/plugins/"
10 "ln -sf ${value} $out/plugins/${value.pluginName}"
13 passthru = old.passthru // {
15 withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
18 package = stdenv.mkDerivation rec {
19 name = "mantisbt-${version}";
22 url = "https://downloads.sourceforge.net/project/mantisbt/mantis-stable/${version}/${name}.tar.gz";
23 sha256 = "13lx569dp1gibq5daqp7dj6gsqic85rrix1s7xkp60gwpzk8wiw5";
27 ./bug_report_page.php.diff
28 ./bugnote_add.php.diff
29 ./bugnote_add_inc.php.diff
33 ln -s ${mantis_config} $out/config/config_inc.php