2020-04-24 23:36:52 +00:00
|
|
|
{stdenv, fetchurl, cyrus_sasl, libevent, nixosTests }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-06 00:33:48 +00:00
|
|
|
version = "1.6.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "memcached";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://memcached.org/files/${pname}-${version}.tar.gz";
|
2020-11-06 00:33:48 +00:00
|
|
|
sha256 = "0fbrrn7mkhv5xci4cffxxb8qzr9c0n3y58jymq2aqlpzyq8klfz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"ac_cv_c_endian=${if stdenv.hostPlatform.isBigEndian then "big" else "little"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [cyrus_sasl libevent];
|
|
|
|
|
|
|
|
hardeningEnable = [ "pie" ];
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin "-Wno-error";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A distributed memory object caching system";
|
|
|
|
repositories.git = "https://github.com/memcached/memcached.git";
|
|
|
|
homepage = "http://memcached.org/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.coconnor ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
passthru.tests = {
|
|
|
|
smoke-tests = nixosTests.memcached;
|
|
|
|
};
|
|
|
|
}
|