foswiki: drop package & httpd subservice

This commit is contained in:
Aaron Andersen 2019-07-11 19:46:06 -04:00
parent 434667420e
commit 649ec93c37
4 changed files with 6 additions and 124 deletions

View File

@ -323,6 +323,12 @@
The <literal>trac</literal> <literal>httpd.extraSubservice</literal> has been removed from nixpkgs because it was unmaintained.
</para>
</listitem>
<listitem>
<para>
The <literal>foswiki</literal> package and associated <literal>httpd.extraSubservice</literal> have been removed
from nixpkgs due to lack of maintainer.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View File

@ -1,78 +0,0 @@
{ config, pkgs, lib, serverInfo, ... }:
let
inherit (pkgs) foswiki;
inherit (serverInfo.serverConfig) user group;
inherit (config) vardir;
in
{
options.vardir = lib.mkOption {
type = lib.types.path;
default = "/var/www/foswiki";
description = "The directory where variable foswiki data will be stored and served from.";
};
# TODO: this will probably need to be better customizable
extraConfig =
let httpd-conf = pkgs.runCommand "foswiki-httpd.conf"
{ preferLocalBuild = true; }
''
substitute '${foswiki}/foswiki_httpd_conf.txt' "$out" \
--replace /var/www/foswiki/ "${vardir}/"
'';
in
''
RewriteEngine on
RewriteRule /foswiki/(.*) ${vardir}/$1
<Directory "${vardir}">
Require all granted
</Directory>
Include ${httpd-conf}
<Directory "${vardir}/pub">
Options FollowSymlinks
</Directory>
'';
/** This handles initial setup and updates.
It will probably need some tweaking, maybe per-site. */
startupScript = pkgs.writeScript "foswiki_startup.sh" (
let storeLink = "${vardir}/package"; in
''
[ -e '${storeLink}' ] || needs_setup=1
mkdir -p '${vardir}'
cd '${vardir}'
ln -sf -T '${foswiki}' '${storeLink}'
if [ -n "$needs_setup" ]; then # do initial setup
mkdir -p bin lib
# setup most of data/ as copies only
cp -r '${foswiki}'/data '${vardir}/'
rm -r '${vardir}'/data/{System,mime.types}
ln -sr -t '${vardir}/data/' '${storeLink}'/data/{System,mime.types}
ln -sr '${storeLink}/locale' .
mkdir pub
ln -sr '${storeLink}/pub/System' pub/
mkdir templates
ln -sr '${storeLink}'/templates/* templates/
ln -sr '${storeLink}/tools' .
mkdir -p '${vardir}'/working/{logs,tmp}
ln -sr '${storeLink}/working/README' working/ # used to check dir validity
chown -R '${user}:${group}' .
chmod +w -R .
fi
# bin/* and lib/* shall always be overwritten, in case files are added
ln -srf '${storeLink}'/bin/* '${vardir}/bin/'
ln -srf '${storeLink}'/lib/* '${vardir}/lib/'
''
/* Symlinking bin/ one-by-one ensures that ${vardir}/lib/LocalSite.cfg
is used instead of ${foswiki}/... */
);
}

View File

@ -1,44 +0,0 @@
{ stdenv, fetchurl, perlPackages }:
perlPackages.buildPerlPackage rec {
pname = "foswiki";
version = "2.1.0";
src = fetchurl {
url = "mirror://sourceforge/foswiki/${version}/Foswiki-${version}.tgz";
sha256 = "03286pb966h99zgickm2f20rgnqwp9wga5wfkdvirv084kjdh8vp";
};
outputs = [ "out" ];
buildInputs = with perlPackages; [
# minimum requirements from INSTALL.html#System_Requirements
AlgorithmDiff ArchiveTar AuthenSASL CGI CGISession CryptPasswdMD5
EmailMIME Encode Error FileCopyRecursive HTMLParser HTMLTree
IOSocketSSL JSON
LocaleMaketextLexicon LocaleMsgfmt
LWP URI perlPackages.Version
/*# optional dependencies
libapreq2 DBI DBDmysql DBDPg DBDSQLite FCGI FCGIProcManager
CryptSMIME CryptX509 ConvertPEM
*/
];
preConfigure = ''
touch Makefile.PL
patchShebangs .
'';
configureScript = "bin/configure";
# there's even no makefile
doCheck = false;
installPhase = ''cp -r . "$out" '';
meta = with stdenv.lib; {
description = "An open, programmable collaboration platform";
homepage = http://foswiki.org;
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@ -14281,8 +14281,6 @@ in
firebird = callPackage ../servers/firebird { icu = null; stdenv = gcc5Stdenv; };
firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = gcc5Stdenv; };
foswiki = callPackage ../servers/foswiki { };
frab = callPackage ../servers/web-apps/frab { };
freepops = callPackage ../servers/mail/freepops { };