nixpkgs/pkgs/development/libraries/cppzmq/default.nix
Michal Sojka b1cb42d3b7 cppzmq: make zeromq propagatedBuildInput
cppzmq is a header-only library. As such, it is not much useful
without zeromq, whose headers it includes. By having zeromq in
propagatedBuildInputs, we can simplify dependent expressions.

This change is motivated by
https://github.com/lopsided98/nix-ros-overlay/issues/255#issuecomment-1487590226.
The expressions in nix-ros-overlay are automatically generated and
since packages in other distributions where ROS runs need not to
explicitly depend on zeromq, the Nix expression should behave the
same. This way, nix-ros-overlay will not to have manually
patch/overlay the automatically generated expressions.
2023-03-31 18:58:56 +02:00

31 lines
789 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, zeromq }:
stdenv.mkDerivation rec {
pname = "cppzmq";
version = "4.9.0";
src = fetchFromGitHub {
owner = "zeromq";
repo = "cppzmq";
rev = "v${version}";
sha256 = "sha256-hKMHJF/FXPeQjkEXLTN6zjKMaVGa3LdIebXya3NRSzU=";
};
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ zeromq ];
cmakeFlags = [
# Tests try to download googletest at compile time; there is no option
# to use a system one and no simple way to download it beforehand.
"-DCPPZMQ_BUILD_TESTS=OFF"
];
meta = with lib; {
homepage = "https://github.com/zeromq/cppzmq";
license = licenses.bsd2;
description = "C++ binding for 0MQ";
maintainers = with maintainers; [ abbradar ];
platforms = platforms.unix;
};
}