git.iko.soy/typeable/nixpkgs
on master help sign in
rt: 4.4.4 -> 5.0.1
commit590ff316eb0e6e55b3d09b2374fe86401055e78f authorajs124 <git@ajs124.de> dateTue 27 Apr 2021, 21:26 (6 years ago) parentac641ca
2 files changed+134−61
pkgs/servers/rt/default.nix+122−61 pkgs/servers/rt/dont-check-users_groups.patch+12
pkgs/servers/rt/default.nix+122−61
@@ -1,46 +1,24 @@
1−{ lib, stdenv, buildEnv, fetchurl, perl, perlPackages, makeWrapper }:
1+{ lib, stdenv, autoreconfHook, buildEnv, fetchFromGitHub, perl, perlPackages, makeWrapper, gnupg, openssl }:
22
3−# This package isn't extremely useful as it is, but is getting close.
4−# After running:
5−#
6−# nix-build . -A rt
7−#
8−# I created a config file named myconfig.pm with:
9−#
10−# use utf8;
11−# Set($rtname, '127.0.0.1');
12−# # These dirs need to be pre-created:
13−# Set($MasonSessionDir, '/home/grahamc/foo/sessiondir/');
14−# Set($MasonDataDir, '/home/grahamc/foo/localstate/');
15−# Set($WebPort, 8080);
16−#
17−# Set($DatabaseType, "SQLite");
18−# Set( $DatabaseName, '/home/grahamc/projects/foo/my.db' );
19−#
20−# 1;
21−#
22−# and ran
23−#
24−# RT_SITE_CONFIG=$(pwd)/myconfig.pm ./result/bin/rt-setup-database --action init
25−#
26−# Then:
27−#
28−# RT_SITE_CONFIG=$(pwd)/myconfig.pm ./result/bin/rt-server
29−#
30−# Make sure to check out result/etc/RT_Config.pm
31−#
32−# Good luck.
333stdenv.mkDerivation rec {
344 pname = "rt";
5+ version = "5.0.1";
356
36− version = "4.4.4";
37−
38− src = fetchurl {
39− url = "https://download.bestpractical.com/pub/rt/release/${pname}-${version}.tar.gz";
40− sha256 = "1108jhz1gvalcfnbzgpbk7fkxzxkkc7m74a3bnwyjzldlyj1dhrl";
7+ src = fetchFromGitHub {
8+ repo = pname;
9+ rev = "${pname}-${version}";
10+ owner = "bestpractical";
11+ sha256 = "1qqh6w094x7dljz001va802v4s6mixs9lkhs2cs47lf5ph3vwq2q";
4112 };
4213
43− patches = [ ./override-generated.patch ];
14+ patches = [
15+ ./dont-check-users_groups.patch # needed for "make testdeps" to work in the build
16+ ./override-generated.patch
17+ ];
18+
19+ nativeBuildInputs = [
20+ autoreconfHook
21+ ];
4422
4523 buildInputs = [
4624 makeWrapper
@@ -48,28 +26,102 @@ stdenv.mkDerivation rec {
4826 (buildEnv {
4927 name = "rt-perl-deps";
5028 paths = with perlPackages; (requiredPerlModules [
51− ApacheSession BusinessHours CGIEmulatePSGI CGIPSGI
52− CSSMinifierXS CSSSquish ConvertColor CryptEksblowfish
53− CryptSSLeay DBDSQLite DBDmysql DBIxSearchBuilder DataGUID
54− DataICal DataPagePageset DateExtract DateManip
55− DateTimeFormatNatural DevelGlobalDestruction EmailAddress
56− EmailAddressList FCGI FCGIProcManager FileShareDir FileWhich
57− GD GDGraph GnuPGInterface GraphViz HTMLFormatTextWithLinks
58− HTMLFormatTextWithLinksAndTables HTMLMason
59− HTMLMasonPSGIHandler HTMLQuoted HTMLRewriteAttributes
60− HTMLScrubber IPCRun IPCRun3 JSON JavaScriptMinifierXS LWP
61− LWPProtocolHttps LocaleMaketextFuzzy LocaleMaketextLexicon
62− LogDispatch MIMETools MIMETypes MailTools ModuleRefresh
63− ModuleVersionsReport MozillaCA NetCIDR NetIP PerlIOeol Plack
64− RegexpCommon RegexpCommonnetCIDR RegexpIPv6 RoleBasic
65− ScopeUpper Starlet SymbolGlobalName TermReadKey
66− TextPasswordPronounceable TextQuoted TextTemplate
67− TextWikiFormat TextWrapper TimeParseDate TreeSimple
68− UNIVERSALrequire XMLRSS
29+ ApacheSession
30+ BusinessHours
31+ CGIEmulatePSGI
32+ CGIPSGI
33+ CSSMinifierXS
34+ CSSSquish
35+ ConvertColor
36+ CryptEksblowfish
37+ CryptSSLeay
38+ CryptX509
39+ DBDPg
40+ DBIxSearchBuilder
41+ DataGUID
42+ DataICal
43+ DataPage
44+ DataPagePageset
45+ DateExtract
46+ DateManip
47+ DateTimeFormatNatural
48+ DevelGlobalDestruction
49+ EmailAddress
50+ EmailAddressList
51+ EncodeDetect
52+ EncodeHanExtra
53+ FCGI
54+ FCGIProcManager
55+ FileShareDir
56+ FileWhich
57+ GD
58+ GDGraph
59+ GnuPGInterface
60+ GraphViz
61+ HTMLFormatExternal
62+ HTMLFormatTextWithLinks
63+ HTMLFormatTextWithLinksAndTables
64+ HTMLGumbo
65+ HTMLMason
66+ HTMLMasonPSGIHandler
67+ HTMLQuoted
68+ HTMLRewriteAttributes
69+ HTMLScrubber
70+ IPCRun
71+ IPCRun3
72+ JSON
73+ JavaScriptMinifierXS
74+ LWP
75+ LWPProtocolHttps
76+ LocaleMaketextFuzzy
77+ LocaleMaketextLexicon
78+ LogDispatch
79+ MIMETools
80+ MIMETypes
81+ MailTools
82+ ModulePath
83+ ModuleRefresh
84+ ModuleVersionsReport
85+ Moose
86+ MooseXNonMoose
87+ MooseXRoleParameterized
88+ MozillaCA
89+ NetCIDR
90+ NetIP
91+ PathDispatcher
92+ PerlIOeol
93+ Plack
94+ PodParser
95+ RegexpCommon
96+ RegexpCommonnetCIDR
97+ RegexpIPv6
98+ RoleBasic
99+ ScopeUpper
100+ Starlet
101+ Starman
102+ StringShellQuote
103+ SymbolGlobalName
104+ TermReadKey
105+ TextPasswordPronounceable
106+ TextQuoted
107+ TextTemplate
108+ TextWikiFormat
109+ TextWordDiff
110+ TextWrapper
111+ TimeParseDate
112+ TreeSimple
113+ UNIVERSALrequire
114+ WebMachine
115+ XMLRSS
116+ perlldap
69117 ]);
70118 })
71119 ];
72120
121+ preAutoreconf = ''
122+ substituteInPlace configure.ac \
123+ --replace "rt-3.9.EXPORTED" "rt-${version}"
124+ '';
73125 preConfigure = ''
74126 configureFlags="$configureFlags --with-web-user=$UID"
75127 configureFlags="$configureFlags --with-web-group=$(id -g)"
@@ -82,18 +134,27 @@ stdenv.mkDerivation rec {
82134 "--enable-graphviz"
83135 "--enable-gd"
84136 "--enable-gpg"
85− "--with-db-type=SQLite"
137+ "--enable-smime"
138+ "--with-db-type=Pg"
86139 ];
87140
88141 buildPhase = ''
89− make testdeps | grep -i missing | sort
142+ make testdeps
90143 '';
91144
92− preFixup = ''
93− for i in $(find $out/bin -type f; find $out/sbin -type f); do
94− wrapProgram $i \
95− --prefix PERL5LIB ':' $PERL5LIB
145+ postFixup = ''
146+ for i in $(find $out/bin -type f); do
147+ wrapProgram $i --prefix PERL5LIB ':' $PERL5LIB \
148+ --prefix PATH ":" "${lib.makeBinPath [ openssl gnupg ]}"
96149 done
150+
151+ rm -r $out/var
152+ mkdir -p $out/var/data
153+ ln -s /var/log/rt $out/var/log
154+ ln -s /run/rt/mason_data $out/var/mason_data
155+ ln -s /var/lib/rt/shredder $out/var/data/RT-Shredder
156+ ln -s /var/lib/rt/smime $out/var/data/smime
157+ ln -s /var/lib/rt/gpg $out/var/data/gpg
97158 '';
98159
99160 meta = {
pkgs/servers/rt/dont-check-users_groups.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
2+index e51feb197..d75b1bc4e 100644
3+--- a/sbin/rt-test-dependencies.in
4++++ b/sbin/rt-test-dependencies.in
5+@@ -423,6 +423,7 @@ sub check_perl_version {
6+ }
7+
8+ sub check_users_groups {
9++ return 0;
10+ section("users / groups");
11+
12+ my $fails = 0;