2017-04-22 22:21:45 +02:00
|
|
|
{ stdenv, buildEnv, fetchurl, perl, perlPackages, makeWrapper }:
|
2016-01-15 18:05:43 +01:00
|
|
|
|
2017-04-22 22:21:45 +02:00
|
|
|
# This package isn't extremely useful as it is, but is getting close.
|
|
|
|
# After running:
|
|
|
|
#
|
|
|
|
# nix-build . -A rt
|
|
|
|
#
|
|
|
|
# I created a config file named myconfig.pm with:
|
|
|
|
#
|
|
|
|
# use utf8;
|
|
|
|
# Set($rtname, '127.0.0.1');
|
|
|
|
# # These dirs need to be pre-created:
|
|
|
|
# Set($MasonSessionDir, '/home/grahamc/foo/sessiondir/');
|
|
|
|
# Set($MasonDataDir, '/home/grahamc/foo/localstate/');
|
|
|
|
# Set($WebPort, 8080);
|
|
|
|
#
|
|
|
|
# Set($DatabaseType, "SQLite");
|
|
|
|
# Set( $DatabaseName, '/home/grahamc/projects/foo/my.db' );
|
|
|
|
#
|
|
|
|
# 1;
|
|
|
|
#
|
|
|
|
# and ran
|
|
|
|
#
|
|
|
|
# RT_SITE_CONFIG=$(pwd)/myconfig.pm ./result/bin/rt-setup-database --action init
|
|
|
|
#
|
|
|
|
# Then:
|
|
|
|
#
|
|
|
|
# RT_SITE_CONFIG=$(pwd)/myconfig.pm ./result/bin/rt-server
|
|
|
|
#
|
|
|
|
# Make sure to check out result/etc/RT_Config.pm
|
|
|
|
#
|
|
|
|
# Good luck.
|
2016-01-15 18:05:43 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-25 16:21:09 +01:00
|
|
|
name = "rt-${version}";
|
|
|
|
|
2019-04-16 11:45:20 +02:00
|
|
|
version = "4.4.4";
|
2016-01-15 18:05:43 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.bestpractical.com/pub/rt/release/${name}.tar.gz";
|
2019-04-16 11:45:20 +02:00
|
|
|
sha256 = "1108jhz1gvalcfnbzgpbk7fkxzxkkc7m74a3bnwyjzldlyj1dhrl";
|
2016-01-15 18:05:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./override-generated.patch ];
|
|
|
|
|
2017-04-22 22:21:45 +02:00
|
|
|
buildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
perl
|
|
|
|
(buildEnv {
|
|
|
|
name = "rt-perl-deps";
|
|
|
|
paths = (with perlPackages; [
|
|
|
|
ApacheSession BusinessHours CGIEmulatePSGI CGIPSGI
|
|
|
|
CSSMinifierXP CSSSquish ConvertColor CryptEksblowfish
|
|
|
|
CryptSSLeay DBDSQLite DBDmysql DBIxSearchBuilder DataGUID
|
|
|
|
DataICal DataPagePageset DateExtract DateManip
|
|
|
|
DateTimeFormatNatural DevelGlobalDestruction EmailAddress
|
|
|
|
EmailAddressList FCGI FCGIProcManager FileShareDir FileWhich
|
|
|
|
GD GDGraph GnuPGInterface GraphViz HTMLFormatTextWithLinks
|
|
|
|
HTMLFormatTextWithLinksAndTables HTMLMason
|
|
|
|
HTMLMasonPSGIHandler HTMLQuoted HTMLRewriteAttributes
|
|
|
|
HTMLScrubber IPCRun IPCRun3 JSON JavaScriptMinifierXS LWP
|
|
|
|
LWPProtocolHttps LocaleMaketextFuzzy LocaleMaketextLexicon
|
|
|
|
LogDispatch MIMETools MIMETypes MailTools ModuleRefresh
|
|
|
|
ModuleVersionsReport MozillaCA NetCIDR NetIP PerlIOeol Plack
|
|
|
|
RegexpCommon RegexpCommonnetCIDR RegexpIPv6 RoleBasic
|
|
|
|
ScopeUpper Starlet SymbolGlobalName TermReadKey
|
|
|
|
TextPasswordPronounceable TextQuoted TextTemplate
|
|
|
|
TextWikiFormat TextWrapper TimeParseDate TreeSimple
|
|
|
|
UNIVERSALrequire XMLRSS
|
|
|
|
]);
|
|
|
|
})
|
|
|
|
];
|
2016-01-15 18:05:43 +01:00
|
|
|
|
2017-04-22 22:21:45 +02: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"
|
|
|
|
"--with-db-type=SQLite"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make testdeps | grep -i missing | sort
|
|
|
|
'';
|
2016-01-15 18:05:43 +01:00
|
|
|
|
2017-04-22 22:21:45 +02:00
|
|
|
preFixup = ''
|
|
|
|
for i in $(find $out/bin -type f; find $out/sbin -type f); do
|
|
|
|
wrapProgram $i \
|
|
|
|
--prefix PERL5LIB ':' $PERL5LIB
|
|
|
|
done
|
2016-01-15 18:05:43 +01:00
|
|
|
'';
|
2016-08-02 18:06:29 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
2016-01-15 18:05:43 +01:00
|
|
|
}
|