diff options
Diffstat (limited to 'pkgs/webapps/mantisbt_2/default.nix')
-rw-r--r-- | pkgs/webapps/mantisbt_2/default.nix | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/pkgs/webapps/mantisbt_2/default.nix b/pkgs/webapps/mantisbt_2/default.nix deleted file mode 100644 index 5aa04d1..0000000 --- a/pkgs/webapps/mantisbt_2/default.nix +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | { mantis_config ? "/etc/mantisbt/config_inc.php", stdenv, fetchurl, lib, callPackage}: | ||
2 | let | ||
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; | ||
9 | }; | ||
10 | withPlugins = pkg: toPlugins: | ||
11 | let | ||
12 | plugins = toPlugins allPlugins; | ||
13 | toInstallPlugin = n: | ||
14 | if builtins.hasAttr "selector" n then | ||
15 | "ln -sf ${n}/${n.selector} $out/plugins/" | ||
16 | else | ||
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); | ||
21 | }); | ||
22 | in newMantisbt; | ||
23 | package = stdenv.mkDerivation rec { | ||
24 | name = "mantisbt-${version}"; | ||
25 | version = "2.21.0"; | ||
26 | src = fetchurl { | ||
27 | url = "https://downloads.sourceforge.net/project/mantisbt/mantis-stable/${version}/${name}.tar.gz"; | ||
28 | sha256 = "13lx569dp1gibq5daqp7dj6gsqic85rrix1s7xkp60gwpzk8wiw5"; | ||
29 | }; | ||
30 | patches = [ | ||
31 | ./bug_report.php.diff | ||
32 | ./bug_report_page.php.diff | ||
33 | ./bugnote_add.php.diff | ||
34 | ./bugnote_add_inc.php.diff | ||
35 | ]; | ||
36 | installPhase = '' | ||
37 | cp -a . $out | ||
38 | ln -s ${mantis_config} $out/config/config_inc.php | ||
39 | ''; | ||
40 | |||
41 | passthru = toPassthru package []; | ||
42 | }; | ||
43 | in package | ||