2021-04-27 19:26:39 +00:00
|
|
|
{ lib, stdenv, autoreconfHook, buildEnv, fetchFromGitHub, perl, perlPackages, makeWrapper, gnupg, openssl }:
|
2016-01-15 17:05:43 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "rt";
|
2023-10-20 10:06:55 +00:00
|
|
|
version = "5.0.5";
|
2016-01-25 15:21:09 +00:00
|
|
|
|
2021-04-27 19:26:39 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
owner = "bestpractical";
|
2023-10-20 10:06:55 +00:00
|
|
|
hash = "sha256-4E6xEk1sIiNBKJT4jD+SNK8Fs+hX8EuTv+jD1U1g6qY=";
|
2016-01-15 17:05:43 +00:00
|
|
|
};
|
|
|
|
|
2021-04-27 19:26:39 +00:00
|
|
|
patches = [
|
|
|
|
./dont-check-users_groups.patch # needed for "make testdeps" to work in the build
|
|
|
|
./override-generated.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2022-04-05 07:34:48 +00:00
|
|
|
makeWrapper
|
2021-04-27 19:26:39 +00:00
|
|
|
];
|
2016-01-15 17:05:43 +00:00
|
|
|
|
2017-04-22 20:21:45 +00:00
|
|
|
buildInputs = [
|
|
|
|
perl
|
|
|
|
(buildEnv {
|
|
|
|
name = "rt-perl-deps";
|
2020-02-20 22:59:52 +00:00
|
|
|
paths = with perlPackages; (requiredPerlModules [
|
2021-04-27 19:26:39 +00:00
|
|
|
ApacheSession
|
|
|
|
BusinessHours
|
|
|
|
CGIEmulatePSGI
|
|
|
|
CGIPSGI
|
|
|
|
CSSMinifierXS
|
|
|
|
CSSSquish
|
|
|
|
ConvertColor
|
|
|
|
CryptEksblowfish
|
|
|
|
CryptSSLeay
|
|
|
|
CryptX509
|
|
|
|
DBDPg
|
|
|
|
DBIxSearchBuilder
|
|
|
|
DataGUID
|
|
|
|
DataICal
|
|
|
|
DataPage
|
|
|
|
DataPagePageset
|
|
|
|
DateExtract
|
|
|
|
DateManip
|
|
|
|
DateTimeFormatNatural
|
|
|
|
DevelGlobalDestruction
|
|
|
|
EmailAddress
|
|
|
|
EmailAddressList
|
|
|
|
EncodeDetect
|
|
|
|
EncodeHanExtra
|
|
|
|
FCGI
|
|
|
|
FCGIProcManager
|
|
|
|
FileShareDir
|
|
|
|
FileWhich
|
|
|
|
GD
|
|
|
|
GDGraph
|
|
|
|
GnuPGInterface
|
2023-10-20 10:06:55 +00:00
|
|
|
GraphViz2
|
2021-04-27 19:26:39 +00:00
|
|
|
HTMLFormatExternal
|
|
|
|
HTMLFormatTextWithLinks
|
|
|
|
HTMLFormatTextWithLinksAndTables
|
|
|
|
HTMLGumbo
|
|
|
|
HTMLMason
|
|
|
|
HTMLMasonPSGIHandler
|
|
|
|
HTMLQuoted
|
|
|
|
HTMLRewriteAttributes
|
|
|
|
HTMLScrubber
|
|
|
|
IPCRun
|
|
|
|
IPCRun3
|
|
|
|
JSON
|
|
|
|
JavaScriptMinifierXS
|
|
|
|
LWP
|
|
|
|
LWPProtocolHttps
|
|
|
|
LocaleMaketextFuzzy
|
|
|
|
LocaleMaketextLexicon
|
|
|
|
LogDispatch
|
|
|
|
MIMETools
|
|
|
|
MIMETypes
|
|
|
|
MailTools
|
|
|
|
ModulePath
|
|
|
|
ModuleRefresh
|
|
|
|
ModuleVersionsReport
|
|
|
|
Moose
|
|
|
|
MooseXNonMoose
|
|
|
|
MooseXRoleParameterized
|
|
|
|
MozillaCA
|
|
|
|
NetCIDR
|
|
|
|
NetIP
|
2022-06-21 04:23:01 +00:00
|
|
|
ParallelForkManager
|
2021-04-27 19:26:39 +00:00
|
|
|
PathDispatcher
|
|
|
|
PerlIOeol
|
|
|
|
Plack
|
|
|
|
PodParser
|
|
|
|
RegexpCommon
|
|
|
|
RegexpCommonnetCIDR
|
|
|
|
RegexpIPv6
|
|
|
|
RoleBasic
|
|
|
|
ScopeUpper
|
|
|
|
Starlet
|
|
|
|
Starman
|
|
|
|
StringShellQuote
|
|
|
|
SymbolGlobalName
|
|
|
|
TermReadKey
|
|
|
|
TextPasswordPronounceable
|
|
|
|
TextQuoted
|
|
|
|
TextTemplate
|
|
|
|
TextWikiFormat
|
|
|
|
TextWordDiff
|
|
|
|
TextWrapper
|
|
|
|
TimeParseDate
|
|
|
|
TreeSimple
|
|
|
|
UNIVERSALrequire
|
|
|
|
WebMachine
|
|
|
|
XMLRSS
|
|
|
|
perlldap
|
2017-04-22 20:21:45 +00:00
|
|
|
]);
|
|
|
|
})
|
|
|
|
];
|
2016-01-15 17:05:43 +00:00
|
|
|
|
2021-04-27 19:26:39 +00:00
|
|
|
preAutoreconf = ''
|
2022-07-18 13:00:07 +00:00
|
|
|
echo rt-${version} > .tag
|
2021-04-27 19:26:39 +00:00
|
|
|
'';
|
2017-04-22 20:21:45 +00:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="$configureFlags --with-web-user=$UID"
|
|
|
|
configureFlags="$configureFlags --with-web-group=$(id -g)"
|
|
|
|
configureFlags="$configureFlags --with-rt-group=$(id -g)"
|
|
|
|
configureFlags="$configureFlags --with-bin-owner=$UID"
|
|
|
|
configureFlags="$configureFlags --with-libs-owner=$UID"
|
|
|
|
configureFlags="$configureFlags --with-libs-group=$(id -g)"
|
|
|
|
'';
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-graphviz"
|
|
|
|
"--enable-gd"
|
|
|
|
"--enable-gpg"
|
2021-04-27 19:26:39 +00:00
|
|
|
"--enable-smime"
|
|
|
|
"--with-db-type=Pg"
|
2017-04-22 20:21:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2021-04-27 19:26:39 +00:00
|
|
|
make testdeps
|
2017-04-22 20:21:45 +00:00
|
|
|
'';
|
2016-01-15 17:05:43 +00:00
|
|
|
|
2021-04-27 19:26:39 +00:00
|
|
|
postFixup = ''
|
|
|
|
for i in $(find $out/bin -type f); do
|
|
|
|
wrapProgram $i --prefix PERL5LIB ':' $PERL5LIB \
|
|
|
|
--prefix PATH ":" "${lib.makeBinPath [ openssl gnupg ]}"
|
2017-04-22 20:21:45 +00:00
|
|
|
done
|
2021-04-27 19:26:39 +00:00
|
|
|
|
|
|
|
rm -r $out/var
|
|
|
|
mkdir -p $out/var/data
|
|
|
|
ln -s /var/log/rt $out/var/log
|
|
|
|
ln -s /run/rt/mason_data $out/var/mason_data
|
|
|
|
ln -s /var/lib/rt/shredder $out/var/data/RT-Shredder
|
|
|
|
ln -s /var/lib/rt/smime $out/var/data/smime
|
|
|
|
ln -s /var/lib/rt/gpg $out/var/data/gpg
|
2016-01-15 17:05:43 +00:00
|
|
|
'';
|
2016-08-02 16:06:29 +00:00
|
|
|
|
|
|
|
meta = {
|
2021-01-15 07:07:56 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2016-01-15 17:05:43 +00:00
|
|
|
}
|