]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/webapps/mantisbt_2/default.nix
Remove deleted-to-trash dovecot plugin
[perso/Immae/Config/Nix.git] / pkgs / webapps / mantisbt_2 / default.nix
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 = old.passthru // {
14 inherit plugins;
15 withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
16 };
17 });
18 package = stdenv.mkDerivation rec {
19 name = "mantisbt-${version}";
20 version = "2.21.0";
21 src = fetchurl {
22 url = "https://downloads.sourceforge.net/project/mantisbt/mantis-stable/${version}/${name}.tar.gz";
23 sha256 = "13lx569dp1gibq5daqp7dj6gsqic85rrix1s7xkp60gwpzk8wiw5";
24 };
25 patches = [
26 ./bug_report.php.diff
27 ./bug_report_page.php.diff
28 ./bugnote_add.php.diff
29 ./bugnote_add_inc.php.diff
30 ];
31 installPhase = ''
32 cp -a . $out
33 ln -s ${mantis_config} $out/config/config_inc.php
34 '';
35
36 passthru = {
37 plugins = [];
38 inherit withPlugins;
39 };
40 };
41 in package