2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, fetchurl, cyrus_sasl, libevent, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.6.18";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "memcached";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://memcached.org/files/${pname}-${version}.tar.gz";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-y91quIEGSaxdkvzQ/LDKkx2Knb0K2MxXW0ciLu3WQVg=";
|
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" ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin "-Wno-error";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A distributed memory object caching system";
|
|
|
|
homepage = "http://memcached.org/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.coconnor ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
passthru.tests = {
|
|
|
|
smoke-tests = nixosTests.memcached;
|
|
|
|
};
|
|
|
|
}
|