2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv
|
2020-04-22 17:20:20 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2020-04-22 17:20:20 +02:00
|
|
|
, pugixml
|
|
|
|
, wayland
|
|
|
|
, libGL
|
|
|
|
, libffi
|
|
|
|
, buildPackages
|
|
|
|
, docSupport ? true
|
|
|
|
, doxygen ? null
|
|
|
|
}:
|
2019-03-26 20:23:35 +01:00
|
|
|
|
2019-11-01 14:01:02 +01:00
|
|
|
assert docSupport -> doxygen != null;
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
with lib;
|
2019-03-26 20:23:35 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "waylandpp";
|
2020-06-30 20:37:43 +02:00
|
|
|
version = "0.2.8";
|
2019-03-26 20:23:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NilsBrause";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-06-30 20:37:43 +02:00
|
|
|
sha256 = "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq";
|
2019-03-26 20:23:35 +01:00
|
|
|
};
|
|
|
|
|
2021-01-21 01:55:55 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_DATADIR=${placeholder "dev"}"
|
2021-01-21 18:00:13 +01:00
|
|
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2020-04-22 19:53:19 +02:00
|
|
|
"-DWAYLAND_SCANNERPP=${buildPackages.waylandpp}/bin/wayland-scanner++"
|
|
|
|
];
|
2020-04-02 04:17:58 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ] ++ optional docSupport doxygen;
|
2020-04-02 04:17:58 +02:00
|
|
|
buildInputs = [ pugixml wayland libGL libffi ];
|
2019-03-26 20:23:35 +01:00
|
|
|
|
2019-11-01 14:01:02 +01:00
|
|
|
outputs = [ "bin" "dev" "lib" "out" ] ++ optionals docSupport [ "doc" "devman" ];
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2019-03-26 20:23:35 +01:00
|
|
|
description = "Wayland C++ binding";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/NilsBrause/waylandpp/";
|
2019-03-26 20:23:35 +01:00
|
|
|
license = with licenses; [ bsd2 hpnd ];
|
|
|
|
maintainers = with maintainers; [ minijackson ];
|
|
|
|
};
|
|
|
|
}
|