nixpkgs/pkgs/development/libraries/waylandpp/default.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

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