Merge pull request #25126 from grahamc/rt

RT: Improve Packaging

authored by Graham Christensen and committed by GitHub 7ff2fde2 1931ad0e

+198 -10
+81 -7
pkgs/servers/rt/default.nix
··· 1 - { stdenv, fetchurl, perl }: 1 + { stdenv, buildEnv, fetchurl, perl, perlPackages, makeWrapper }: 2 2 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. 3 33 stdenv.mkDerivation rec { 4 34 name = "rt-${version}"; 5 35 ··· 12 42 13 43 patches = [ ./override-generated.patch ]; 14 44 15 - buildInputs = [ perl ]; 45 + buildInputs = [ 46 + makeWrapper 47 + perl 48 + (buildEnv { 49 + name = "rt-perl-deps"; 50 + paths = (with perlPackages; [ 51 + ApacheSession BusinessHours CGIEmulatePSGI CGIPSGI 52 + CSSMinifierXP 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 69 + ]); 70 + }) 71 + ]; 16 72 17 - dontBuild = true; 73 + preConfigure = '' 74 + configureFlags="$configureFlags --with-web-user=$UID" 75 + configureFlags="$configureFlags --with-web-group=$(id -g)" 76 + configureFlags="$configureFlags --with-rt-group=$(id -g)" 77 + configureFlags="$configureFlags --with-bin-owner=$UID" 78 + configureFlags="$configureFlags --with-libs-owner=$UID" 79 + configureFlags="$configureFlags --with-libs-group=$(id -g)" 80 + ''; 81 + configureFlags = [ 82 + "--enable-graphviz" 83 + "--enable-gd" 84 + "--enable-gpg" 85 + "--with-db-type=SQLite" 86 + ]; 18 87 19 - installPhase = '' 20 - mkdir $out 21 - cp -a {bin,docs,etc,lib,sbin,share} $out 22 - find $out -name '*.in' -exec rm '{}' \; 88 + buildPhase = '' 89 + make testdeps | grep -i missing | sort 90 + ''; 91 + 92 + preFixup = '' 93 + for i in $(find $out/bin -type f; find $out/sbin -type f); do 94 + wrapProgram $i \ 95 + --prefix PERL5LIB ':' $PERL5LIB 96 + done 23 97 ''; 24 98 25 99 meta = {
+117 -3
pkgs/top-level/perl-packages.nix
··· 734 734 ]; 735 735 }; 736 736 737 + BusinessHours = buildPerlPackage rec { 738 + name = "Business-Hours-0.12"; 739 + src = fetchurl { 740 + url = "https://cpan.metacpan.org/authors/id/R/RU/RUZ/Business-Hours-0.12.tar.gz"; 741 + sha256 = "15c5g278m1x121blspf4bymxp89vysizr3z6s1g3sbpfdkrn4gyv"; 742 + }; 743 + buildInputs = [ TestPod TestPodCoverage ]; 744 + propagatedBuildInputs = [ SetIntSpan TimeLocal ]; 745 + meta = { 746 + description = "Calculate business hours in a time period"; 747 + }; 748 + }; 749 + 737 750 BusinessISBN = buildPerlPackage rec { 738 751 name = "Business-ISBN-2.09"; 739 752 src = fetchurl { ··· 2777 2790 buildInputs = [ Clone ]; 2778 2791 }; 2779 2792 2793 + CSSMinifierXP = buildPerlPackage rec { 2794 + name = "CSS-Minifier-XS-0.09"; 2795 + src = fetchurl { 2796 + url = "https://cpan.metacpan.org/authors/id/G/GT/GTERMARS/CSS-Minifier-XS-0.09.tar.gz"; 2797 + sha256 = "1myswrmh0sqp5xjpp03x45z8arfmgkjx0srl3r6kjsyzl1zrk9l8"; 2798 + }; 2799 + meta = { 2800 + description = "XS based CSS minifier"; 2801 + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 2802 + }; 2803 + }; 2804 + 2780 2805 CSSSquish = buildPerlPackage { 2781 2806 name = "CSS-Squish-0.10"; 2782 2807 src = fetchurl { ··· 2995 3020 sha256 = "1hvi92c4h2angryc6pngw7gbm3ysc2jfmyxk2wh9ia4vdwpbs554"; 2996 3021 }; 2997 3022 propagatedBuildInputs = [TestException ClassAccessorChained]; 3023 + }; 3024 + 3025 + DataPagePageset = buildPerlPackage rec { 3026 + name = "Data-Page-Pageset-1.02"; 3027 + src = fetchurl { 3028 + url = "https://cpan.metacpan.org/authors/id/C/CH/CHUNZI/Data-Page-Pageset-1.02.tar.gz"; 3029 + sha256 = "142isi8la383dbjxj7lfgcbmmrpzwckcc4wma6rdl8ryajsipb6f"; 3030 + }; 3031 + buildInputs = [ TestPod TestPodCoverage ]; 3032 + propagatedBuildInputs = [ DataPage ]; 3033 + meta = { 3034 + description = "change long page list to be shorter and well navigate"; 3035 + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 3036 + }; 2998 3037 }; 2999 3038 3000 3039 DataPassword = buildPerlPackage { ··· 5694 5733 makeMakerFlags = "--lib_png_path=${pkgs.libpng.out} --lib_jpeg_path=${pkgs.libjpeg.out} --lib_zlib_path=${pkgs.zlib.out} --lib_ft_path=${pkgs.freetype.out} --lib_fontconfig_path=${pkgs.fontconfig.lib} --lib_xpm_path=${pkgs.xorg.libXpm.out}"; 5695 5734 }; 5696 5735 5736 + GDGraph = buildPerlPackage rec { 5737 + name = "GDGraph-1.54"; 5738 + src = fetchurl { 5739 + url = "https://cpan.metacpan.org/authors/id/R/RU/RUZ/GDGraph-1.54.tar.gz"; 5740 + sha256 = "0kzsdc07ycxjainmz0dnsclb15w2j1y7g8b5mcb7vhannq85qvxr"; 5741 + }; 5742 + propagatedBuildInputs = [ GD GDText ]; 5743 + buildInputs = [ TestException CaptureTiny ]; 5744 + meta = { 5745 + description = "Graph Plotting Module for Perl 5"; 5746 + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 5747 + }; 5748 + }; 5749 + 5697 5750 GDSecurityImage = buildPerlPackage { 5698 5751 name = "GD-SecurityImage-1.72"; 5699 5752 src = fetchurl { ··· 5707 5760 }; 5708 5761 }; 5709 5762 5763 + GDText = buildPerlPackage rec { 5764 + name = "GDTextUtil-0.86"; 5765 + src = fetchurl { 5766 + url = "https://cpan.metacpan.org/authors/id/M/MV/MVERB/GDTextUtil-0.86.tar.gz"; 5767 + sha256 = "1g0nc7fz4d672ag7brlrrcz7ibm98x49qs75bq9z957ybkwcnvl8"; 5768 + }; 5769 + propagatedBuildInputs = [ GD ]; 5770 + meta = { 5771 + description = "Text utilities for use with GD"; 5772 + }; 5773 + }; 5774 + 5710 5775 GeoIP = buildPerlPackage rec { 5711 5776 name = "Geo-IP-1.45"; 5712 5777 src = fetchurl { ··· 6832 6897 sha256 = "74d22c44b5ad2e7190e2786e8a17d74bbf4cef89b4d1157ba33598b5a2720dad"; 6833 6898 }; 6834 6899 }; 6835 - 6900 + 6836 6901 IOPager = buildPerlPackage { 6837 6902 name = "IO-Pager-0.06"; 6838 6903 src = fetchurl { ··· 7136 7201 }; 7137 7202 }; 7138 7203 7204 + JavaScriptMinifierXS = buildPerlPackage rec { 7205 + name = "JavaScript-Minifier-XS-0.11"; 7206 + src = fetchurl { 7207 + url = "https://cpan.metacpan.org/authors/id/G/GT/GTERMARS/JavaScript-Minifier-XS-0.11.tar.gz"; 7208 + sha256 = "1vlyhckpjbrg2v4dy9szsxxl0q44n0y1xl763mg2y2ym9g5144hm"; 7209 + }; 7210 + propagatedBuildInputs = [ ]; 7211 + meta = { 7212 + description = "XS based JavaScript minifier"; 7213 + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 7214 + }; 7215 + }; 7216 + 7217 + 7139 7218 JSON = buildPerlPackage { 7140 7219 name = "JSON-2.90"; 7141 7220 src = fetchurl { ··· 8225 8304 buildInputs = [ ProcWaitStat ]; 8226 8305 }; 8227 8306 8307 + MIMETools = buildPerlPackage rec { 8308 + name = "MIME-tools-5.509"; 8309 + src = fetchurl { 8310 + url = "https://cpan.metacpan.org/authors/id/D/DS/DSKOLL/MIME-tools-5.509.tar.gz"; 8311 + sha256 = "0wv9rzx5j1wjm01c3dg48qk9wlbm6iyf91j536idk09xj869ymv4"; 8312 + }; 8313 + propagatedBuildInputs = [ 8314 + MailTools 8315 + FilePath 8316 + FileTemp 8317 + MIMEBase64 8318 + ]; 8319 + buildInputs = [ 8320 + TestDeep 8321 + TestPod 8322 + TestPodCoverage 8323 + ]; 8324 + meta = { 8325 + description = "class for parsed-and-decoded MIME message"; 8326 + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 8327 + }; 8328 + }; 8329 + 8228 8330 MIMELite = buildPerlPackage rec { 8229 8331 name = "MIME-Lite-3.030"; 8230 8332 src = fetchurl { ··· 11468 11570 }; 11469 11571 }; 11470 11572 11573 + SetIntSpan = buildPerlPackage rec { 11574 + name = "Set-IntSpan-1.19"; 11575 + src = fetchurl { 11576 + url = "https://cpan.metacpan.org/authors/id/S/SW/SWMCD/Set-IntSpan-1.19.tar.gz"; 11577 + sha256 = "1l6znd40ylzvfwl02rlqzvakv602rmvwgm2xd768fpgc2fdm9dqi"; 11578 + }; 11579 + 11580 + meta = { 11581 + description = "Manages sets of integers"; 11582 + }; 11583 + }; 11584 + 11471 11585 SetObject = buildPerlPackage { 11472 11586 name = "Set-Object-1.34"; 11473 11587 src = fetchurl { ··· 12319 12433 license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 12320 12434 }; 12321 12435 }; 12322 - 12436 + 12323 12437 TaskFreecellSolverTesting = buildPerlModule rec { 12324 12438 name = "Task-FreecellSolver-Testing-v0.0.10"; 12325 12439 src = fetchurl { ··· 13541 13655 license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 13542 13656 }; 13543 13657 }; 13544 - 13658 + 13545 13659 TestTrailingSpace = buildPerlPackage rec { 13546 13660 name = "Test-TrailingSpace-0.0301"; 13547 13661 src = fetchurl {