3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/mail/sympa/default.nix

119 lines
2.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, perl, fetchFromGitHub, autoreconfHook, nixosTests }:
2019-07-06 19:54:16 +01:00
let
dataDir = "/var/lib/sympa";
runtimeDir = "/run/sympa";
perlEnv = perl.withPackages (p: with p; [
ArchiveZip
CGI
CGIFast
ClassSingleton
DateTime
DBI
DateTimeFormatMail
DateTimeTimeZone
Encode
FCGI
FileCopyRecursive
FileNFSLock
FilePath
HTMLParser
HTMLFormatter
HTMLTree
HTMLStripScriptsParser
IO
IOStringy
LWP
libintl_perl
MHonArc
MIMECharset
MIMETools
MIMEEncWords
MIMELiteHTML
MailTools
NetCIDR
ScalarListUtils
SysSyslog
TermProgressBar
TemplateToolkit
URI
UnicodeLineBreak
XMLLibXML
### Features
Clone
CryptEksblowfish
DBDPg
DBDSQLite
DBDmysql
DataPassword
EncodeLocale
IOSocketSSL
MailDKIM
NetDNS
perlldap
libnet
2019-07-06 19:54:16 +01:00
SOAPLite
]);
in
stdenv.mkDerivation rec {
pname = "sympa";
2021-08-22 04:10:41 +01:00
version = "6.2.64";
2019-07-06 19:54:16 +01:00
src = fetchFromGitHub {
owner = "sympa-community";
repo = pname;
rev = version;
2021-08-22 04:10:41 +01:00
sha256 = "sha256-7bBOhx6sDyln37OEgRLJwgu0rklJm872hINog2EJ/+E=";
2019-07-06 19:54:16 +01:00
};
configureFlags = [
"--enable-fhs"
2019-07-06 19:54:16 +01:00
"--without-initdir"
"--without-unitsdir"
"--without-smrshdir"
"--with-lockdir=${runtimeDir}"
"--with-piddir=${runtimeDir}"
"--with-confdir=${dataDir}/etc"
"--sysconfdir=${dataDir}/etc"
"--with-spooldir=${dataDir}/spool"
"--with-expldir=${dataDir}/list_data"
];
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ perlEnv ];
patches = [ ./make-docs.patch ];
prePatch = ''
patchShebangs po/sympa/add-lang.pl
'';
preInstall = ''
mkdir "$TMP/bin"
for i in chown chgrp chmod; do
echo '#!${stdenv.shell}' >> "$TMP/bin/$i"
chmod +x "$TMP/bin/$i"
done
PATH="$TMP/bin:$PATH"
'';
postInstall = ''
rm -rf "$TMP/bin"
'';
2020-03-21 02:58:37 +00:00
passthru.tests = {
inherit (nixosTests) sympa;
};
meta = with lib; {
2019-07-06 19:54:16 +01:00
description = "Open source mailing list manager";
homepage = "https://www.sympa.org";
license = licenses.gpl2;
maintainers = with maintainers; [ sorki mmilata ];
platforms = platforms.all;
};
}