Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 zlib, 6 openssl, 7 libre, 8 cmake, 9}: 10 11stdenv.mkDerivation rec { 12 version = "2.12.0"; 13 pname = "librem"; 14 src = fetchFromGitHub { 15 owner = "baresip"; 16 repo = "rem"; 17 rev = "v${version}"; 18 sha256 = "sha256-MsXSUxFH89EqxMe4285xFV1Tsqmv2l5RnEeli48O3XQ="; 19 }; 20 nativeBuildInputs = [ cmake ]; 21 buildInputs = [ 22 zlib 23 openssl 24 libre 25 ]; 26 cmakeFlags = [ 27 "-DRE_INCLUDE_DIR=${libre}/include/re" 28 ]; 29 makeFlags = [ 30 "LIBRE_MK=${libre}/share/re/re.mk" 31 "PREFIX=$(out)" 32 "AR=${stdenv.cc.targetPrefix}ar" 33 ] 34 ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${lib.getDev stdenv.cc.cc}" 35 ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"; 36 enableParallelBuilding = true; 37 meta = { 38 description = "Library for real-time audio and video processing"; 39 homepage = "https://github.com/baresip/rem"; 40 maintainers = with lib.maintainers; [ raskin ]; 41 license = lib.licenses.bsd3; 42 }; 43}