1 { mantis_config ? "/etc/mantisbt/config_inc.php", stdenv, fetchurl, lib, callPackage}:
3 pluginNames = [ "slack" "source-integration" ];
4 allPlugins = lib.attrsets.genAttrs pluginNames
5 (name: callPackage (./plugins + "/${name}") {});
6 toPassthru = pkg: plugins: {
7 inherit plugins allPlugins;
8 withPlugins = withPlugins pkg;
10 withPlugins = pkg: toPlugins:
12 plugins = toPlugins allPlugins;
14 if builtins.hasAttr "selector" n then
15 "ln -sf ${n}/${n.selector} $out/plugins/"
17 "ln -sf ${n} $out/plugins/${n.pluginName}";
18 newMantisbt = pkg.overrideAttrs(old: {
19 installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallPlugin plugins);
20 passthru = toPassthru newMantisbt (pkg.plugins ++ plugins);
23 package = stdenv.mkDerivation rec {
24 name = "mantisbt-${version}";
27 url = "https://downloads.sourceforge.net/project/mantisbt/mantis-stable/${version}/${name}.tar.gz";
28 sha256 = "13lx569dp1gibq5daqp7dj6gsqic85rrix1s7xkp60gwpzk8wiw5";
32 ./bug_report_page.php.diff
33 ./bugnote_add.php.diff
34 ./bugnote_add_inc.php.diff
38 ln -s ${mantis_config} $out/config/config_inc.php
41 passthru = toPassthru package [];