From 3aecf955484e8eabbd326815d817385e49d1cdd4 Mon Sep 17 00:00:00 2001 From: Mike Playle Date: Mon, 10 Apr 2017 12:00:35 +0100 Subject: [PATCH] libamqpcpp: init at 2.7.4 --- lib/maintainers.nix | 1 + .../libraries/libamqpcpp/default.nix | 27 +++++++++++++++++++ .../libamqpcpp/libamqpcpp-darwin.patch | 13 +++++++++ pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 43 insertions(+) create mode 100644 pkgs/development/libraries/libamqpcpp/default.nix create mode 100644 pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 509f2da8a4bc..02ea550e84bc 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -422,6 +422,7 @@ mirdhyn = "Merlin Gaillard "; mirrexagon = "Andrew Abbott "; mjanczyk = "Marcin Janczyk "; + mjp = "Mike Playle "; # github = "MikePlayle"; mlieberman85 = "Michael Lieberman "; modulistic = "Pablo Costa "; mog = "Matthew O'Gorman "; diff --git a/pkgs/development/libraries/libamqpcpp/default.nix b/pkgs/development/libraries/libamqpcpp/default.nix new file mode 100644 index 000000000000..421c73cbb056 --- /dev/null +++ b/pkgs/development/libraries/libamqpcpp/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "libamqpcpp-${version}"; + version = "2.7.4"; + + src = fetchFromGitHub { + owner = "CopernicaMarketingSoftware"; + repo = "AMQP-CPP"; + rev = "v${version}"; + sha256 = "0m010bz0axawcpv4d1p1vx7c6r8lg27w2s2vjqpbpg99w35n6c8k"; + }; + + patches = [ ./libamqpcpp-darwin.patch ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Library for communicating with a RabbitMQ server"; + homepage = https://github.com/CopernicaMarketingSoftware/AMQP-CPP; + license = licenses.asl20; + maintainers = [ maintainers.mjp ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch b/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch new file mode 100644 index 000000000000..9f8d700929b4 --- /dev/null +++ b/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch @@ -0,0 +1,13 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -0,0 +1 @@ ++CXX ?= g++ +@@ -43 +44 @@ ${SHARED_LIB}: ${SHARED_OBJECTS} +- ${LD} ${LD_FLAGS} -Wl,${SONAMEPARAMETER},lib$(LIBRARY_NAME).so.$(SONAME) -o $@ ${SHARED_OBJECTS} ++ ${CXX} ${LD_FLAGS} -Wl,${SONAMEPARAMETER},lib$(LIBRARY_NAME).so.$(SONAME) -o $@ ${SHARED_OBJECTS} +@@ -52 +53 @@ ${SHARED_OBJECTS}: +- ${CPP} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp} ++ ${CXX} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp} +@@ -55 +56 @@ ${STATIC_OBJECTS}: +- ${CPP} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp} ++ ${CXX} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ac22dfd18d1..75eda2045602 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8918,6 +8918,8 @@ with pkgs; libabw = callPackage ../development/libraries/libabw { }; + libamqpcpp = callPackage ../development/libraries/libamqpcpp { }; + libantlr3c = callPackage ../development/libraries/libantlr3c {}; libappindicator-gtk2 = callPackage ../development/libraries/libappindicator { gtkVersion = "2"; };