nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 49 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 hiredis, 7 enableShared ? !stdenv.hostPlatform.isStatic, 8 enableStatic ? stdenv.hostPlatform.isStatic, 9}: 10 11# You must build at one type of library 12assert enableShared || enableStatic; 13 14stdenv.mkDerivation rec { 15 pname = "redis-plus-plus"; 16 version = "1.3.14"; 17 18 src = fetchFromGitHub { 19 owner = "sewenew"; 20 repo = "redis-plus-plus"; 21 rev = version; 22 sha256 = "sha256-GN+GrV53+JPEbVefH0EXzS1PyGEdQGFcPEctdWOI5uk="; 23 }; 24 25 patches = [ 26 ./0001-Fix-pkg-config-paths.patch 27 ]; 28 29 nativeBuildInputs = [ cmake ]; 30 propagatedBuildInputs = [ hiredis ]; 31 32 cmakeFlags = [ 33 "-DREDIS_PLUS_PLUS_BUILD_TEST=OFF" 34 ] 35 ++ lib.optionals (!enableShared) [ 36 "-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF" 37 ] 38 ++ lib.optionals (!enableStatic) [ 39 "-DREDIS_PLUS_PLUS_BUILD_STATIC=OFF" 40 ]; 41 42 meta = with lib; { 43 homepage = "https://github.com/sewenew/redis-plus-plus"; 44 description = "Redis client written in C++"; 45 license = licenses.asl20; 46 platforms = platforms.unix; 47 maintainers = with maintainers; [ wheelsandmetal ]; 48 }; 49}