1 { stdenv, lib, fetchurl, makeWrapper, nixosTests
21 # FIXME: to be packaged
28 # FIXME: to be packaged
30 # FIXME: to be packaged
34 , PlackMiddlewareReverseProxy
35 , PlackTestExternalServer
46 # fatal: Could not make /tmp/pi-search-9188-DGZM/a.git/branches/ writable by group
48 # perl5.32.0-public-inbox> t/eml.t ...................... 1/? Cannot parse parameter '=?ISO-8859-1?Q?=20charset=3D=1BOF?=' at t/eml.t line 270.
49 # perl5.32.0-public-inbox> # Failed test 'got wide character by assuming utf-8'
50 # perl5.32.0-public-inbox> # at t/eml.t line 272.
51 # perl5.32.0-public-inbox> Wide character in print at /nix/store/38vxlxrvg3yji3jms44qn94lxdysbj5j-perl-5.32.0/lib/perl5/5.32.0/Test2/Formatter/TAP.pm line 125.
53 # Failed test 'Makefile OK'
54 # at t/hl_mod.t line 19.
58 # Hangs on "inbox unlocked on initial fetch, waiting for IDLE".
59 # Fixed in HEAD: 7234e671 ("t/imapd: workaround a Perl 5.36.0 readline regression")
61 # Failed test 'clone + index v1 synced ->created_at'
62 # at t/lei-mirror.t line 175.
65 # Failed test 'clone + index v1 synced ->created_at'
66 # at t/lei-mirror.t line 178.
69 # May be due to the use of $ENV{HOME}.
71 # Failed test 'child error (pure-Perl)'
72 # at t/spawn.t line 33.
74 # expected: anything else
75 # waiting for child to reap grandchild...
77 # Failed to connect to 127.0.0.1
81 testConditions = with lib;
82 concatMapStringsSep " " (n: "! -name ${escapeShellArg n}.t") skippedTests;
86 buildPerlPackage rec {
87 pname = "public-inbox";
91 url = "https://public-inbox.org/public-inbox.git/snapshot/public-inbox-${version}.tar.gz";
92 sha256 = "sha256-ENnT2YK7rpODII9TqiEYSCp5mpWOnxskeSuAf8Ilqro=";
95 outputs = [ "out" "devdoc" "sa_config" ];
98 substituteInPlace Makefile --replace 'TEST_FILES = t/*.t' \
99 'TEST_FILES = $(shell find t -name *.t ${testConditions})'
100 substituteInPlace lib/PublicInbox/TestCommon.pm \
101 --replace /bin/cp ${coreutils}/bin/cp
104 nativeBuildInputs = [ makeWrapper ];
122 PlackMiddlewareReverseProxy
130 doCheck = !stdenv.isDarwin;
131 nativeCheckInputs = [
139 PlackTestExternalServer
142 ] ++ lib.optionals stdenv.isLinux [
146 perl certs/create-certs.perl
147 export TEST_LEI_ERR_LOUD=1
148 export HOME="$NIX_BUILD_TOP"/home
149 mkdir -p "$HOME"/.cache/public-inbox/inline-c
152 installTargets = [ "install" ];
154 for prog in $out/bin/*; do
156 --set NIX_CFLAGS_COMPILE_${stdenv.cc.suffixSalt} -I${lib.getDev libxcrypt}/include \
157 --prefix PATH : ${lib.makeBinPath [
166 mv sa_config $sa_config
170 nixos-public-inbox = nixosTests.public-inbox;
174 homepage = "https://public-inbox.org/";
175 license = licenses.agpl3Plus;
176 maintainers = with maintainers; [ julm qyliss ];
177 platforms = platforms.all;