mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
b1cb42d3b7
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.
31 lines
789 B
Nix
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;
|
|
};
|
|
}
|