diff --git a/nix/amqp-cpp.nix b/nix/amqp-cpp.nix new file mode 100644 --- /dev/null +++ b/nix/amqp-cpp.nix @@ -0,0 +1,28 @@ +{ stdenv +, lib +, cmake +, fetchFromGitHub +}: + +stdenv.mkDerivation rec { + pname = "amqp-cpp"; + version = "4.3.16"; + + src = fetchFromGitHub { + owner = "CopernicaMarketingSoftware"; + repo = "amqp-cpp"; + rev = "v${version}"; + sha256 = "sha256-aBLNdw9LhHFwnIt70vIYlX1/j2IUTmpm5Ub+ZImF8FI="; + }; + + nativeBuildInputs = [ + cmake + ]; + + cmakeFlagsArray = lib.optionals (stdenv.isLinux || stdenv.isDarwin) [ + "-DAMQP-CPP_BUILD_SHARED=ON" + ] ++ lib.optionals stdenv.isLinux [ + "-DAMQP-CPP_LINUX_TCP=ON" + ]; +} + diff --git a/nix/overlay.nix b/nix/overlay.nix --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -11,5 +11,9 @@ { # add packages meant for just this repository + amqp-cpp = prev.callPackage ./amqp-cpp.nix { }; + devShell = final.callPackage ./dev-shell.nix { }; + + tunnelbroker = final.callPackage ./tunnelbroker.nix { }; }