# SPDX-FileCopyrightText: V # SPDX-License-Identifier: OSL-3.0 # TODO(V): Enable highlighting support { lib, buildPerlPackage, fetchurl, makeWrapper , git, xapian , URI, DBDSQLite, SearchXapian, Plack, PlackMiddlewareReverseProxy , sqlite # Only used in tests }: buildPerlPackage rec { pname = "public-inbox"; version = "unstable-2021-02-10"; # We need at least fa3f0cbcd1af5008e56c77e3c46ab60b5eca3a13 for public-inbox-watch to work with mlmmj's archive directory at all. # See also: https://public-inbox.org/meta/CAMwyc-SmvBoVOs+vCMNaWOWPT3TCB-7rJ_0bp43QB+pjzbNv-w@mail.gmail.com/ src = fetchurl { url = "https://public-inbox.org/public-inbox.git/snapshot/public-inbox-fa3f0cbcd1af5008e56c77e3c46ab60b5eca3a13.tar.gz"; sha256 = "03bynml6gw4936cri31ywqq5ackzkjjggksvpqf220xbcl55w93q"; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ URI DBDSQLite SearchXapian Plack PlackMiddlewareReverseProxy ]; checkInputs = [ git sqlite xapian ]; # TODO(edef): Only exclude the individual failing tests, not the entire file preCheck = '' rm t/search.t # Relies on set-gid, which is unavailable in the build sandbox. rm t/spawn.t # Tries to setpgid to that of pid 1, which (unexpectedly for the test) succeeds in the sandbox. ''; postFixup = '' for x in $out/bin/*; do wrapProgram $x --prefix PATH : ${lib.makeBinPath [ git xapian ]} done ''; meta = with lib; { homepage = "https://public-inbox.org/README.html"; description = "Git-based mailing-list archive"; license = licenses.agpl3Plus; maintainers = with maintainers; [ V ]; }; }