about summary refs log tree commit diff
path: root/nixpkgs
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-12-16 18:42:21 +0000
committerAlyssa Ross <hi@alyssa.is>2019-12-24 23:03:39 +0000
commit7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7 (patch)
tree9bea59236a11b090145e95b0f429a2023c18ee0e /nixpkgs
parent7534c0e49c69bc716a288fc566008db753c470b5 (diff)
downloadnixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.tar
nixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.tar.gz
nixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.tar.bz2
nixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.tar.lz
nixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.tar.xz
nixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.tar.zst
nixlib-7cb39ab2dc0ccd2d7e4e63bf7b6e06daa664ecd7.zip
public-inbox: init at 1.2.0
Diffstat (limited to 'nixpkgs')
-rw-r--r--nixpkgs/pkgs/servers/mail/public-inbox/default.nix67
-rw-r--r--nixpkgs/pkgs/top-level/all-packages.nix2
2 files changed, 69 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/mail/public-inbox/default.nix b/nixpkgs/pkgs/servers/mail/public-inbox/default.nix
new file mode 100644
index 000000000000..8ceaf6b091db
--- /dev/null
+++ b/nixpkgs/pkgs/servers/mail/public-inbox/default.nix
@@ -0,0 +1,67 @@
+{ buildPerlPackage, lib, fetchurl, makeWrapper
+, DBDSQLite, EmailMIME, IOSocketSSL, IPCRun, Plack, PlackMiddlewareReverseProxy
+, SearchXapian, TimeDate, URI
+, git, highlight, openssl, xapian
+}:
+
+let
+
+  # These tests would fail, and produce "Operation not permitted"
+  # errors from git, because they use git init --shared.  This tries
+  # to set the setgid bit, which isn't permitted inside build
+  # sandboxes.
+  #
+  # These tests were indentified with
+  #     grep -r shared t/
+  skippedTests = [ "convert-compact" "search" "v2writable" "www_listing" ];
+
+  testConditions = with lib;
+    concatMapStringsSep " " (n: "! -name ${escapeShellArg n}.t") skippedTests;
+
+in
+
+buildPerlPackage {
+  pname = "public-inbox";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "https://public-inbox.org/releases/public-inbox-1.2.0.tar.gz";
+    sha256 = "0sa2m4f2x7kfg3mi4im7maxqmqvawafma8f7g92nyfgybid77g6s";
+  };
+
+  outputs = [ "out" "devdoc" "sa_config" ];
+
+  postConfigure = ''
+    substituteInPlace Makefile --replace 'TEST_FILES = t/*.t' \
+        'TEST_FILES = $(shell find t -name *.t ${testConditions})'
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [
+    DBDSQLite EmailMIME IOSocketSSL IPCRun Plack PlackMiddlewareReverseProxy
+    SearchXapian TimeDate URI highlight
+  ];
+
+  doCheck = true;
+  checkInputs = [ git openssl xapian ];
+  preCheck = ''
+    perl certs/create-certs.perl
+  '';
+
+  installTargets = [ "install" ];
+  postInstall = ''
+    for prog in $out/bin/*; do
+        wrapProgram $prog --prefix PATH : ${lib.makeBinPath [ git ]}
+    done
+
+    mv sa_config $sa_config
+  '';
+
+  meta = with lib; {
+    homepage = "https://public-inbox.org/";
+    license = licenses.agpl3Plus;
+    maintainers = with maintainers; [ qyliss ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/top-level/all-packages.nix b/nixpkgs/pkgs/top-level/all-packages.nix
index c035b9d6443e..a54628e0a5c4 100644
--- a/nixpkgs/pkgs/top-level/all-packages.nix
+++ b/nixpkgs/pkgs/top-level/all-packages.nix
@@ -15104,6 +15104,8 @@ in
 
   psqlodbc = callPackage ../development/libraries/psqlodbc { };
 
+  public-inbox = perlPackages.callPackage ../servers/mail/public-inbox { };
+
   pure-ftpd = callPackage ../servers/ftp/pure-ftpd { };
 
   pyIRCt = callPackage ../servers/xmpp/pyIRCt {};