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 {
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.6.26";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "memcached";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://memcached.org/files/${pname}-${version}.tar.gz";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-yTnHhZo8HPYDA+ndCAxjrEo4fuKEbVlc1SY6PcrNwvc=";
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "memcached";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
passthru.tests = {
|
|
|
|
smoke-tests = nixosTests.memcached;
|
|
|
|
};
|
|
|
|
}
|