diff options
Diffstat (limited to 'pkgs/webapps/mantisbt_2/default.nix')
-rw-r--r-- | pkgs/webapps/mantisbt_2/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/webapps/mantisbt_2/default.nix b/pkgs/webapps/mantisbt_2/default.nix new file mode 100644 index 0000000..3283a01 --- /dev/null +++ b/pkgs/webapps/mantisbt_2/default.nix | |||
@@ -0,0 +1,39 @@ | |||
1 | { mantis_config ? "/etc/mantisbt/config_inc.php", stdenv, fetchurl }: | ||
2 | let | ||
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/" | ||
9 | else | ||
10 | "ln -sf ${value} $out/plugins/${value.pluginName}" | ||
11 | ) plugins | ||
12 | )); | ||
13 | passthru.plugins = plugins; | ||
14 | passthru.withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins); | ||
15 | }); | ||
16 | package = stdenv.mkDerivation rec { | ||
17 | name = "mantisbt-${version}"; | ||
18 | version = "2.21.0"; | ||
19 | src = fetchurl { | ||
20 | url = "https://downloads.sourceforge.net/project/mantisbt/mantis-stable/${version}/${name}.tar.gz"; | ||
21 | sha256 = "13lx569dp1gibq5daqp7dj6gsqic85rrix1s7xkp60gwpzk8wiw5"; | ||
22 | }; | ||
23 | patches = [ | ||
24 | ./bug_report.php.diff | ||
25 | ./bug_report_page.php.diff | ||
26 | ./bugnote_add.php.diff | ||
27 | ./bugnote_add_inc.php.diff | ||
28 | ]; | ||
29 | installPhase = '' | ||
30 | cp -a . $out | ||
31 | ln -s ${mantis_config} $out/config/config_inc.php | ||
32 | ''; | ||
33 | |||
34 | passthru = { | ||
35 | plugins = []; | ||
36 | inherit withPlugins; | ||
37 | }; | ||
38 | }; | ||
39 | in package | ||