diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-12-16 18:42:21 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-12-20 19:47:42 +0000 |
commit | 8f8514c6ba596561724d462b07b1fb62d679c070 (patch) | |
tree | a33af6832685978a2ea1a331dfb135aae4141253 | |
parent | 7e1a3d01d7f63b3a63f8e8288345a526560ceb5a (diff) | |
download | nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.tar nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.tar.gz nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.tar.bz2 nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.tar.lz nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.tar.xz nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.tar.zst nixpkgs-8f8514c6ba596561724d462b07b1fb62d679c070.zip |
public-inbox: init at 1.2.0
highlight's Perl bindings are currently disabled on Darwin, but I didn't make the dependency here conditional so that if that is ever fixed, this function won't need to be updated. p-i is smart enough to disable the test for highlight if it can't find the Perl module.
-rw-r--r-- | pkgs/servers/mail/public-inbox/default.nix | 66 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 68 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 501bfc9581c..76c9cd9bdb7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15529,6 +15529,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 {}; |