2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, pugixml
|
|
|
|
, wayland
|
|
|
|
, libGL
|
|
|
|
, libffi
|
|
|
|
, buildPackages
|
|
|
|
, docSupport ? true
|
|
|
|
, doxygen ? null
|
2022-04-27 09:35:20 +00:00
|
|
|
, graphviz ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert docSupport -> doxygen != null;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "waylandpp";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.2.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NilsBrause";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-5/u6tp7/E4tjSfX+QJFmcUYdnyOgl9rB79PDE/SJH1o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_DATADIR=${placeholder "dev"}"
|
|
|
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DWAYLAND_SCANNERPP=${buildPackages.waylandpp}/bin/wayland-scanner++"
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ] ++ optionals docSupport [ doxygen graphviz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ pugixml wayland libGL libffi ];
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "lib" "out" ] ++ optionals docSupport [ "doc" "devman" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Wayland C++ binding";
|
|
|
|
homepage = "https://github.com/NilsBrause/waylandpp/";
|
|
|
|
license = with licenses; [ bsd2 hpnd ];
|
|
|
|
maintainers = with maintainers; [ minijackson ];
|
|
|
|
};
|
|
|
|
}
|