nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, zlib, openssl }:
2stdenv.mkDerivation rec {
3 version = "2.0.1";
4 pname = "libre";
5 src = fetchFromGitHub {
6 owner = "baresip";
7 repo = "re";
8 rev = "v${version}";
9 sha256 = "sha256-/1J9cs0W96CtnHAoX/jg3FLGD9coa0eOEgf8uMQHuUk=";
10 };
11 buildInputs = [ zlib openssl ];
12 makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]
13 ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
14 ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"
15 ;
16 meta = {
17 description = "A library for real-time communications with async IO support and a complete SIP stack";
18 homepage = "https://github.com/baresip/re";
19 maintainers = with lib.maintainers; [ elohmeier raskin ];
20 license = lib.licenses.bsd3;
21 };
22}