From 72d7ff2ace9df8759821488aeba11645365be7c4 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Mon, 6 Apr 2015 18:08:42 -0700 Subject: [PATCH] belle-sip: Add derivation --- .../libraries/belle-sip/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/libraries/belle-sip/default.nix diff --git a/pkgs/development/libraries/belle-sip/default.nix b/pkgs/development/libraries/belle-sip/default.nix new file mode 100644 index 000000000000..6dc1b5241f23 --- /dev/null +++ b/pkgs/development/libraries/belle-sip/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, libantlr3c, jre, polarssl }: + +let + # We must use antlr-3.4 with belle-sip-1.4.0 + # We might be able to use antlr-3.5+ in the future + antlr = fetchurl { + url = "http://www.antlr3.org/download/antlr-3.4-complete.jar"; + sha256 = "1xqbam8vf04q5fasb0m2n1pn5dbp2yw763sj492ncq04c5mqcglx"; + }; +in +stdenv.mkDerivation rec { + name = "belle-sip-1.4.0"; + + src = fetchurl { + url = "mirror://savannah/linphone/belle-sip/${name}.tar.gz"; + sha256 = "1lwxfvwvclbh0bfwf69jrknqzqh1igzm293wwwbmq4kn8c5fiypz"; + }; + + nativeBuildInputs = [ jre ]; + + # belle-sip.pc doesn't have a library path for antlr3c or polarssl + propagatedBuildInputs = [ libantlr3c polarssl ]; + + postPatch = '' + mkdir -p $TMPDIR/share/java + cp ${antlr} $TMPDIR/share/java/antlr.jar + + sed -i "s,\(antlr_java_prefixes=\).*,\1\"$TMPDIR/share/java\"," configure + cat configure | grep antlr_java + ''; + + configureFlags = [ + "--with-polarssl=${polarssl}" + ]; + + enableParallelBuild = true; + + meta = with stdenv.lib; { + homepage = http://www.linphone.org/index.php/eng; + description = "A Voice-over-IP phone"; + license = licenses.gpl2; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec5f695bbad3..c2a2613b8afd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5463,6 +5463,8 @@ let beecrypt = callPackage ../development/libraries/beecrypt { }; + belle-sip = callPackage ../development/libraries/belle-sip { }; + boehmgc = callPackage ../development/libraries/boehm-gc { }; boolstuff = callPackage ../development/libraries/boolstuff { };