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-07-15 17:15:38 +00:00
|
|
|
version = "1.6.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "memcached";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://memcached.org/files/${pname}-${version}.tar.gz";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-x4iYDvxBfdXZPEQrHIuHafsgGIlsKd44h9IqLxQ9ou4=";
|
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" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error=deprecated-declarations" ]
|
|
|
|
++ 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;
|
|
|
|
};
|
|
|
|
}
|