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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-04-22 15:20:20 +00:00
, fetchFromGitHub
, cmake
2022-05-10 22:55:06 +00:00
, makeFontsConf
, pkg-config
2020-04-22 15:20:20 +00:00
, pugixml
, wayland
, libGL
, libffi
, buildPackages
, docSupport ? true
2022-05-10 22:55:06 +00:00
, doxygen
, graphviz
2020-04-22 15:20:20 +00:00
}:
2019-03-26 19:23:35 +00:00
stdenv.mkDerivation rec {
pname = "waylandpp";
2022-05-10 22:55:06 +00:00
version = "1.0.0";
2019-03-26 19:23:35 +00:00
src = fetchFromGitHub {
owner = "NilsBrause";
repo = pname;
rev = version;
2022-05-10 22:55:06 +00:00
hash = "sha256-Dw2RnLLyhykikHps1in+euHksO+ERbATbfmbUFOJklg=";
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++"
];
2022-05-10 22:55:06 +00:00
# Complains about not being able to find the fontconfig config file otherwise
FONTCONFIG_FILE = lib.optional docSupport (makeFontsConf { fontDirectories = [ ]; });
nativeBuildInputs = [ cmake pkg-config ] ++ lib.optionals docSupport [ doxygen graphviz ];
buildInputs = [ pugixml wayland libGL libffi ];
2019-03-26 19:23:35 +00:00
2022-05-10 22:55:06 +00:00
outputs = [ "bin" "dev" "lib" "out" ] ++ lib.optionals docSupport [ "doc" "devman" ];
# Resolves the warning "Fontconfig error: No writable cache directories"
preBuild = ''
export XDG_CACHE_HOME="$(mktemp -d)"
'';
meta = with lib; {
2019-03-26 19:23:35 +00:00
description = "Wayland C++ binding";
homepage = "https://github.com/NilsBrause/waylandpp/";
2022-05-10 22:55:06 +00:00
license = with lib.licenses; [ bsd2 hpnd ];
maintainers = with lib.maintainers; [ minijackson ];
2019-03-26 19:23:35 +00:00
};
}