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

46 lines
1.1 KiB
Nix
Raw Normal View History

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
assert docSupport -> doxygen != null;
with stdenv.lib;
2019-03-26 19:23:35 +00:00
stdenv.mkDerivation rec {
pname = "waylandpp";
version = "0.2.7";
2019-03-26 19:23:35 +00:00
src = fetchFromGitHub {
owner = "NilsBrause";
repo = pname;
rev = version;
sha256 = "1r4m0xhvwpcqxrqvp3hz1bzlkxqj2jiymd5r6hj8xjzz536hyprz";
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++"
];
nativeBuildInputs = [ cmake pkgconfig ] ++ 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" ];
2019-03-26 19:23:35 +00:00
meta = with stdenv.lib; {
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 ];
};
}