diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-12-23 04:10:40 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-12-23 04:10:54 +0000 |
commit | 9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617 (patch) | |
tree | 88c516e20751012957c402a0200dc427b2fe3eda /pkgs/servers/mail/public-inbox/default.nix | |
parent | 9ded9989c15650caf00b7cec54ddd7fc218d19e4 (diff) | |
parent | 35b7b1712509dcb3043deded4ddb82434bc4dd3e (diff) | |
download | nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.tar nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.tar.gz nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.tar.bz2 nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.tar.lz nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.tar.xz nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.tar.zst nixpkgs-9345bfecf650ee35ac4fe36c1d0b06dc5c9d8617.zip |
Merge remote-tracking branch 'nixpkgs/master' into master
Diffstat (limited to 'pkgs/servers/mail/public-inbox/default.nix')
-rw-r--r-- | pkgs/servers/mail/public-inbox/default.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/servers/mail/public-inbox/default.nix b/pkgs/servers/mail/public-inbox/default.nix new file mode 100644 index 00000000000..b4749558500 --- /dev/null +++ b/pkgs/servers/mail/public-inbox/default.nix @@ -0,0 +1,66 @@ +{ 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 rec { + pname = "public-inbox"; + version = "1.2.0"; + + src = fetchurl { + url = "https://public-inbox.org/releases/public-inbox-${version}.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 + ]; + + 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; + }; +} |