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