Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions pkgs/development/libraries/wslay/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ stdenv, lib, fetchurl, cunit }:

stdenv.mkDerivation rec {
pname = "wslay";
version = "1.1.1";

src = fetchurl {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not fetchFromGitHub?

url = "https://github.com/tatsuhiro-t/wslay/releases/download/release-${version}/wslay-${version}.tar.gz";
hash = "sha256-kM5oxt/WFHItRPuxRWOj9trMaLVIsgrjgqxPSVLFUmg=";
};

checkInputs = [ cunit ];
doCheck = true;

meta = with lib; {
homepage = "https://tatsuhiro-t.github.io/wslay/";
description = "The WebSocket library in C";
license = with licenses; [ mit ];
maintainers = with maintainers; [ pingiun ];
platforms = platforms.unix;
};
}
76 changes: 76 additions & 0 deletions pkgs/servers/mail/cyrus/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{ stdenv, lib, fetchurl, pkg-config
, bison, cyrus_sasl, icu, jansson, flex, libbsd, libtool, libuuid, openssl
, cunit, coreutils, perl
# CalDAV, CardDAV
, withHttp ? true, brotli, libical, libxml2, nghttp2, shapelib, zlib
, withJMAP ? true, libchardet, wslay
, withXapian ? true, xapian
, withCalalarmd ? true
, withMySQL ? false, libmysqlclient
, withPgSQL ? false, postgresql
, withSQLite ? true, sqlite
}:

stdenv.mkDerivation rec {
pname = "cyrus";
version = "3.4.3";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


src = fetchurl {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not fetchFromGitHub?

url = "https://github.com/cyrusimap/cyrus-imapd/releases/download/cyrus-imapd-${version}/cyrus-imapd-${version}.tar.gz";
hash = "sha256-HMyanwY0CE+1SzCmhw2ZNAFRD7yP1I9C1rM22E3ZiV4=";
};

nativeBuildInputs = [ bison flex pkg-config perl ];
buildInputs =
[ cyrus_sasl.dev icu jansson libbsd libtool libuuid openssl ]
++ lib.optionals (withHttp || withCalalarmd || withJMAP) [ brotli.dev libical libxml2 nghttp2 shapelib zlib ]
++ lib.optionals withJMAP [ libchardet wslay ]
++ lib.optional withXapian xapian
++ lib.optional withMySQL libmysqlclient
++ lib.optional withPgSQL postgresql
++ lib.optional withSQLite sqlite;

enableParallelBuilding = true;

postPatch = ''
patchShebangs cunit/*.pl
patchShebangs imap/promdatagen
patchShebangs tools/*

sed -i \
-e 's!/usr/bin/touch!${coreutils}/bin/touch!g' \
-e 's!/bin/echo!${coreutils}/bin/echo!g' \
-e 's!/bin/sh!${stdenv.shell}!g' \
-e 's!/usr/bin/tr!${coreutils}/bin/tr!g' \
cunit/command.testc

# failing test case in 3.4.3
sed -i 's!TESTCASE("re: no re: foobar", "nore:foobar");!!' cunit/conversations.testc
'';

configureFlags = [
"--enable-autocreate"
"--enable-idled"
"--enable-murder"
"--enable-replication"
"--enable-unit-tests"
"--with-pidfile=/run/cyrus-master.pid"
] ++ lib.optional (withHttp || withCalalarmd || withJMAP) "--enable-http"
++ lib.optional withJMAP "--with-jmap"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
++ lib.optional withJMAP "--with-jmap"
++ lib.withFeature withJMAP "jmap"

++ lib.optional withXapian "--with-xapian"
++ lib.optional withCalalarmd "--enable-calalarmd"
++ lib.optional withMySQL "--with-mysql"
++ lib.optional withPgSQL "--with-pgsql"
++ lib.optional withSQLite "--with-sqlite";

checkInputs = [ cunit ];
doCheck = true;

meta = with lib; {
homepage = "https://www.cyrusimap.org";
description = "Cyrus IMAP is an email, contacts and calendar server.";
Comment thread
pingiun marked this conversation as resolved.
Outdated
license = with licenses; [ bsdOriginal ];
maintainers = with maintainers; [ pingiun ];
platforms = platforms.unix;
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21010,6 +21010,8 @@ with pkgs;

wlr-protocols = callPackage ../development/libraries/wlroots/protocols.nix { };

wslay = callPackage ../development/libraries/wslay { };

wt = wt4;
inherit (callPackages ../development/libraries/wt {
boost = boost175;
Expand Down Expand Up @@ -21559,6 +21561,8 @@ with pkgs;
erlang = erlangR22;
};

cyrus = callPackage ../servers/mail/cyrus { };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project's website, source repo and doc are named Cyrus IMAP(d).
Even though it supports more than this protocol, we should probably stick
with the same name.


dcnnt = python3Packages.callPackage ../servers/dcnnt { };

dendrite = callPackage ../servers/dendrite { };
Expand Down