From ec0965e2672899d25a5a3a8c072de3ea734076a2 Mon Sep 17 00:00:00 2001 From: V Date: Wed, 9 Jun 2021 15:43:16 +0200 Subject: fleet: init Co-authored-by: edef Change-Id: I36d2c4cca542ed91630b1b832f3c7a7b97b33c65 --- fleet/pkgs/public-inbox/default.nix | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 fleet/pkgs/public-inbox/default.nix (limited to 'fleet/pkgs/public-inbox') diff --git a/fleet/pkgs/public-inbox/default.nix b/fleet/pkgs/public-inbox/default.nix new file mode 100644 index 0000000..bb5db29 --- /dev/null +++ b/fleet/pkgs/public-inbox/default.nix @@ -0,0 +1,45 @@ +# 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 ]; + }; +} -- cgit 1.4.1